X / Twitter Search API
Search X (Twitter) with full advanced-search syntax (operators like from:, since:, until:, min_faves: work inline in the query) and get structured tweets with text, author, engagement, and cursor pagination. Limit is a per-page maximum; native pages contain approximately 20 tweets unless requireSinglePage selects a bulk lane.
$0.60/1k req, pay per request, no subscription.
openai gpt-6
Dusk Ibrahim@duskdevlog · Sep 19, 2025
gpt-6 handling multi-file refactors without losing context is the first time an LLM diff actually felt safe to auto-apply
{"id":Â "1928912345678901234","url":Â "https://x.com/duskdevlog/status/1928912345678901234","text":Â "gpt-6 handling multi-file refactors without losing context is the first time an LLM diff actually felt safe to auto-apply","authorUsername":Â "duskdevlog","authorName":Â "Dusk Ibrahim","authorVerified":Â true,"likeCount":Â 2840,"retweetCount":Â 312,+10 more fields}
Pricing and providers
X / Twitter Search API pricing: one API, 4 interchangeable providers
The cheapest provider serves first. If it fails, the next one takes over in the same call.
capped at $0.0051 per request1 result$0.000225 results$0.002650 results$0.0051 capYou are charged for what comes back. Lower the limit to pay less - and no single request can cost more than the cap, however much comes back.4OctopusBackup 3100.00% uptime21389ms p500.0% of calls0.0%22 calls$0.308/1k resultsup to $0.0154 / requestMetered per result returned$0.0044 base + $0.00022 per result
capped at $0.0154 per request1 result$0.0046225 results$0.009950 results$0.0154 capYou are charged for what comes back. Lower the limit to pay less - and no single request can cost more than the cap, however much comes back.
Try it
Get X / Twitter search in one request
{
"found": true,
"data": {
"items": [
{
"id": "1928912345678901234",
"url": "https://x.com/duskdevlog/status/1928912345678901234",
"text": "gpt-6 handling multi-file refactors without losing context is the first time an LLM diff actually felt safe to auto-apply",
"authorUsername": "duskdevlog",
"authorName": "Dusk Ibrahim",
"authorVerified": true,
"likeCount": 2840,
"retweetCount": 312,
"replyCount": 88,
"quoteCount": 14,
"viewCount": 412000,
"bookmarkCount": 640,
"createdUtc": 1758240000,
"lang": "en",
"isReply": false,
"conversationId": "1928912345678901234",
"inReplyToId": null,
"media": []
},
{
"id": "1928912345678901235",
"url": "https://x.com/laurenshipsit/status/1928912345678901235",
"text": "openai just quietly bumped the context window again, nobody noticed because everyone is busy arguing about pricing",
"authorUsername": "laurenshipsit",
"authorName": "Lauren Ostrowski",
"authorVerified": false,
"likeCount": 960,
"retweetCount": 140,
"replyCount": 52,
"quoteCount": 6,
"viewCount": 98400,
"bookmarkCount": 210,
"createdUtc": 1758153600,
"lang": "en",
"isReply": false,
"conversationId": "1928912345678901235",
"inReplyToId": null,
"media": [
{
"type": "photo",
"url": "https://pbs.twimg.com/media/GZsearchScreenshot.jpg",
"width": 1080,
"height": 1350
}
]
},
{
"id": "1928912345678901236",
"url": "https://x.com/samthebuilder/status/1928912345678901236",
"text": "replying to the thread below, openai's function calling still trips on nested optional fields half the time",
"authorUsername": "samthebuilder",
"authorName": "Sam Whitfield",
"authorVerified": false,
"likeCount": 88,
"retweetCount": 3,
"replyCount": 12,
"quoteCount": 0,
"viewCount": 5400,
"bookmarkCount": 9,
"createdUtc": 1758067200,
"lang": "en",
"isReply": true,
"conversationId": "1928912345678901230",
"inReplyToId": "1928912345678901229",
"media": []
}
],
"nextCursor": "DAACCgACGZabc123DEF456",
"authorId": "1758912340000000000",
"authorImage": "https://pbs.twimg.com/profile_images/1758912340000000000/dusk_avatar.jpg",
"authorFollowers": 18400
}
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
One request, one response shape.
Every field you send and every field you get back, each with a real example.
Last verified 2026-10-06 · uptime and latency measured over 30d
Request body
JSON, posted to this endpoint.
- querystring
openai gpt-6
Search query using X (Twitter) advanced-search syntax. IMPORTANT: bare terms are ANDed - a tweet must contain EVERY word, so a list of loosely related keywords matches nothing; use one short phrase or OR between alternatives (e.g. 'anyapi OR getanyapi'). When an operator follows an OR list, put the list in parentheses, e.g. '(anyapi OR getanyapi) -filter:replies': without them X applies the operator to the last alternative only, so such a query still runs as X reads it and the response's hint carries the corrected query. You can embed X advanced-search operators directly in the query to filter results: from:username and to:username (author or recipient), since:YYYY-MM-DD and until:YYYY-MM-DD (date range), min_faves:N, min_retweets:N, min_replies:N (engagement floors), "exact phrase", -term to exclude, filter:media and filter:links and -filter:replies (content filters), lang:en, near:city, and geocode:lat,long,radius. Examples: 'from:OpenAI', 'AI agents min_faves:500 -filter:replies', 'nvidia since:2026-01-01 until:2026-03-01'. A query with no matches returns an empty items array; prefer the fewest words that identify the topic.
- cursorstring
Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of search results.
- limitinteger
Per-page maximum number of results to return (1-50, default 20). A provider may return a smaller native page; follow nextCursor for more.
- queryTypeenum
Latest
Which posts to return: 'Latest' (newest first, the default), 'Top' (most popular), 'Photos' (newest posts with images), or 'Videos' (newest posts with video). Photos and Videos search your query as written with filter:images or filter:videos added after it, so they cost the same as a Latest search.
- requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `nextCursor`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
- requireSinglePageboolean
Set true to get up to limit results in one response instead of provider-native pages, served by a bulk provider when needed.
Response
JSON, one example value per field.
- foundboolean
true
- idstring
1928912345678901234
- urlstring
https://x.com/duskdevlog/status/1928912345678901234
- textstring
gpt-6 handling multi-file refactors without losing context is the first time an LLM diff actually felt safe to auto-apply
- authorUsernamestring
duskdevlog
- authorNamestring
Dusk Ibrahim
- authorVerifiedboolean
true
- likeCountnumber
2840
- retweetCountnumber
312
- replyCountnumber
88
- quoteCountnumber
14
- viewCountnumber
412000
- bookmarkCountnumber
640
- createdUtcnumber
1758240000
- langstring
en
- isReplyboolean
false
- conversationIdstring
1928912345678901234
- inReplyToIdnull
null
- mediaarray
- nextCursorstringcan require
DAACCgACGZabc123DEF456
- authorIdstring
1758912340000000000
- authorImagestring
https://pbs.twimg.com/profile_images/1758912340000000000/dusk_avatar.jpg
- authorFollowersnumber
18400
FAQ
About the X / Twitter Search API
The AnyAPI X / Twitter Search API returns X / Twitter search data as normalized JSON from one POST call to /v1/run/twitter.search. Search X (Twitter) with full advanced-search syntax (operators like from:, since:, until:, min_faves: work inline in the query) and get structured tweets with text, author, engagement, and cursor pagination. Limit is a per-page maximum; native pages contain approximately 20 tweets unless requireSinglePage selects a bulk lane. AnyAPI routes each request across 4 sources and falls back automatically when one fails. It costs from $0.60 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 100.0% of X / Twitter search calls through AnyAPI succeeded, with a median response time of 1.4 seconds across 374,127 measured calls.