Advanced Twitter Search Operators Cheatsheet – Twitter Technical Knowledge & Research Blog (2024)

Advanced Twitter Search Operators Cheatsheet – Twitter Technical Knowledge & Research Blog (1)

by Zilvinas Kucinskas

These operators work on Web, Twitter Explore page search bar, Mobile, TweetDeck and ExportData historical tweets export page.

Tweet Content Operators

Operator

Explanation

Example

breaking news

(breaking news)

Finds tweets containing both "breaking" and "news" words. Spaces are implicit AND operators. Brackets can be used to group individual words if using other operators.?
competition OR airdropEither "competition" or "airdrop". OR must be in uppercase.?
"state of the art"The complete phrase "state of the art". Will also match "state-of-the-art". Also use quotes to prevent spelling correction.?
"this is the * time this week"A complete phrase with a wildcard. * does not work outside of a quoted phrase or without spaces.?
+radioooooForce a term to be included as-is. Useful to prevent spelling correction.?
-love
-"live laugh love"
- is used for excluding "love". Also applies to quoted phrases and other operators.?
#tgifA hashtag?
$TWTRA cashtag, like hashtags but for stock symbols?
What ?Question marks are matched?
:) OR :(Some emoticons are matched, positive :) :-) :P :D or negative :-( :(?
?Emoji searches are also matched. Usually needs another operator to work.?
url:google.comurls are tokenized and matched, works very well for subdomains and domains, not so well for long urls, depends on url. Youtube ids work well. Works for both shortened and canonical urls, eg: gu.com shortener for theguardian.com. When searching for Domains with hyphens in it, you have to replace the hyphen by an underscore (like url:t_mobile.com) but underscores _ are also tokenized out, and may not match?
lang:enSearch for tweets in specified language. Not always accurate. Language is specified in 2-letter ISO code.?

There are some special language codes that work:

  • lang:und – undefined language.
  • lang:qam – for tweets with mentions only (works for tweets since 2022-06-14).
  • lang:qct – for tweets with cashtags only (works for tweets since 2022-06-14).
  • lang:qht – for tweets with hashtags only (works for tweets since 2022-06-14).
  • lang:qme – for tweets with media links only (works for tweets since 2022-06-14).
  • lang:qst – for tweets with very short text (works for tweets since 2022-06-14).
  • lang:zxx – for tweets with either media or Twitter Card only, without any additional text (works for tweets since 2022-06-14`.

User Specific Operators

Operator

Explanation

Example

from:userSent by a particular @username e.g. "dogs from:NASA"?
to:userReplying to a particular @username?
@userMentioning a particular @username. Combine with -from:username to get only mentions?
list:108534289
list:user/list-slug
Tweets from members of this public list. Use the list ID from the API or with urls like https://twitter.com/i/lists/4143216. List slug is for old list urls like http://twitter.com/nasa/lists/astronauts. Cannot be negated, so you can’t search for "not on list".?
filter:verifiedFrom verified users?
filter:followsOnly from accounts you follow. Cannot be negated.?
filter:social
filter:trusted
Only from algorithmically expanded network of accounts based your own follows and activities. Works on "Top" results not "Latest"?

Geo Operators

Operator

Explanation

Example

near:cityGeotagged in this place. Also supports Phrases, eg: near:"The Hague"?
near:meNear where twitter thinks you are?
within:radiusWithin specific radius of the "near" operator, to apply a limit. Can use km or mi. e.g. fire near:san-francisco within:10km?
geocode:lat,long,radiusE.g., to get tweets 10km around twitters hq, use geocode:37.7764685,-122.4172004,10km?
place:96683cc9126741d1Search tweets by Place Object ID eg: USA Place ID is 96683cc9126741d1?

Time Operators

Operator

Explanation

Example

since:yyyy-mm-ddOn or after (inclusive) a specified date?
until:yyyy-mm-ddBefore (NOT inclusive) a specified date. Combine with a "since" operator for dates between.?
since_time:1142974200On or after a specified unix timestamp in seconds. Combine with the "until" operator for dates between. Maybe easier to use than since_id below.?
until_time:1142974215Before a specified unix timestamp in seconds. Combine with a "since" operator for dates between. Maybe easier to use than max_id below.?
since_id:tweet_idAfter (NOT inclusive) a specified Snowflake ID?
max_id:tweet_idAt or before (inclusive) a specified Snowflake ID (see Note below)?
within_time:2d
within_time:3h
within_time:5m
within_time:30s
Search within the last number of days, hours, minutes, or seconds?

Tweet Type Operators

Operator

Explanation

Example

filter:nativeretweetsOnly retweets created using the retweet button. Works well combined with from: to show only retweets.?
include:nativeretweetsNative retweets are excluded by default. This shows them. In contrast to filter:, which shows only retweets, this includes retweets in addition to other tweets?
filter:retweetsOld style retweets ("RT") + quoted tweets.?
filter:repliesTweet is a reply to another Tweet. good for finding conversations, or threads if you add or remove to:user?
conversation_id:tweet_idTweets that are part of a thread (direct replies and other replies)?
filter:quoteContain Quote Tweets?
quoted_tweet_id:tweet_idSearch for quotes of a specific tweet?
quoted_user_id:user_idSearch for all quotes of a specific user?
card_name:poll2choice_text_only
card_name:poll3choice_text_only
card_name:poll4choice_text_only
card_name:poll2choice_image
card_name:poll3choice_image
card_name:poll4choice_image
Tweets containing polls. For polls containing 2, 3, 4 choices, or image Polls.?

Engagement Operators

Operator

Explanation

Example

filter:has_engagementHas some engagement (replies, likes, retweets). Can be negated to find tweets with no engagement.?
min_retweets:5A minimum number of Retweets. Counts seem to be approximate for larger (1000+) values.?
min_faves:10A minimum number of Likes?
min_replies:100A minimum number of replies?
-min_retweets:500A maximum number of Retweets?
-min_faves:500A maximum number of Likes?
-min_replies:100A maximum number of replies?

Operator

Explanation

Example

filter:mediaAll media types.?
filter:twimgNative Twitter images (pic.twitter.com links)?
filter:imagesAll images.?
filter:videosAll video types, including native Twitter video and external sources such as Youtube.?
filter:periscopePeriscopes?
filter:native_videoAll Twitter-owned video types (native video, vine, periscope)?
filter:vineVines (RIP)?
filter:consumer_videoTwitter native video only?
filter:pro_videoTwitter pro video (Amplify) only?
filter:spacesTwitter Spaces only?

Filter Operators

Operator

Explanation

Example

filter:linksOnly containing some URL, includes media. use -filter:media for urls that aren’t media?
filter:mentionsContaining any sort of @mentions?
filter:newsContaining link to a news story. Combine with a list operator to narrow the user set down further.?
filter:safeExcluding NSFW content. Excludes content that users have marked as "Potentially Sensitive". Doesn’t always guarantee SFW results.?
filter:hashtagsOnly Tweets with Hashtags.?

App Specific Operators

Operator

Explanation

Example

source:client_nameSent from a specified client e.g. source:tweetdeck (See Note for common ones) eg: twitter_ads doesn’t work on it’s own, but does with another operator.?
card_domain:pscp.tvMatches domain name in a Twitter Card. Mostly equivalent to url: operator.?
card_url:pscp.tvMatches domain name in a Card, but with different results to card_domain.?
card_name:audioTweets with a Player Card (Links to Audio sources, Spotify, Soundcloud etc.)?
card_name:animated_gifTweets With GIFs?
card_name:playerTweets with a Player Card?
card_name:app
card_name:promo_image_app
Tweets with links to an App Card. promo_app does not work, promo_image_app is for an app link with a large image, usually posted in Ads.?
card_name:summaryOnly Small image summary cards?
card_name:summary_large_imageOnly large image Cards?
card_name:promo_websiteLarger than summary_large_image, usually posted via Ads?
card_name:promo_image_convo
card_name:promo_video_convo
Finds Conversational Ads cards.?
card_name:3260518932:momentFinds Moments cards. 3260518932 is the user ID of @TwitterMoments, but the search finds moments for everyone, not that specific user.?

Building queries

Searching tweets that quote specific user

In order to find all the tweets that quote a specific user, we should search for a Tweet like URL and exclude tweets from the user.

Here is an example of searching tweets that quote tweets written by @ElonMusk:

twitter.com/elonmusk/status/ -elonmusk

Negation

Most filter:type operators can also be negated using the - symbol, with exceptions such as filter:follows.

For example,from:shl filter:media -filter:images returns all tweets from @shl with all types of media except images.

Complex query example

Let’s search for mentions of “space” and either “big” or “large” by members of European Space Agency astronauts List, sent from an iPhone or twitter.com, with images, excluding mentions of #asteroid, since 2011.

space (big OR large) list:esa/astronauts (source:twitter_for_iphone OR source:twitter_web_client) filter:images since:2011-01-01 -#asteroid

Matching edge cases

  • Words might match on the user name, screen name, tweet text and url text (both shortened and expanded).
  • Top results are limited. Twitter has some kind of threshold for engagements such as retweets, replies and likes count.
  • Spelling corrections appear sometimes.
  • Plurals will match. E.g. bulls will match bull.
  • Private accounts are not included in the search index and their tweets do not appear in results.
  • Locked or suspended accounts are excluded from results.
  • Tweets might be excluded from results due to Platform Use violations or anti-spam features.
  • Twitter is interpreting some words. For instance, when you search for photo, Twitter assumes you are looking for tweets with image media. If you want to search for literal word, you need to wrap the word in double quotes like "photo".

Limitations

Here we will gather known limitations of Twitter search.

Operators

  • The maximum number of operators seems to be about 22 or 23.
  • card_name: operator works only for the last 7-8 days.

Geo searches

Very few tweets have exact geo coordinates. In June 2019, Twitter removed the ability to tag Tweets with precise location when using the Twitter iOS or Android apps.

Most people don't tag their precise location in Tweets, so we're removing this ability to simplify your Tweeting experience. You'll still be able to tag your precise location in Tweets through our updated camera. It's helpful when sharing on-the-ground moments.

— Twitter Support (@TwitterSupport) June 18, 2019

Instead, it is possible to tag tweets with a Place object. However, based on Twitter Tweet location FAQ, sharing precise location is disabled by default. Users need to opt in to use it.

According to Advanced filtering with geo data, at most 1%-2% of tweets are geo-tagged.

Resources

Advanced Twitter Search Operators Cheatsheet – Twitter Technical Knowledge & Research Blog (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Carmelo Roob

Last Updated:

Views: 5915

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.