These operators work on Web, Mobile, Tweetdeck.
There is some overlap, but largely these will not work for v1.1 Search, Premium Search, or v2 Search APIs.
Adapted from TweetDeck Help, @lucahammer Guide, @eevee Twitter Manual, @pushshift and Twitter / Tweetdeck itself. Contributions / tests, examples welcome!
nasa esa
(nasa esa)
nasa
esa
nasa OR esa
nasa
esa
"state of the art"
state of the art
state-of-the-art
"this is the * time this week"
*
+radiooooo
-love
-"live laugh love"
-
love
#tgif
$TWTR
What ?
:) OR :(
:) :-) :P :D
:-( :(
url:google.com
gu.com
theguardian.com
url:t_mobile.com
_
lang:en
lang
from:user
@username
"dogs from:NASA"
to:user
@username
@user
@username
-from:username
list:715919216927322112
list:esa/astronauts
twitter.com/i/lists/715919216927322112
twitter.com/esa/lists/astronauts
filter:verified
filter:blue_verified
filter:follows
filter:social
filter:trusted
Top
Latest
near:city
near:"The Hague"
near:me
within:radius
fire near:san-francisco within:10km
geocode:lat,long,radius
geocode:37.7764685,-122.4172004,10km
place:96683cc9126741d1
96683cc9126741d1
since:2021-12-31
-
until:2021-12-31
since:2021-12-31_23:59:59_UTC
-
_
until:2021-12-31_23:59:59_UTC
since_time:1142974200
since_id
until_time:1142974215
max_id
since_id:tweet_id
max_id:tweet_id
within_time:2d
within_time:3h
within_time:5m
within_time:30s
filter:nativeretweets
from:
include:nativeretweets
filter:
filter:retweets
filter:replies
to:user
conversation_id:tweet_id
filter:quote
quoted_tweet_id:tweet_id
quoted_user_id:user_id
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
filter:has_engagement
filter:nativeretweets
include:nativeretweets
min_retweets:5
min_faves:10
min_replies:100
-min_retweets:500
-min_faves:500
-min_replies:100
filter:media
filter:twimg
pic.twitter.com
filter:images
filter:videos
filter:periscope
filter:native_video
filter:vine
filter:consumer_video
filter:pro_video
filter:spaces
filter:links
-filter:media
filter:mentions
@mentions
filter:news
filter:safe
filter:hashtags
source:client_name
twitter_ads
card_domain:pscp.tv
url:
card_url:pscp.tv
card_domain
card_name:audio
card_name:animated_gif
card_name:player
card_name:app
card_name:promo_image_app
promo_app
promo_image_app
card_name:summary
card_name:summary_large_image
card_name:promo_website
summary_large_image
card_name:promo_image_convo
card_name:promo_video_convo
card_name:3260518932:moment
3260518932
@TwitterMoments
Matching:
url:trib.al
filter:images
filter:videos
bears
bear
-
Private accounts are not included in the search index, and their tweets do no appear in results. Locked and suspended accounts are also hidden from results. There are other situations where tweets may not appear: anti-spam measures, or tweets simply have not been indexed due to server issues.
"photo"
Building Queries:
filter:type
-
filter:follows
exclude:links
-filter:links
Example: I want Tweets from @Nasa with all types of media except images
from:NASA filter:media -filter:images
Combine complex queries together with booleans and parentheses to refine your results.
Example 1: I want mentions of either "puppy" or "kitten", with mentions of either "sweet" or "cute", excluding Retweets, with at least 10 likes.
(puppy OR kitten) AND (sweet OR cute) -filter:nativeretweets min_faves:10
Example 2: I want mentions of "space" and either "big" or "large" by members of the NASA astronauts List, sent from an iPhone or twitter.com, with images, excluding mentions of #asteroid, since 2011.
space (big OR large) list:nasa/astronauts (source:twitter_for_iphone OR source:twitter_web_client) filter:images since:2011-01-01 -#asteroid
url
https://twitter.com/NASA/status/1138631847783608321
url:1138631847783608321
site:t-mobile.com
app:Twitter for iOS
site:t_mobile.com
app:Twitter_for_iOS
Limitations:
card_name:
The maximum number of operators seems to be about 22 or 23.
All the Time operators have to be used in conjunction with something else to work.
Tweetdeck Equivalents:
Tweetdeck options for columns have equivalents you can use on web search:
filter:images
filter:videos
card_name:animated_gif
(card_domain:pscp.tv OR card_domain:periscope.tv OR "twitter.com/i/broadcasts/")
(filter:images OR filter:videos)
filter:links
Notes:
Web, Mobile, Tweetdeck Search runs on one type of system (as far as i can tell), Standard API Search is a different index, Premium Search and Enterprise Search is another separate thing based on Gnip products. API docs already exist for the API and Premium but i might add guides for those separately.
Snowflake IDs:
2010-06-01
2013-01-22
since_id
max_id
created_at
To convert a Twitter ID to millisecond epoch:
(tweet_id >> 22) + 1288834974657
Convert from epoch back to a tweet id:
(millisecond_epoch - 1288834974657) << 22 = tweet id
Here's a use case:
August 4, 2019 09:00:00 UTC
max_id
August 4, 2019 09:00:00 UTC
1564909200000
(1564909200000 - 1288834974657) << 22 = 1157939227653046272
1157939227653046272
Here's a quick Python function:
def convert_milliepoch_to_tweet_id(milliepoch): if milliepoch <= 1288834974657: raise ValueError("Date is too early (before snowflake implementation)") return (milliepoch - 1288834974657) << 22
Unfortunately, remember that JavaScript does not support 64bit integers, so these calculations and other operations on IDs often fail in unexpected ways.
More details on snowflake can be found in @pushshift document here.
Quote-Tweets
?s=20
?s=09
twitter.com/jack/status/20/ -from:jack
twitter.com/jack/status/ -from:jack
Geo Searches
Very few tweets have exact geo coordinates. Exact Geo coordinates are phased out for normal tweets, but will remain for photos: https://twitter.com/TwitterSupport/status/1141039841993355264
Tweets instead can be tagged by Place
How did I find these in the first place?
Reading Twitter Documentation and help docs from as many sources as possible - eg: Developer Documentation, Help pages, Tool-specific help pages, eg: Tweetdeck help etc. Using Share feature on tweetdeck to copy the search string. Searching google and pastebin and github for rarely documented ones together to find other lists of operators others have compiled.
Known Unknowns and Assumptions:
filter:news
lang:und
filter:safe
source:twitter_ads
url:
url:twitter.com/i/events
url:twitter.com/i/moments
url:twitter.com url:timelines
filter:safe
Supported Languages:
Language is specified as 2 letter ISO codes. Language is tagged automatically from the tweet text, nad not always accurate, see here for notes on accuracy. The list from TweetDeck dropdown menu has all of them:
lang:am Amharic (አማርኛ) lang:ar Arabic (العربية) lang:bg Bulgarian (Български) lang:bn Bengali (বাংলা) lang:bo Tibetan (བོད་སྐད) lang:ca Catalan (Català) lang:ch` Cherokee (ᏣᎳᎩ) lang:cs Czech (čeština) lang:da Danish (Dansk) lang:de German (Deutsch) lang:dv Maldivian (ދިވެހި) lang:el Greek (Ελληνικά) lang:en English (English) lang:es Spanish (Español) lang:et Estonian (eesti) lang:fa Persian (فارسی) lang:fi Finnish (Suomi) lang:fr French (Français) lang:gu Gujarati (ગુજરાતી) lang:hi Hindi (हिंदी) lang:ht Haitian Creole (Kreyòl ayisyen) lang:hu Hungarian (Magyar) lang:hy Armenian (Հայերեն) lang:in Indonesian (Bahasa Indonesia) lang:is Icelandic (Íslenska) lang:it Italian (Italiano) lang:iu Inuktitut (ᐃᓄᒃᑎᑐᑦ) lang:iw Hebrew (עברית) lang:ja Japanese (日本語) lang:ka Georgian (ქართული) lang:km Khmer (ខ្មែរ) lang:kn Kannada (ಕನ್ನಡ) lang:ko Korean (한국어) lang:lo Lao (ລາວ) lang:lt Lithuanian (Lietuvių) lang:lv Latvian (latviešu valoda) lang:ml Malayalam (മലയാളം) lang:my Myanmar (မြန်မာဘာသာ) lang:ne Nepali (नेपाली) lang:nl Dutch (Nederlands) lang:no Norwegian (Norsk) lang:or Oriya (ଓଡ଼ିଆ) lang:pa Panjabi (ਪੰਜਾਬੀ) lang:pl Polish (Polski) lang:pt Portuguese (Português) lang:ro Romanian (limba română) lang:ru Russian (Русский) lang:si Sinhala (සිංහල) lang:sk Slovak (slovenčina) lang:sl Slovene (slovenski jezik) lang:sv Swedish (Svenska) lang:ta Tamil (தமிழ்) lang:te Telugu (తెలుగు) lang:th Thai (ไทย) lang:tl Tagalog (Tagalog) lang:tr Turkish (Türkçe) lang:uk Ukrainian (українська мова) lang:ur Urdu (ﺍﺭﺩﻭ) lang:vi Vietnamese (Tiếng Việt) lang:zh Chinese (中文)
lang:chr
lang:iu
lang:sk
There are also some special language codes that work. For example:
lang:und
lang:qam
2022-06-14
lang:qct
2022-06-14
lang:qht
2022-06-14
lang:qme
2022-06-14
lang:qst
2022-06-14
lang:zxx
2022-06-14
Common clients:
source:
lang:en
twitter_web_client
twitter_web_app
twitter_for_iphone
twitter_for_ipad
twitter_for_mac
twitter_for_android
twitter_ads
tweetdeck
tweetdeck_web_app
twitter_for_advertisers
twitter_media_studio
cloudhopper (tweets via sms service)
facebook
instagram
twitterfeed
tweetbot.net
IFTTT
"LG Smart Refrigerator"
"GUCCI SmartToilet™"