Skip to main content

Mention Python Client

A modern, type-safe Python client for the Mention API. Monitor your brand across the web with both synchronous and asynchronous support.

Quick start

Get up and running with the Mention Python client in minutes

1

Install the package

Install via pip to get started immediately:
pip
pip install mention_python
2

Get your API credentials

Obtain your OAuth2 access token from the Mention API dashboard. You’ll need this to authenticate your requests.
Store your access token securely using environment variables or a secrets manager. Never commit credentials to version control.
3

Initialize the client

Create a client instance with your credentials:
from mention import MentionClient

client = MentionClient(access_token="your-access-token")
4

Make your first API call

Fetch your alerts to verify everything is working:
alerts = client.get_alerts("your-account-id")

for alert in alerts.alerts:
    print(f"Alert: {alert.name}")
    print(f"ID: {alert.id}")
Alert: Brand Mentions
ID: 123456789
Alert: Competitor Analysis
ID: 987654321

Key features

Everything you need to integrate with the Mention API

Type-safe models

Fully typed Pydantic models for all API resources with automatic validation

Async support

Both synchronous and asynchronous clients for any use case

CLI tool

Comprehensive command-line interface for quick operations

Automatic retries

Built-in retry logic with exponential backoff for resilient apps

Pagination

Automatic pagination handling with iterator support

Full API coverage

Complete coverage of all Mention API endpoints

Explore the API

Browse documentation by resource type

Alerts

Create and manage monitoring alerts

Mentions

Retrieve and curate brand mentions

Tasks

Organize work with task management

Tags

Categorize mentions with custom tags

Shares

Share reports and insights

Statistics

Analyze trends with stats API

Ready to get started?

Follow our quickstart guide to make your first API call in under 5 minutes

View Quickstart

Build docs developers (and LLMs) love