Twitter's search bar is a powerful tool. Here are the essential operators to know to use it well.
For each of the operators, called Twitter Search Operators in English, you will find an explanation and an example in the form of a link, on which you can click, to try it live.
Operators are infinitely combinable.
The basic operators
Here are the basic operators.
Twitter account
To search for a particular account or to search for tweets where this account is mentioned, you must add a @ in front of the username of the account in question.
Example : @Twitter
hashtag
To search for tweets that contain a particular hashtag, simply put the hashtag preceded by #.
Example : #snow
Advanced Operators
To deepen a search, there are operators that add conditions in the search. Here are the most important.
Exact Phrase
To search for an exact term made up of several words, put these words between quotation marks.
Example : “flower garden”
Contains two or more terms
To obtain results that contain two or more terms, regardless of the order, simply write the terms without any particular formatting.
Example : flower garden
Exclude a word
When performing a search, you can choose to exclude all results that contain a particular word. To do this, you must add a - before the word to exclude.
Example : “flower garden” -fountain
Contains either term
You can decide that the results contain one of two or more terms. To do this, we must separate these terms by GOLD.
Example : garden OR fountain
Unknown word
When you no longer remember a word in an expression or when you want to search for all the variants of this expression by replacing the word with another, you must put a * instead of the word in question. To force the search for the exact phrase, don't forget to add quotes.
Example : “look for noon at *hours”
Specific operators
There are other types of separators that can target characteristics related to tweets, such as date, location and many more. Here are the main ones.
Date
To search for tweets from a date, use since: followed by the date in English (YEAR-MONTH-DAY)
Example : bitcoin since:2022-11-01
To search up to a certain date, you must put until: followed by the date in English.
Example : bitcoinuntil:2022-11-01
To search between two dates, you must combine the two previous operators.
Example : bitcoin since:2008-07-01 until:2009-06-30
Author
To find tweets that were posted by a particular Twitter account, just type in your search term and add from: followed by the username of the account you want to target.
Example : seo from:Google
It is also possible to do the reverse by searching for tweets that were not posted by this account, using -from: followed by the username.
Example : seo-from:Google
RECIPIENT
It is possible to search for tweets that are intended for a particular account. To do this, add to: followed by the name of the target account.
Example : twitter files to:ElonMusk
Language
To search for tweets in a particular language, add after your search language: followed by the language code. The language code must be 2 characters long. List of codes.
Example : search engine optimization lang:es
Geolocation
To make tweets posted from a location stand out, add near: location tracking.
Example : flower near:marseille
You can also set the distance around this location by adding after within: followed by distance (in km or mi).
Example : flower near:marseille within:5km
Tweet popularity
You can search for tweets by their number of replies, adding min_replies: followed by the minimum number of desired responses.
Example : foot min_replies:1000
The same is possible for the minimum number of times a tweet has been added to favorites (bookmarks), with min_faves:
Example : football min_faves:1000
Attached object
This very powerful function allows you to filter by type of object attached to a tweet. add filter: of the desired type.
Example : html filter:images
List of filters:
- safe: display non-sensitive tweets.
- media: display tweets containing an image or video.
- native_video: Show tweets containing a downloaded video, Amplify, Periscope, or Vine video.
- periscope: contains Periscope video
- vine: contains a Vine video
- images: contains one or more photos
interrogative tweet
To make tweets that ask a question about a topic stand out, add a interrogation point at the end of the query.
Example : Google ?
Positive tweet
To make positive tweets stand out, add : ) at the end of the query.
Example : Google : )
Note: do not put a space between the colon and the parenthesis, I put one here to prevent it from displaying an emoji
Negative tweet
To make positive tweets stand out, add : ( at the end of the query.
Example : Google : (
Note: do not put a space between the colon and the parenthesis, I put one here to prevent it from displaying an emoji
URLs
You can search for tweets containing a URL that itself contains a particular keyword as follows: add url: followed by the keyword.
Example : seo url:marketing
Example by combining operators
Context :
Let's admit that I wonder to what extent the OpenClassrooms school acts for the training and the job market for women. So I decide to go on Twitter and do a search through recent posts from Openclassrooms. Here is the search I am doing:
Query : women from:OCFrance since:2022-01-01 filter:images (click to see results)
Explanations:
- I'm looking for the termwomen”
- I only display tweets posted by OpenClassrooms”from:OCFrance“
- with a date greater than January 1, 2022 “since:2022-01-01“
- and for fun I decide to display only the images “filter:images“.
Well I admit I wanted to advertise them, as I like the philosophy of this school, and if it can motivate some to get into digital and tech... 😜
I hope these tips will help you take full advantage of the potential of Twitter's search bar.
Source and full list: Search operators (Twitter Documentation)