Search syntax cheatsheet
GET /twitter/tweet/advanced_search takes a query in X’s search syntax and a queryType: Latest
(newest first) or Top (most engaged). Combine operators with spaces; a space means AND.
Every operator below was checked against the live endpoint on 2026-09-25.
| Operator | Matches | Example |
|---|---|---|
from:handle |
Posts by an account | from:NASA |
to:handle |
Replies to an account | to:NASA |
@handle |
Posts mentioning an account | @NASA |
| Operator | Matches | Example |
|---|---|---|
"exact phrase" |
The exact phrase | "artemis ii" |
a OR b |
Either term | artemis OR starship |
-word |
Excludes a term | nasa -moon |
#hashtag |
A hashtag | #Artemis |
url:domain |
Posts linking to a domain | url:nasa.gov |
lang:xx |
Posts X detected as that language | nasa lang:es |
lang: uses X’s own per-post language detection, so a few results in other languages can slip in.
| Operator | Matches | Example |
|---|---|---|
since:YYYY-MM-DD |
On or after the date | from:NASA since:2026-09-01 |
until:YYYY-MM-DD |
Before the date | from:NASA until:2026-09-20 |
Engagement and type
Section titled “Engagement and type”| Operator | Matches | Example |
|---|---|---|
min_faves:N |
At least N likes | from:NASA min_faves:1000 |
min_retweets:N |
At least N reposts | from:NASA min_retweets:200 |
min_replies:N |
At least N replies | from:NASA min_replies:100 |
filter:media |
Posts with images or video | from:NASA filter:media |
filter:links |
Posts with links | from:NASA filter:links |
filter:replies |
Only replies | from:NASA filter:replies |
-filter:replies |
Excludes replies | from:NASA -filter:replies |
Putting it together
Section titled “Putting it together”from:NASA min_faves:1000 -filter:replies since:2026-09-01That query returns NASA’s original posts with at least 1,000 likes since 1 September. Page through the results with cursors.