Search Tweets
Search Tweets
Search recent tweets on X with advanced query syntax, engagement filters, and cursor-based pagination.
POST
/v2/searchSearch tweets with advanced filtering. Returns up to 1,000 per request (same on every plan; paginate for more).Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| query | string | required | — | Search query. X's own syntax works here as typed: quotes, AND/OR, -exclusions, from:, filter:links, min_faves:. Max 512 characters, X's own limit, counted after the filters below have been added |
| count | integer | optional | 20 | Results per page (up to 1,000 per request; same on every plan; paginate for more). Also accepts "limit" |
| sort | string | optional | latest | latest (default) reads X’s Latest tab: recent posts containing every word, chronological, the same for every caller. engagement reads that same neutral tab and ranks by interactions (likes + reposts + replies + bookmarks), so the same request returns the same posts in the same order — pair it with min_likes and since for a window worth ranking. media reads the Media tab, only posts carrying a photo or video. X’s own Top tab is not offered: it is personalised per reading account, so it cannot be reproduced or explained. top and popular still answer, as engagement |
| exact_phrase | string | optional | — | Posts containing this phrase word for word |
| any_words | string | optional | — | Posts containing at least one of these words. Space or comma separated, or an array |
| none_words | string | optional | — | Posts containing none of these words |
| hashtags | string | optional | — | Posts carrying these hashtags, with or without the # |
| from | string | optional | — | Posts sent by these accounts. Several are OR-ed, so from=a,b returns either |
| to | string | optional | — | Posts sent in reply to these accounts |
| mentions | string | optional | — | Posts mentioning these accounts |
| links | string | optional | — | include (default), only for posts carrying a link, exclude for posts without one |
| replies | string | optional | — | include (default), only for replies, exclude to leave them out |
| lang | string | optional | — | Filter by 2-3 letter language code (e.g. en, vi, ja, ko). Anything else returns 400 |
| min_likes | integer | optional | — | Minimum number of likes (maps to X min_faves). Whole number; 1,000 is fine, 1k returns 400 |
| min_retweets | integer | optional | — | Minimum number of retweets |
| min_replies | integer | optional | — | Minimum number of replies |
| exclude_replies | boolean | optional | false | Alias: the same as replies=exclude. A value that contradicts replies returns 400 |
| exclude_retweets | boolean | optional | false | Exclude retweets from results |
| include_replies | boolean | optional | — | Alias: include_replies=false is the same as replies=exclude. Conflicting values return 400 |
| only_replies | boolean | optional | false | Alias: the same as replies=only. A value that contradicts replies returns 400 |
| include_retweets | boolean | optional | — | Alias: include_retweets=false is the same as exclude_retweets=true. Conflicting values return 400 |
| since | string | optional | — | Only posts from this date onward (YYYY-MM-DD, UTC). Compiled to an exact timestamp, so the bound is to the second |
| until | string | optional | — | Only posts up to the END of this date, so the day itself is included (YYYY-MM-DD, UTC). Exact to the second |
| cursor | string | optional | — | Pagination cursor from previous response meta.next_cursor |
Example Request
POST /v2/searchJSON
{ "query": "#ETH (listing OR airdrop)", "count": 50, "sort": "engagement", "lang": "en", "min_likes": 100, "exclude_replies": true }
Response
JSON
{ "data": [ { "id": "1893045123456789012", "text": "Ethereum listing confirmed on Binance...", "author": { "id": "78901", "username": "binance", "name": "Binance" }, "metrics": { "likes": 18204, "retweets": 5893, "replies": 2411, "views": 4200000, "bookmarks": 312 }, "created_at": "Fri Mar 06 07:22:11 +0000 2026", "is_reply": false, "is_quote": false, "is_retweet": false } ], "meta": { "total": 50, "has_next_page": true, "next_cursor": "eyJvZmZzZXQiOjUwfQ==", "query": "#ETH (listing OR airdrop) lang:en", "latency_ms": 2640 } }