App Logo
x.com

Search X tweets

Search X for tweets, supporting all X search operators; the tab arg picks 'top' (ranked sample, default) or 'latest' (chronological). Returns per tweet a canonical record: id, url, author {id, handle, name}, text, created_at, lang, likes, retweets, replies, quotes, bookmarks, views, is_retweet, is_quote, plus followers (the author's follower count, a search-only enrichment), and the top-level query and count. Top is a ranked sample, not exhaustive.

Input

query required

Raw X search query. Supports all X search operators, e.g. '"AI automation" min_faves:500 since:2026-06-04'. Combining -filter:replies with min_faves and since can unexpectedly return zero results; using fewer operators together is more reliable. AGENT INSTRUCTION: this query is taken literally — if it targets a person or organization ambiguously (a bare first name, a nickname, or a handle you're not certain is exact, meant for from:/to:/@ targeting), resolve the exact handle first (for example via get_user_info, or by asking the user) rather than guessing, since a wrong guess won't error, it will just silently search the wrong thing and return a plausible-looking but incorrect result set.

tab optional

Which search tab: 'top' (ranked, default) or 'latest' (chronological). Top is a sample, not an exhaustive ranking.

Default: "top"
count optional

Max tweets to return. The script scrolls until count is met or results dry up. Default 20, max 100.

Default: 20

Output

count required

Number of tweets returned. 0 is a first-class outcome (no results for the query).

query required
tweets required

Start building for free