X (Twitter) Search Mentions Scraper API
Returns X posts that mention an account or reply to it, for tracking a brand or a person. Rows that pass none of these are left out. sort is latest (default) or top; since and until are sent to X as date operators.
GET /api/v1/data/x/search-mentions · 1 credit per page · The same call repeated within 2 minutes may get the same answer, so data can be up to 2 minutes old.
Inputs
handle(required): The account's username, with or without the @, or its profile URL.cursor: Leave it out for the first page. For the next page, send next_cursor from the previous answer.since: Only posts published on or after this date, YYYY-MM-DD (UTC).until: Only posts published on or before this date, YYYY-MM-DD (UTC); that whole day is included.sort: latest (default) for the newest posts first, top for the most popular.include_self: When true, also keep posts by the account itself. Default false.
What comes back
result_status(string): success, or not_available when the item does not exist, was removed or is not public.items[].computed(object): Server-computed analytics fields (consistent across platforms)items[].match_kind(string): Why the row is in the results: `hashtag` (carries the hashtag), `mention` (names the account in its text), `reply` (replies to the account), `repost` (reposts the account), `tag` (tags the account) or `link` (links the account's profile or one of its posts).items[].post(object): Canonical Post object (unified across all platforms)next_cursor(string): Send it as cursor to get the next page; null when there is none.has_more(boolean): Whether there is another page.source_data(object): Everything the platform sent for this call, as it came.
Good to know
- The price depends on what the call returns: from 0 credits to 1 credit.
- Each call returns one page of about 20 rows. To get the next page, send next_cursor from the answer as cursor.
- The same call repeated within 2 minutes may get the same answer, so data can be up to 2 minutes old.
Example call
GET /api/v1/data/x/search-mentions?handle=nike
Questions
How much does the X (Twitter) Search Mentions API cost?
Each page costs 0 to 1 credit, depending on what it returns. A call that finds nothing, or fails, costs nothing.
What do I send?
You must send handle. 4 more inputs are optional: since, until, sort and include_self. Inputs go in the query string of a GET, or as JSON in a POST, along with your API key.
How do I get the next page?
Each call returns one page of about 20 rows. The answer carries next_cursor: send it back as cursor to get the page after. Each page is charged on its own, and an empty page is free.
How fresh is the data?
The same call repeated within 2 minutes may get the same answer, so data can be up to 2 minutes old.
Do I need an X (Twitter) account or developer app?
No. You call SocialHz with your SocialHz API key, and the same key works for every platform.
Can I try it before paying?
Yes. Signing up gives you 10 free credits, with no card needed.
Related X (Twitter) endpoints
- Search Hashtag: Search X posts carrying a hashtag. 1 credit a page
- Search Users: Search X users. 1 credit a page
More X (Twitter) scraper APIs
- X (Twitter) AI Search Scraper API
- X (Twitter) Community Scraper API
- X (Twitter) Community Posts Scraper API
- X (Twitter) Post Reposters Scraper API
- X (Twitter) Post Transcript Scraper API
- X (Twitter) Profile Scraper API
- X (Twitter) Profile About Scraper API
- X (Twitter) Profile Full Scraper API
- X (Twitter) Search Hashtag Scraper API
- X (Twitter) Search Users Scraper API
- X (Twitter) User Followers Scraper API
- X (Twitter) User Following Scraper API
- X (Twitter) User Media Scraper API