Twitter Advanced Search “for fun & profit”

This Easter have been playing with searches on Twitter and I could see the vast amount of information that can be able to filter like a hacker. Some time ago I told you how you can search tweets from Google, but the fact is that the API that exposes the social network itself has much more power than you could imagine. So far it is possible that you were handled only simple searches, using usernames or hashtags, but the truth is you can go much further.

Twitter Advanced Search "for fun & profit"
Twitter Advanced Search “for fun & profit”

All Twitter clients use this API today, so you can use many operators from any of them, and even combine them. In this post I will show you some super hacker examples so that you can take advantage of this social network.

from:username to:another_username

More than once I lost time searching tweets of a conversation between two people, scrolling in a timeline. The smart way to get this information is through the operators from and to.

Twitter Search - from:username to:username
Twitter Search – from:username to:username

“Exact words”

It is also possible search the exact words, as in other search engines. To do this, simply type quotation marks around the exact phrase you want to find in the social network.

Twitter Search - Microsoft Loves Linux
Twitter Search – Microsoft Loves Linux

Tweets filtered by language

If you want to search for only those tweets in a specific language add the operator lang:language as part of the filter.

Twitter Search - Microsoft loves linux lang es
Twitter Search – Microsoft loves linux lang es

@username | word | “exact words” filter:images | videos | links | news

To find pictures, videos, links of an user or a particular topic you should use the filter operator followed by the type of information you’re looking for.

Twitter Search - Filter images
Twitter Search – Filter images

from:username source:”app’s name”

Another super hacker search would locate all tweet from a user who has sent from a particular device or application. For example: from:0gis0 source:”Twitter for iPhone”. To find out what source we are looking at a client like TweetDeck can show you the application used in the detail of any tweet.

Twitter Search - Source
Twitter Search – Source

 

tweets about a specific location

For this type of search is necessary the user who has written the tweet has geolocation enabled at the time of publication. Use near to retrieve tweets from a particular location.

Twitter Search - near location
Twitter Search – near location

tweets within a range of dates between two people

Another interesting option is to review the conversations that two people have within a time frame. For example, if I wanted to know what my colleague Isabel Cabezas said since August until December in 2015 it would be a query like this: from:isabelcabezasm to:0gis0 since:2015-08-01 until:2015-12-01

Twitter Search - Since and until
Twitter Search – Since and until

This can be as elaborate as you want. The easiest way to play with these searches is through the URL https://twitter.com/search-home

Twitter Search
Twitter Search

Here’s a link that shows examples of some of the operators available and use cases with each of them.

Twitter - Search Operators
Twitter – Search Operators

The interesting thing is that these can be concatenated and reach more complex combinations of filtering. It is also possible to generate queries with more than one criteria using advanced search.

Twitter Search - Avanced Search
Twitter Search – Avanced Search

Happy hacking!