Twitter Search API & Advanced Operators (2026 Guide)
Twitter Search API guide for 2026 — every advanced search operator (from:, to:, min_faves:, since:, until:) with working code in curl, Python, JavaScript.

The Twitter Search API is the most powerful way to query Twitter/X programmatically — but Twitter's own documentation is incomplete, scattered, and often outdated. This guide is a complete, developer-focused reference to the Twitter Search API and every operator that actually works on Twitter/X in 2026, pulled from real testing and the community-maintained igorbrigadir/twitter-advanced-search repo.
You can use these operators in two ways: on Twitter's own search page, or programmatically through the GetXAPI Advanced Search endpoint at $0.001 per call (~20 tweets). Unlike the official X API — which only supports a limited subset — GetXAPI passes the full web search operator set through, including the high-value engagement filters (min_faves:, min_retweets:) that the official API doesn't expose.
What Is the Twitter Search API?
The "Twitter Search API" is the umbrella term for any programmatic way to query Twitter's search index. In 2026 there are three options:
| Provider | Endpoint | Cost | Operator support |
|---|---|---|---|
| GetXAPI | GET /twitter/tweet/advanced_search |
$0.001 per call (~20 tweets) | Full web operator set incl. min_faves:, min_retweets: |
| Official X API v2 | GET /2/tweets/search/recent |
$0.005 per post read | Limited — no engagement filters; only from:, to:, lang, basic operators |
| Official X API v2 (Pro) | GET /2/tweets/search/all (full-archive) |
Enterprise pricing only | Full operator set, but $42K+/mo minimum |
For 99% of use cases — research, monitoring, analytics, ETL pipelines — GetXAPI's search endpoint is the most cost-effective Twitter Search API in 2026 at $0.05 per 1,000 tweets, with no developer-account approval and the full operator set unlocked. The rest of this guide treats "Twitter Search API" and the GetXAPI advanced search endpoint as interchangeable, since the operator syntax works identically on Twitter's web search and on the GetXAPI passthrough.
The most important gotcha first
Twitter has two different operator sets:
- Web search operators — everything in this guide. Used on twitter.com/search, TweetDeck, and scraping-based APIs like GetXAPI.
- Official X API v2 operators — a much smaller subset. Missing key operators like
min_faves:,min_retweets:,within_time:, andfilter:blue_verified.
If you're using the official X API v2, half the operators below will silently be ignored. If you're using GetXAPI's Advanced Search, all of them work.
1. Keyword and Boolean Logic
These are the basic building blocks of every search.
| Operator | What it does | Example |
|---|---|---|
word1 word2 |
Implicit AND — both words required | nasa space |
word1 OR word2 |
Either word (OR must be UPPERCASE) | nasa OR spacex |
"exact phrase" |
Exact phrase match (also disables spell-correction) | "state of the art" |
"phrase with * wildcard" |
Wildcard inside quoted phrase | "this is the * time" |
+term |
Force exact term, disable spell-correction | +radiooooo |
-term |
Exclude term | crypto -bitcoin |
-"phrase" |
Exclude phrase | -"live laugh love" |
#hashtag |
Match hashtag | #web3 |
$TICKER |
Cashtag (stock ticker) | $TSLA |
url:domain.com |
Match tokenized URL in tweet | url:youtube.com |
:) or :( |
Positive/negative emoticon sentiment | iphone :( |
Tip: The AND operator is implicit. Writing (nasa esa) and nasa esa returns the same results.
Tip: For domains with hyphens, replace hyphens with underscores: url:t_mobile.com.
2. User Filters
Filter by who sent the tweet or who's mentioned.
| Operator | What it does | Example |
|---|---|---|
from:username |
Tweets authored by user | from:elonmusk |
to:username |
Replies directed at user | to:elonmusk |
@username |
Tweet mentions user (author or reply) | @elonmusk |
@username -from:username |
Mentions-only (excluding their own tweets) | @elonmusk -from:elonmusk |
list:handle/listname |
Tweets from list members | list:nasa/astronauts |
list:<listId> |
Tweets from list by numeric ID | list:715919216927322112 |
filter:verified |
Legacy verified accounts | AI filter:verified |
filter:blue_verified |
X Premium (paid) verified | AI filter:blue_verified |
filter:follows |
Only accounts you follow | crypto filter:follows |
Note: list: and filter:follows cannot be negated. You can't write -list:nasa/astronauts.
Note: To isolate legacy (pre-Blue) verified accounts, combine: filter:verified -filter:blue_verified.
3. Date and Time Filters
This is where programmatic search gets powerful — especially for dealing with Twitter's broken pagination (more on that below).
| Operator | What it does | Example |
|---|---|---|
since:YYYY-MM-DD |
On or after date (inclusive) | since:2025-01-31 |
until:YYYY-MM-DD |
Before date (exclusive) | until:2025-12-31 |
since:YYYY-MM-DD_HH:MM:SS_UTC |
Precise timestamp with timezone | since:2025-01-31_12:00:00_UTC |
since_time:<unix> |
Unix epoch seconds start | since_time:1700000000 |
until_time:<unix> |
Unix epoch seconds end | until_time:1700086400 |
since_id:<tweet_id> |
From tweet ID onward (uses Snowflake ordering) | since_id:1234567890 |
max_id:<tweet_id> |
Up to tweet ID | max_id:1234567890 |
within_time:2d |
Rolling window (2 days) | bitcoin within_time:2d |
within_time:3h / 5m / 30s |
Hours / minutes / seconds | within_time:5m |
Critical caveat: Time operators must be combined with another operator. since:2025-01-01 alone won't work; pair it with a keyword, user, or hashtag.
Time precision tip: If results are changing by the minute (trending topics, breaking news), use _HH:MM:SS_UTC format to get sub-hour granularity.
Start building with GetXAPI
$0.05 per 1,000 tweets. $0.10 free credits. No credit card required.
4. Engagement Filters (API-exclusive advantage)
These are the single biggest reason developers scrape Twitter instead of using the official API. The X API v2 does not support any of these operators.
| Operator | What it does | Example |
|---|---|---|
min_faves:N |
At least N likes | AI min_faves:1000 |
min_retweets:N |
At least N retweets | crypto min_retweets:100 |
min_replies:N |
At least N replies | bitcoin min_replies:50 |
-min_faves:N |
Less than N likes (max threshold) | -min_faves:10 |
-min_retweets:N |
Less than N retweets | -min_retweets:5 |
-min_replies:N |
Less than N replies | -min_replies:0 |
filter:has_engagement |
Any engagement (likes, RTs, replies, quotes) | from:elonmusk filter:has_engagement |
-filter:has_engagement |
Zero-engagement tweets | from:me -filter:has_engagement |
Real-world example: Find viral tweets from any account about AI in 2026: AI since:2026-01-01 min_faves:5000 lang:en.
5. Tweet Type Filters
Filter by whether it's a reply, retweet, quote, or part of a thread.
| Operator | What it does |
|---|---|
filter:replies |
Tweet is a reply |
-filter:replies |
Exclude replies |
filter:self_threads |
Self-reply threads (Twitter threads) |
filter:quote |
Tweet contains a quoted tweet |
filter:retweets |
Old-style "RT" + quote tweets |
filter:nativeretweets |
RT-button retweets (only last 7–10 days) |
include:nativeretweets |
Include retweets (excluded by default) |
conversation_id:<tweet_id> |
All tweets in a specific conversation |
quoted_tweet_id:<tweet_id> |
Tweets quoting a specific tweet |
quoted_user_id:<user_id> |
Tweets quoting a specific user |
Note: filter:nativeretweets and include:nativeretweets only work for approximately the last 7–10 days. For older retweets, use filter:retweets.
6. Media Filters
Filter by attached media type.
| Operator | What it does |
|---|---|
filter:media |
Any media attached |
filter:images |
Has an image (any source) |
filter:twimg |
Native Twitter images only (pic.twitter.com) |
filter:videos |
Any video (including YouTube embeds) |
filter:native_video |
Twitter-hosted video |
filter:consumer_video |
Standard native Twitter video |
filter:pro_video |
Amplify / pro video |
filter:spaces |
Twitter Spaces (audio) |
filter:links |
Any URL |
filter:hashtags |
Contains a hashtag |
filter:mentions |
Contains an @mention |
filter:news |
Links to whitelisted news domains |
filter:safe |
Excludes NSFW/sensitive content |
Useful combo: from:NASA filter:media -filter:images — all NASA media except images (i.e., videos and GIFs).
7. Language Filters
| Operator | What it does |
|---|---|
lang:en |
English |
lang:es |
Spanish |
lang:ja |
Japanese |
lang:hi |
Hindi |
lang:fr, lang:de, lang:pt, lang:ru, lang:zh, lang:ar, lang:ko, etc. |
ISO 639-1 two-letter codes |
Special pseudo-languages (rarely documented)
These are unique Twitter codes that classify tweets by content type rather than language:
| Code | Matches tweets that contain only |
|---|---|
lang:und |
Undefined / unclassifiable language |
lang:qam |
@mentions (no other content) |
lang:qct |
Cashtags (no other content) |
lang:qht |
Hashtags (no other content) |
lang:qme |
Media links (no other content) |
lang:qst |
Very short text (usually <3 chars) |
lang:zxx |
Media/cards with no text |
Why this matters: Want to find tweets that are just an image and nothing else? Use from:user lang:zxx filter:images. Zero noise.
8. Geo Filters
| Operator | What it does |
|---|---|
near:"City Name" |
Geotagged in city |
near:me |
Near your location |
within:10km |
Radius modifier (km or mi) |
geocode:37.7764,-122.4172,10km |
Lat/long/radius |
place:<Place ID> |
Twitter Place Object |
Warning: Twitter phased out exact-coordinate geotagging for most text tweets. Geo operators now have significantly reduced coverage and should not be relied upon for comprehensive results.
9. App / Source Filters
Filter by which client posted the tweet.
| Operator | What it does |
|---|---|
source:twitter_for_iphone |
Posted from iPhone |
source:twitter_for_android |
Posted from Android |
source:twitter_web_app |
Posted from web |
source:tweetdeck |
Posted from TweetDeck |
source:twitter_ads |
Paid promoted tweet |
Syntax note: Replace spaces and hyphens with underscores. Twitter for iPhone becomes twitter_for_iphone.
The cheapest Twitter API. Try it free.
$0.05 per 1,000 tweets. $0.10 free credits. No credit card required.
10. Combining operators (examples)
The real power is in combinations. Here are examples of high-signal queries:
| Query | What it finds |
|---|---|
from:elonmusk min_faves:50000 since:2026-01-01 |
Elon's most viral 2026 tweets |
(bitcoin OR eth) min_faves:1000 lang:en -filter:retweets |
Popular English crypto tweets (no RTs) |
"$NVDA" filter:blue_verified min_replies:20 |
NVDA discussion from verified users with engagement |
#AI filter:images min_faves:100 since:2026-01-01 |
Popular AI tweets with images in 2026 |
from:NASA filter:media -filter:images |
NASA videos and GIFs |
list:nasa/astronauts since:2026-01-01 lang:en |
Recent tweets from astronaut list |
to:openai min_faves:10 |
Engaging replies directed at OpenAI |
conversation_id:1234567890 |
Full thread around a tweet |
Operators that are unreliable or broken in 2026
Knowing what doesn't work saves hours of debugging:
| Operator | Status | Why |
|---|---|---|
filter:vine |
Historical only | Vine shut down in 2017 |
filter:periscope |
Historical only | Periscope shut down in 2021 |
near:, within:, geocode: |
Reduced coverage | Exact geo deprecated for most tweets |
filter:nativeretweets |
7–10 day window only | Twitter's retention limit |
card_name:* |
7–8 day window only | Short retention |
filter:verified |
Behaves inconsistently | Conflated with Blue post-rebrand |
Operator cap: Twitter limits you to approximately 22–23 operators per query. Longer queries silently fail.
Using the Twitter Search API in code
GetXAPI's Advanced Search endpoint passes all the web search operators through — no limits, no tier restrictions, no $200/month minimum like the official API.
| Detail | Value |
|---|---|
| Endpoint | GET /twitter/tweet/advanced_search |
| Base URL | https://api.getxapi.com |
| Query param | q (URL-encoded operator string) |
| Product param | product=Latest (default) or product=Top |
| Price | $0.001 per call (~20 tweets) |
| Rate limit | 50 calls per 15-minute window |
| Pagination | Cursor-based — pass next_cursor to cursor param |
| Auth | Authorization: Bearer <YOUR_API_KEY> |
curl
curl "https://api.getxapi.com/twitter/tweet/advanced_search?q=AI+min_faves%3A1000+since%3A2026-01-01&product=Latest" \
-H "Authorization: Bearer YOUR_API_KEY"
Python
import requests
API_KEY = "YOUR_API_KEY"
resp = requests.get(
"https://api.getxapi.com/twitter/tweet/advanced_search",
params={
"q": "AI min_faves:1000 since:2026-01-01",
"product": "Latest",
},
headers={"Authorization": f"Bearer {API_KEY}"},
)
data = resp.json()
print(f"{len(data['tweets'])} tweets, has_more={data.get('has_more')}")
JavaScript / Node.js
const params = new URLSearchParams({
q: "AI min_faves:1000 since:2026-01-01",
product: "Latest",
});
const res = await fetch(
`https://api.getxapi.com/twitter/tweet/advanced_search?${params}`,
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
const data = await res.json();
console.log(`${data.tweets.length} tweets, has_more=${data.has_more}`);
The response returns a standard { tweets: [...], next_cursor, has_more } shape — same fields as the official API. To paginate, pass the previous response's next_cursor as the cursor param on the next call.
The date-range chunking workaround
As of 2026, Twitter's cursor pagination for Advanced Search is broken upstream. Deep pagination — pulling 10+ pages of results — often returns duplicates or stops early. This isn't a GetXAPI issue; it's a Twitter-side bug that every scraping API inherits.
The workaround: Don't rely on deep pagination. Split your query into date-range chunks instead.
Instead of one big query that paginates for 50 pages, run multiple smaller queries each covering a shorter time range:
q=AI min_faves:100 lang:en since:2026-01-01 until:2026-01-08q=AI min_faves:100 lang:en since:2026-01-08 until:2026-01-15q=AI min_faves:100 lang:en since:2026-01-15 until:2026-01-22
Each chunk gets a fresh cursor chain. For rapidly changing results, drop to hourly chunks using full timestamp precision: since:2026-01-01_12:00:00_UTC until:2026-01-01_13:00:00_UTC.
This pattern is more reliable than deep pagination and gives you predictable, reproducible results.
Quick reference cheat sheet
Most-used for developers:
- User:
from:,to:,@,list: - Date:
since:,until:,within_time: - Engagement:
min_faves:,min_retweets:,min_replies: - Type:
filter:replies,filter:media,filter:quote - Language:
lang:en,lang:zxx(media-only) - Exclude:
-word,-"phrase",-filter:retweets
Hot combo for lead generation:
#yourkeyword min_faves:10 lang:en -filter:retweets since:2026-01-01
Hot combo for sentiment analysis:
$TICKER (":)" OR ":(") min_faves:5 lang:en since:2026-01-01
Hot combo for competitor monitoring:
@competitor -from:competitor filter:has_engagement since:2026-01-01
Start using these operators
Advanced search operators unlock ~10x the filtering capability of the official X API. GetXAPI gives you $0.10 in free credits — enough to test every operator in this guide.
- Sign up at getxapi.com — instant API key, no developer account needed
- Call
GET /twitter/tweet/advanced_searchwith your operator query in theqparameter - Read the full API docs for pagination, rate limits, and response schema
For the complete operator reference (including obscure ones this guide doesn't cover), check the community-maintained twitter-advanced-search repository on GitHub.
Frequently Asked Questions
The Twitter Search API is the umbrella term for any programmatic way to query Twitter's search index. In 2026, the cheapest production-ready option is GetXAPI's `/twitter/tweet/advanced_search` endpoint at $0.001 per call (~20 tweets), with the full web operator set passed through. The official X API v2's `/2/tweets/search/recent` is also a search API but at $0.005 per post read with limited operator support.
The official X API has no meaningful free tier in 2026 — search reads cost $0.005 per post. GetXAPI gives every new account $0.10 in free credits at signup with no credit card, which covers ~100 search calls (~2,000 tweets) — enough to validate the API before committing.
Engagement filters like `min_faves:`, `min_retweets:`, and `min_replies:` are supported on Twitter's web search and on GetXAPI's advanced search endpoint, but **not** on the official X API v2. This is a long-standing gap that makes the official API significantly less useful for filtering by engagement. GetXAPI's endpoint passes these operators through.
The official X API enforces a 450-request-per-15-min window on search. GetXAPI's `advanced_search` endpoint has a 50-call-per-15-min platform limit (most workloads stay well under this) — see the [Twitter API rate limits comparison](/twitter-api-rate-limits) for endpoint-by-endpoint detail.
`pip install requests`, send a `GET` to `https://api.getxapi.com/twitter/tweet/advanced_search` with your query in the `q` param and your API key in the `Authorization: Bearer ...` header. Full Python tutorial with retry, pagination, and async examples is in the [Python Twitter API tutorial](/blogs/python-twitter-api-tutorial).
The Twitter API v2 `/2/tweets/search/recent` endpoint is one specific search API. GetXAPI's `/twitter/tweet/advanced_search` is a separate Twitter Search API with different economics (100x cheaper) and broader operator support (full web search operator set vs the limited v2 operators). For full v2 vs GetXAPI comparison, see [Twitter API v2 vs GetXAPI](/blogs/twitter-api-v2-vs-getxapi).
Use cursor-based pagination: pass the previous response's `next_cursor` to the `cursor` param on the next call, and check `has_more` to know when to stop. For deep pagination (50+ pages), split the query into date-range chunks using `since:` and `until:` to avoid duplicate or stalled results — see the date-range chunking section above.
Check out similar blogs
More guides on the Twitter/X API, scraping, and pricing.







