Skip to main content
X search operators are special keywords and symbols that filter tweets by author, date, engagement, media type, language, location, and other attributes. Every operator on this page works in the query field of the Search Tweets endpoint and on x.com.
Note: For a complete guide with copy-paste recipes, production code examples (Python and JavaScript with pagination), and a side-by-side comparison against the official X API v2 operator set, see the Twitter Search Operators Complete Cheat Sheet on the blog.

Syntax basics

  • Spaces between terms act as implicit AND
  • OR must be uppercase
  • Use a leading dash (-) to exclude a term, phrase, or operator
  • Group expressions with parentheses
  • Wrap exact phrases in double quotes
Operators can be combined freely up to roughly 22-23 operators per query. AND binds tighter than OR: cat OR black dog is evaluated as cat OR (black dog). Use parentheses to eliminate ambiguity.

Free Visual Query Builder

If you don’t want to assemble operator strings by hand, use the Sorsa Search Builder. It is a free, no-login tool with a graphical interface where you toggle filters and preview the generated query string before integrating it into your code.

1. Keyword and Boolean Logic

OperatorDescriptionExample
keyword keywordTweets containing both terms (implicit AND).nasa esa
keyword OR keywordTweets containing either term. OR must be uppercase.bitcoin OR ethereum
"exact phrase"Tweets containing the exact phrase. Also prevents auto-correction."state of the art"
-keywordExcludes tweets containing the term, phrase, or operator.crypto -scam
( )Groups terms for complex Boolean logic.(AI OR "machine learning") lang:en
"word * word"Wildcard inside a quoted phrase. The * replaces any single word."this is the * time"
+wordForces exact match, preventing auto-correction and stemming.+radiooooo
#hashtagMatches a specific hashtag.#tgif
$cashtagMatches a stock or crypto symbol.$TSLA
Plurals match their singulars and vice versa. Operators match against tweet body, the author’s display name, screen name, and expanded URLs inside the tweet.

2. User and Account Filters

OperatorDescriptionExample
from:usernameTweets sent by a specific account (without the @).from:elonmusk
to:usernameTweets that are replies to a specific account.to:openai
@usernameTweets that mention a specific account anywhere in the text.@sorsa_app
list:IDTweets from members of a public X List. Use the numeric List ID from the URL.list:715919216927322112
filter:verifiedOnly from legacy verified accounts (pre-2023 blue checkmarks).AI filter:verified
filter:blue_verifiedOnly from X Premium (paid Blue) subscribers.crypto filter:blue_verified
filter:followsOnly from accounts you follow. Web UI only, cannot be negated.filter:follows
filter:socialFrom your algorithmically expanded network. Works on “Top” results, not “Latest”.filter:social

3. Engagement Gating

OperatorDescriptionExample
min_faves:NMinimum number of likes.AI min_faves:100
min_retweets:NMinimum number of retweets.crypto min_retweets:50
min_replies:NMinimum number of replies."product launch" min_replies:20
-min_faves:NMaximum likes (negated form).bitcoin -min_faves:1000
-min_retweets:NMaximum retweets.news -min_retweets:500
-min_replies:NMaximum replies.tech -min_replies:100
filter:has_engagementTweets with at least one interaction. Can be negated to find zero-engagement tweets.from:username filter:has_engagement
Counts become approximate for very large values (1,000+).

4. Media and Content Type

Media filters

OperatorDescription
filter:mediaAll media types (images, video, GIFs).
filter:imagesAll images, including third-party links.
filter:twimgOnly native X images (pic.twitter.com links).
filter:videosAll video types: native X video, YouTube embeds, etc.
filter:native_videoOnly X-owned video (native uploads, legacy Vine, legacy Periscope).
filter:consumer_videoX native video only (excludes pro/Amplify).
filter:pro_videoX pro video (Amplify) only.
filter:spacesX Spaces audio content.
filter:linksTweets containing any URL. Includes media URLs, use -filter:media to isolate non-media links.
card_name:animated_gifSpecifically matches GIFs.

Tweet type filters

OperatorDescription
filter:repliesOnly tweets that are replies to another tweet.
-filter:repliesExclude replies (show only top-level original tweets).
filter:nativeretweetsOnly native retweets (created via the retweet button).
include:nativeretweetsInclude native retweets in results (excluded by default).
filter:retweetsOld-style RT retweets plus quote tweets.
-filter:retweetsExclude retweets entirely.
filter:quoteOnly quote tweets.
quoted_tweet_id:IDQuotes of a specific tweet by its ID.
quoted_user_id:IDAll quotes of a specific user by their user ID.
conversation_id:IDAll tweets in a thread (direct replies and nested replies).

Special content filters

OperatorDescription
card_name:poll2choice_text_only2-choice text polls.
card_name:poll3choice_text_only3-choice text polls.
card_name:poll4choice_text_only4-choice text polls.
card_name:poll2choice_image2-choice image polls.
filter:newsTweets linking to recognized news domains.
filter:safeExcludes NSFW or potentially sensitive content. Not a guarantee.
filter:hashtagsOnly tweets containing at least one hashtag.
filter:mentionsOnly tweets containing any @mention.

5. Date, Time, and Snowflake IDs

OperatorFormatDescription
since:YYYY-MM-DDsince:2026-01-01Tweets posted on or after this date (inclusive).
until:YYYY-MM-DDuntil:2026-03-01Tweets posted before this date (not inclusive).
since:YYYY-MM-DD_HH:MM:SS_UTCsince:2026-03-05_12:00:00_UTCPrecision timestamp with timezone.
since_time:UNIXsince_time:1142974200After a specific Unix timestamp (seconds).
until_time:UNIXuntil_time:1142974215Before a specific Unix timestamp.
within_time:Xdwithin_time:2dWithin the last X days. Also supports h, m, s.
since_id:IDsince_id:1234567890After a specific Snowflake ID (not inclusive).
max_id:IDmax_id:1234567890At or before a specific Snowflake ID (inclusive).
Snowflake ID conversion. Every tweet ID encodes its creation timestamp:
millisecond_epoch = (tweet_id >> 22) + 1288834974657
For pulling historical sets, see Historical Data.

6. Geographical Filters

OperatorDescriptionExample
near:"city"Geotagged near a named place. Supports phrases.near:"San Francisco"
near:meNear your current location (UI only).near:me
within:XkmRadius limit for near:. Accepts km or mi.earthquake near:Tokyo within:50km
geocode:lat,long,radiusPinpoint precision using coordinates.geocode:37.77,-122.41,5km
place:IDSearch by X Place Object ID.place:96683cc9126741d1
Only an estimated 1-2% of tweets carry precise geolocation data. If a tweet does not have coordinates, the API falls back to reverse-geocoding the user’s profile location.

7. Language and Source

Language

Standard ISO 639-1 codes (lang:en, lang:es, lang:fr, lang:de, lang:ja, lang:ru, etc.) plus the following X-specific codes:
CodeMeaning
lang:undUndefined language (emoji-only or media-only tweets).
lang:qmeTweets with media links only (since 2022).
lang:qstVery short text tweets.
lang:qhtTweets with hashtags only.
lang:qamTweets with mentions only.
lang:qctTweets with cashtags only.
lang:zxxTweets with media or Twitter Card only, no text.

Source (posting client)

OperatorDescriptionExample
source:client_nameFilter by the app used to post. Use underscores for spaces.source:Twitter_for_iPhone
Common values: Twitter_for_iPhone, Twitter_for_Android, Twitter_Web_App, TweetDeck, twitter_ads.

8. Card and URL Operators

OperatorDescription
card_domain:domainMatches the domain in a Twitter Card. Mostly equivalent to url:.
card_url:domainSimilar to card_domain: but may return different results.
card_name:audioTweets with Player Cards (Spotify, SoundCloud, etc.).
card_name:playerTweets with any Player Card.
card_name:summarySmall-image summary cards.
card_name:summary_large_imageLarge-image summary cards.
card_name:promo_websitePromoted website cards.
card_name:promo_image_convoConversational ad cards with images.
card_name:promo_video_convoConversational ad cards with video.
url:domainMatches URLs. Works well for domains and subdomains. Replace hyphens with underscores (e.g., url:t_mobile.com).
card_name: typically only matches tweets from the last 7-8 days.

Building queries

A practical construction order that scales:
  1. Group core keywords: (bitcoin OR ethereum OR $BTC)
  2. Add content constraints: lang:en, filter:images, -filter:replies
  3. Set engagement thresholds: min_faves:50, min_retweets:10
  4. Exclude noise: -from:spambot, -scam, -filter:retweets
  5. Add time bounds: since:2026-01-01 until:2026-03-01
For full code examples (Python and JavaScript with pagination and rate-limit handling) and 14 production-ready query recipes, see the full guide on the blog.

Known limitations

  • Operator cap: roughly 22-23 operators maximum per query.
  • Geo coverage is thin: only 1-2% of tweets have precise location data.
  • card_name: is time-limited to the past 7-8 days.
  • Private and suspended accounts are excluded from search results.
  • Language detection is imperfect for short tweets, code, or emoji-heavy posts.
  • Not all tweets are indexed. Tweets flagged for platform violations may be excluded.
  • Auto-correction happens silently in some cases. Use +word or "word" to force exact matching.
  • URL matching works for domains and subdomains but is unreliable for long URL paths.

Source

This reference draws on the maintained twitter-advanced-search repository by Igor Brigadir, the industry-standard source on undocumented X search behavior.

Next Steps