Boolean search query makes it simple to find people, tweets, or articles that mention any name, keyword, company, hashtag, etc. We’ve compiled this guide to help you make the most of your search.
Selecting a term
Start searching for tweets, articles, titles, and bios with some suggested searches:
- Companies or Topics (e.g.
iPhone
,Microsoft
) - Phrases (e.g.
"cloud computing"
) — use quotes to keep the terms together - Twitter handles (e.g.
@username
) — returns those who have mentioned or replied to given user - Names (e.g.
"David Pogue"
) - Hashtags (e.g.
#sxsw
,#london2012
) - Bio details (e.g.
vegan
,Olympics
,father
)
Advanced terms
Advanced Boolean Search operators:
AND
Find results that mention multiple specified terms, use AND or +. This is the default behavior of our search when no operators are used. For example, ensure each result contains both Elon Musk and Mark Zuckerberg by searching Musk AND Zuckerberg
or Musk + Zuckerberg
.
OR
Use the operators OR
or ,
to broaden your search when you’d like either of multiple terms to appear in results. For example, results will contain either cake or cookie by searching cake OR cookie
or cake,cookie
NOT
Use NOT
or -
to subtract results from your search. For example, searching Disney will yield results about the Walt Disney Company as well as Walt Disney World Resort. To exclude mentions of Disney World, search for Disney -World
or Disney NOT World
.
Phrases
When using one of these operators with a phrase, enclose it in quotation marks. For example, you can find results about smartphones excluding Apple’s iPhone 4S by searching smartphone -"iPhone 4s"
.
Exact match
Searches automatically have common suffixes like -s, -ed, -ing added and removed to increase the number of results returned (even when terms are enclosed in quotation marks). To avoid having suffixes added or removed to your terms, add strict:
and enclose your term in quotes. For example, find results with iPhone 4S by searching strict:"iPhone 4s"
.
Case matching or punctuation
If you’re searching for a brand name or keyword that relies on specific punctuation marks or capitalization, you can find results that match your exact query by adding matchcase: before the keyword, you’re searching for, like matchcase:E*TRADE
.
Combining operators
Use parentheses to separate multiple boolean phrases. For example, to find people talking about having fun in Disney World or Disneyland, search for ("disney world" OR disneyland) AND fun
.
Asterisk
An asterisk can be used to search for any variation of a root word truncated by the asterisk. For example, searching for admin*
will return results for administrator
, administration
, administer
, administered
, etc.
Near
A near
operator is an AND operator where you can control the distance between the words. You can vary the distance the near
operation uses by adding a forward slash and number (between 0-99) such as strawberries NEAR/10 "whipped cream"
, which means the strawberries must exist within 10 words of “whipped cream”.