Search is the hidden gem of Twitter.
That’s why companies like Blufin are purchased by Twitter for sums like $90 million.
Despite this incredible tool, one of its handy features goes undocumented to the best of my Googlings.
You can see all the langauges that are processed on the Advanced Search page, yet there’s no definition of how to filter by them on the developer page.
Here’s what I figured out through trial and error:
- lang:en = English only
- lang:es = Spanish only
- -lang:es = Anything but Spanish
- -lang:en = Anything but English
Note the dash in front of the language… it negates the language to show everything but that. When you string these abilities together with more advanced operators and you can get some really great results.
While I focus on these two languages, you can find any language based on BCP 47.
- French = lang:fr
- German = lang:de
- Dutch = lang:nl
- Japanese = lang:ja
For reference, here’s some of the core filtering one uses:
Query operators
Operator | Finds tweets… |
---|---|
watching now | containing both “watching” and “now”. This is the default operator. |
“happy hour” | containing the exact phrase “happy hour”. |
love OR hate | containing either “love” or “hate” (or both). |
beer -root | containing “beer” but not “root”. |
#haiku | containing the hashtag “haiku”. |
from:alexiskold | sent from person “alexiskold”. |
to:techcrunch | sent to person “techcrunch”. |
@mashable | referencing person “mashable”. |
superhero since:2010-12-27 | containing “superhero” and sent since date “2010-12-27″ (year-month-day). |
ftw until:2010-12-27 | containing “ftw” and sent before the date “2010-12-27″. |
movie -scary :) | containing “movie”, but not “scary”, and with a positive attitude. |
flight :( | containing “flight” and with a negative attitude. |
traffic ? | containing “traffic” and asking a question. |
hilarious filter:links | containing “hilarious” and linking to URL. |
news source:twitterfeed | containing “news” and entered via TwitterFeed |