mentionsapi (Python)
Pydantic-modeled Python SDK with sync + async clients. Python 3.10+.
Install
bash
pip install mentionsapi
# or with uv / poetry
uv add mentionsapi
poetry add mentionsapiQuickstart
python
import os
from mentionsapi import MentionsAPI
client = MentionsAPI(api_key=os.environ["MENTIONSAPI_KEY"])
result = client.check(
mode="all_live",
query="best CRM for small business",
brand="HubSpot",
)
print(result.providers["perplexity"].citations)Watch CRUD
python
client.watch.create(
query="best CRM for small business",
brand="HubSpot",
mode="all_live",
interval="daily",
webhook_url="https://your-app.com/webhooks/mentions",
webhook_secret=os.environ["MENTIONS_WEBHOOK_SECRET"],
trigger_on=["mention_added", "mention_removed", "rank_changed"],
)