Free tool · no login · runs in your browser

Twitter Advanced Search Builder

Fill in what you're looking for and get the exact X search query, ready to paste into X or to run through an API. Got a query already? Paste it into the explainer below the builder and every operator is spelled out.

Start from a common search

01 · Words

e.g. launch rocket

Joined with OR

Any of them; # optional

02 · Accounts

Handles or profile URLs

03 · Post type

Replies
Links
Media
Retweets

04 · Engagement

05 · Time

e.g. 24h, 30m, 7d

06 · Place & extras

Only matches geotagged posts

e.g. 10km or 5mi

e.g. url:github.com conversation_id:…

Your query

Sort
Fill in any field — the query builds here as you type.
Search on X ↗

Searching on X needs a logged-in account. The same query string works unchanged in the API below.

Run it as code

import os, requests

params = {"query": "from:NASA", "queryType": "Latest"}
tweets = []
while True:
    r = requests.get(
        "https://api.twitterapi.io/twitter/tweet/advanced_search",
        headers={"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]},
        params=params, timeout=30,
    )
    r.raise_for_status()
    page = r.json()
    tweets += page.get("tweets", [])
    if not page.get("has_next_page") or len(tweets) >= 1000:
        break
    params["cursor"] = page["next_cursor"]

print(len(tweets), "posts")
≈ $1.50 here · $50.00 on X's API

Explain a query

Paste any X search string — from a colleague, a saved search or an old script — to see what each part does.

Twitter advanced search operators

Every operator the builder writes, plus the ones worth typing by hand. They go straight into the X search box, into the advanced-search URL and into the query parameter of our advanced search API unchanged. The set is cross-checked against the community-maintained igorbrigadir/twitter-advanced-search reference; X doesn't publish an official list for web search. For a deeper, code-per-operator lookup see the search operators API reference.

Words

OperatorExampleWhat it does
word wordnasa launchBoth words (AND is the default)
"exact phrase""machine learning"The exact phrase, in order
a OR bnasa OR spacexEither word
-wordnasa -shuttleLeaves out posts with the word
( )(nasa OR spacex) launchGroups terms so OR stays inside the group
#hashtag / $cashtag#webdev $TSLAHashtag or stock cashtag
url:url:github.comPosts linking to a domain

Accounts

OperatorExampleWhat it does
from:from:nasaWritten by the account
to:to:nasaReplies to the account
@@nasa -from:nasaMentions the account (minus its own posts)
list:list:esa/astronautsPosts by members of a public list
filter:blue_verifiedai filter:blue_verifiedOnly accounts with a paid blue check

Time

OperatorExampleWhat it does
since:since:2026-01-01On or after the date (UTC, inclusive)
until:until:2026-02-01Before the date (UTC, exclusive)
within_time:within_time:24hThe last N seconds, minutes, hours or days
since_id: / max_id:since_id:2105447600747446271Bounds by post ID — see the timestamp tool

Engagement

OperatorExampleWhat it does
min_faves:min_faves:100At least N likes
min_retweets:min_retweets:50At least N reposts
min_replies:min_replies:25At least N replies
-min_faves:-min_faves:500At most N likes (negated minimum)

Post type

OperatorExampleWhat it does
filter:repliesfrom:nasa filter:repliesOnly replies (-filter:replies removes them)
filter:media / images / videoscats filter:imagesPosts with media of that kind
filter:linksnews filter:linksPosts containing a URL (media counts)
include:nativeretweetsfrom:nasa include:nativeretweetsAdds button retweets, left out by default
filter:nativeretweetsfrom:nasa filter:nativeretweetsOnly button retweets (about 7-10 days kept)
filter:quotefrom:nasa filter:quoteOnly quote posts
conversation_id:conversation_id:1234567890Posts in one thread
filter:safenasa filter:safeLeaves out posts marked sensitive

Language & place

OperatorExampleWhat it does
lang:lang:jaPosts X detects as that language
near: + within:near:"New York" within:10miGeotagged posts near a place

What we checked against live results

Operator lists online are often years old, so we ran two of the builder's presets through our own /twitter/tweet/advanced_search endpoint and read every post on the first page:

  • from:NASA filter:images min_faves:1000 since:2026-10-01 until:2026-11-01 -filter:replies — 20 of 20 posts had an image, at least 1,000 likes, were not replies and were dated 1-31 October 2026 UTC (none on 1 November, confirming that until: is exclusive).
  • openai filter:blue_verified lang:en -filter:replies — 20 of 20 authors had a blue check and no post was a reply.

Two operators behave differently from what older guides say: is:retweet belongs to X's paid v2 API, not to web search (use filter:nativeretweets), and filter:verified refers to legacy verification, so filter:blue_verified is the one that matches today's blue checks.

Five things that trip people up

  1. The end date is exclusive. until:2026-11-01 stops at 23:59:59 UTC on 31 October. Searching one day needs two different dates. The search-by-date guide walks through time zones.
  2. Retweets are hidden by default, and button retweets drop out of search after about 7-10 days.
  3. Top and Latest return different sets. Top is ranked and heavily trimmed; use Latest (the builder's default, f=live in the URL) when you need everything that matches.
  4. Words match more than the text. A plain keyword also matches the author's name, handle and expanded links, which is why nasa returns posts that never say "nasa".
  5. Search on X needs a login, and long result lists have to be scrolled by hand. If search itself returns nothing, check the search-not-working fixes.

Run advanced search from code

The X search page is fine for a look; for monitoring, research exports or a dashboard you need the results as data. Our /twitter/tweet/advanced_search endpoint takes the same query string and returns JSON with each post's text, author, counts and media, about 20 posts per page with a cursor for the next. Based on anonymized, aggregated API usage on TwitterAPI.io, it is the most-used endpoint on the platform. Three examples (set TWITTERAPI_IO_KEY first):

1. An account's high-engagement posts on a topic over a year

import os, requests

def search(query, max_pages=10):
    tweets, params = [], {"query": query, "queryType": "Latest"}
    for _ in range(max_pages):
        r = requests.get(
            "https://api.twitterapi.io/twitter/tweet/advanced_search",
            headers={"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]},
            params=params, timeout=30,
        )
        r.raise_for_status()
        page = r.json()
        tweets += page.get("tweets", [])
        if not page.get("has_next_page"):
            break
        params["cursor"] = page["next_cursor"]
    return tweets

posts = search('from:elonmusk (AI OR "machine learning") since:2025-01-01 until:2026-01-01 min_faves:10000')
for t in posts[:5]:
    print(f"{t['likeCount']:,} likes  {t['text'][:80]}")

2. Blue-check commentary on a topic, replies included

posts = search('"AI safety" filter:blue_verified filter:replies min_replies:20 lang:en', max_pages=3)
for t in posts[:10]:
    print(f"@{t['author']['userName']}: {t['text'][:100]}  ({t['replyCount']} replies)")

3. Brand mentions from the last 24 hours, for an hourly job

posts = search('"your brand" -from:yourbrand within_time:24h -filter:nativeretweets', max_pages=5)
print(len(posts), "mentions in the last 24h")

Cost for the same pull: $0.15 per 1,000 posts returned on TwitterAPI.io (pricing) versus $0.005 per post read on X's pay-per-use API (docs.x.com pricing, which notes prices may change) — $1.50 against $50 for 10,000 posts, about 33× less. The cost line under the builder's code does this sum for your own volume.

X search page, X API or TwitterAPI.io

Compared onx.com searchX API (pay-per-use)TwitterAPI.io
Query syntaxWeb operatorsv2 operators (is:retweet, has:media…)Web operators, as built above
NeedsA logged-in X accountDeveloper account + app keysAn API key (Google sign-in)
OutputA page to scrollJSONJSON, cursor pagination
Cost per 10,000 postsFree, scrolled by hand$50$1.50
Best forOne-off lookupsTeams already on X's platformMonitoring, research, dashboards

Queries for common jobs

  • Brand monitoring — "your brand" -from:yourbrand min_faves:5 -filter:nativeretweets · poll hourly; add lang:en for English only open in builder
  • Competitor activity — from:competitor -filter:replies since:2026-10-01 · sort by likes to see what landed open in builder
  • Sentiment research — "topic" (love OR great OR hate OR worst) min_faves:5 lang:en · feed the text to a classifier open in builder
  • Archive pull — from:account since:2025-01-01 until:2026-01-01 · paginate; about $0.15 per 1,000 posts open in builder
  • Expert voices — "topic" filter:blue_verified min_replies:50 lang:en · group by author open in builder
  • Customer support — @yourbrand (help OR broken OR refund) -from:yourbrand · route to your support queue open in builder

Questions

Where is advanced search on X (Twitter)?

On the web it lives at x.com/search-advanced, and it only works while you are logged in. The form builds the same operator string this tool builds; this page adds operators the official form doesn't offer (engagement minimums, retweet and verification filters, relative time) and explains queries you paste in.

Why does my date search miss the last day?

until: is exclusive. since:2026-10-01 until:2026-10-31 stops at the end of 30 October. To include all of October, use until:2026-11-01. Both dates are read as UTC midnight unless you add a time, e.g. since:2026-10-01_09:00:00_UTC.

Why are retweets missing from my results?

X search leaves out button retweets by default. Add include:nativeretweets to keep them, or filter:nativeretweets to see only them. Search only keeps native retweets for roughly the last 7-10 days.

Can I run Twitter advanced search through an API?

Yes. TwitterAPI.io's /twitter/tweet/advanced_search endpoint takes the same query string in its query parameter, returns JSON with the full post object, and pages through results with a cursor. It costs $0.15 per 1,000 posts returned, with no X developer account needed.

Does near: find every post from a city?

No. near: and within: only match posts that carry location data, which most posts don't. For local monitoring, combining a place name as a keyword with lang: usually returns far more than a geo filter.

Related

Need the results as data?

Run any query from this page over a REST API. Google sign-in, free starter credits.

Get an API key