Twitter Advanced Search Operators
Search Operators
Users
from:user— Sent by a particular@usernamee.g."dogs from:NASA"to:user— Replying to a particular@username@user— Mentioning a particular@username. Combine with-from:usernameto get only mentionslist:715919216927322112orlist:esa/astronauts— Tweets from members of this public list. Use the list ID from the API or with urls liketwitter.com/i/lists/715919216927322112. List slug is for old list urls liketwitter.com/esa/lists/astronauts. Cannot be negated, so you can’t search for “not on list”.filter:blue_verified— From “verified” users that paid $8 for Twitter Blue
Tweet Type
filter:nativeretweets— Only retweets created using the retweet button. Works well combined withfrom:to show only retweets. Only works within the last 7-10 days or so.include:nativeretweets— Native retweets are excluded by default. This shows them. In contrast tofilter:, which shows only retweets, this includes retweets in addition to other tweets. Only works within the last 7-10 days or so.filter:retweets— Old style retweets (“RT”) + quoted tweets.filter:replies— Tweet is a reply to another Tweet. Good for finding conversations, or threads if you add or removeto:userfilter:self_threads— Only self-replies. Tweets that are part of a thread, not replies in other conversations.conversation_id:tweet_id— Tweets that are part of a thread (direct replies and other replies)filter:quote— Contain Quote Tweetsquoted_tweet_id:tweet_id— Search for quotes of a specific tweetquoted_user_id:user_id— Search for all quotes of a specific user, by numeric User ID
Date & Time
until:2021-12-31— Before (NOT inclusive) a specified date. Combine with a “since” operator for dates between.since:2021-12-31_23:59:59_UTC— On or after (inclusive) a specified date and time in the specified timezone. 4-digit year, 2-digit month, 2-digit day separated by-dashes, an_underscore separating the 24-hour clock format hours:minutes:seconds and timezone abbreviation.until:2021-12-31_23:59:59_UTC— Before (NOT inclusive) a specified date and time in the specified timezone. Combine with a “since” operator for dates between.since_time:1142974200— On or after a specified Unix timestamp in seconds. Combine with the “until” operator for dates between. Maybe easier to use thansince_idbelow.until_time:1142974215— Before a specified Unix timestamp in seconds. Combine with a “since” operator for dates between. Maybe easier to use thanmax_idbelow.since_id:tweet_id— After (NOT inclusive) a specified Tweet IDmax_id:tweet_id— At or before (inclusive) a specified Tweet IDwithin_time:2dorwithin_time:3horwithin_time:5morwithin_time:30s— Search within the last number of days, hours, minutes, or seconds
Tweet Content
url:google.com— urls 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.comshortener fortheguardian.com. When searching for domains with hyphens in them, you have to replace the hyphen with an underscore (likeurl:t_mobile.com) but underscores_are also tokenized out, and may not matchlang:en— Search for tweets in specified language, not always accurate
Geo
near:city— Geotagged in this place. Also supports phrases, eg:near:"The Hague"within:radius— Within a specific radius of the “near” operator, to apply a limit. Can use km or mi. e.g.fire near:san-francisco within:10kmgeocode:lat,long,radius— E.g., to get tweets 10km around Twitter’s HQ, usegeocode:37.7764685,-122.4172004,10kmplace:96683cc9126741d1— Search tweets by place object ID, e.g.: USA Place ID is96683cc9126741d1
Engagement Filters
filter:has_engagement— Has some engagement (replies, likes, retweets). Can be negated to find tweets with no engagement. Note all of these are mutually exclusive withfilter:nativeretweetsorinclude:nativeretweets, as they apply to the retweet, not the original tweet, so they won’t work as expected.min_retweets:5— A minimum number of Retweets. Counts seem to be approximate for larger (1000+) values.min_faves:10— A minimum number of Likesmin_replies:100— A minimum number of replies-min_retweets:500— A maximum number of Retweets-min_faves:500— A maximum number of Likes-min_replies:100— A maximum number of replies
Media
filter:media— All media types.filter:twimg— Native Twitter images (pic.twitter.comlinks)filter:images— All images.filter:videos— All video types, including native Twitter video and external sources such as YouTube.filter:periscope— Periscopesfilter:native_video— All Twitter-owned video types (native video, vine, periscope)filter:vine— Vines (RIP)filter:consumer_video— Twitter native video onlyfilter:pro_video— Twitter pro video (Amplify) onlyfilter:spaces— Twitter Spaces onlyfilter:links— Only containing some URL, includes media. Use-filter:mediafor urls that aren’t mediafilter:mentions— Containing any sort of@mentionsfilter:news— Containing a link to a news story. Combine with a list operator to narrow the user set down furtherfilter:safe— Excluding NSFW content. Excludes content that users have marked as “Potentially Sensitive”. Doesn’t always guarantee SFW results.filter:hashtags— Only Tweets with Hashtags.
Where these operators work
- Get search results — site-wide Twitter/X search
- Get community search results — search within a community
- Create search monitor — get a webhook when a new tweet matches your query