PrerequisitesBefore you begin, you’ll need:
- A developer account with an approved App
- Your App’s Bearer Token (for public data) or User Access Token (for private metrics)
Get user mentions
Get the user ID
Find the user ID using the user lookup endpoint. For example, @XDevelopers has user ID
2244994945.Filter mentions
Exclude replies
Get only original Posts that mention the user:cURL
Get mentions in a time range
cURL
Common parameters
| Parameter | Description | Default |
|---|---|---|
max_results | Results per page (1-100) | 10 |
start_time | Oldest Post timestamp (ISO 8601) | — |
end_time | Newest Post timestamp (ISO 8601) | — |
since_id | Return Posts after this ID | — |
until_id | Return Posts before this ID | — |
exclude | Exclude retweets, replies, or both | — |
pagination_token | Token for next page | — |