Skip to main content

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

ParameterTypeRequiredDefaultDescription
querystringrequired—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
countintegeroptional20Results per page (up to 1,000 per request; same on every plan; paginate for more). Also accepts "limit"
sortstringoptionallatestlatest (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_phrasestringoptional—Posts containing this phrase word for word
any_wordsstringoptional—Posts containing at least one of these words. Space or comma separated, or an array
none_wordsstringoptional—Posts containing none of these words
hashtagsstringoptional—Posts carrying these hashtags, with or without the #
fromstringoptional—Posts sent by these accounts. Several are OR-ed, so from=a,b returns either
tostringoptional—Posts sent in reply to these accounts
mentionsstringoptional—Posts mentioning these accounts
linksstringoptional—include (default), only for posts carrying a link, exclude for posts without one
repliesstringoptional—include (default), only for replies, exclude to leave them out
langstringoptional—Filter by 2-3 letter language code (e.g. en, vi, ja, ko). Anything else returns 400
min_likesintegeroptional—Minimum number of likes (maps to X min_faves). Whole number; 1,000 is fine, 1k returns 400
min_retweetsintegeroptional—Minimum number of retweets
min_repliesintegeroptional—Minimum number of replies
exclude_repliesbooleanoptionalfalseAlias: the same as replies=exclude. A value that contradicts replies returns 400
exclude_retweetsbooleanoptionalfalseExclude retweets from results
include_repliesbooleanoptional—Alias: include_replies=false is the same as replies=exclude. Conflicting values return 400
only_repliesbooleanoptionalfalseAlias: the same as replies=only. A value that contradicts replies returns 400
include_retweetsbooleanoptional—Alias: include_retweets=false is the same as exclude_retweets=true. Conflicting values return 400
sincestringoptional—Only posts from this date onward (YYYY-MM-DD, UTC). Compiled to an exact timestamp, so the bound is to the second
untilstringoptional—Only posts up to the END of this date, so the day itself is included (YYYY-MM-DD, UTC). Exact to the second
cursorstringoptional—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
  }
}

More in REST API

Full documentation with search: xcrop.io/docs