Twitter Search API

Attention Summize clients: API request URLs hitting "summize.com" will continue to work until further notice. However, please migrate to "search.twitter.com" at your earliest convenience. Thank you!

You can use our API to integrate Twitter search results with your own apps, clients, and readers. Check out these great examples of apps utilizing our API.

We serve two flavors of our Search API: Atom and JSON.

Atom API

You can grab the search results for any query as a standard Atom feed. For example, this is the Atom feed for the query twitter.

To construct a request URL, simply append your URL-encoded query to our Atom service URL:

http://search.twitter.com/search.atom?q=<query>

You can use any of our search operators in your query. Here are a few examples:

Alternatively, if you perform a search on our site, you can click the Feed for this query link in the sidebar to obtain its Atom feed URL. You can also use the advanced search page to easily incorporate any search operators.

The API also supports the following optional URL parameters:

  • lang: restricts tweets to the given language, given by an ISO 639-1 code. E.g., http://search.twitter.com/search.atom?lang=en&q=devo
  • rpp: the number of tweets to return per page, up to a max of 100. E.g., http://search.twitter.com/search.atom?lang=en&q=devo&rpp=15
  • since_id: returns tweets with status ids greater than the given id.
  • geocode: returns tweets by users located within a given radius of the given latitude/longitude, where the user's location is taken from their Twitter profile. The parameter value is specified by "latitide,longitude,radius", where radius units must be specified as either "mi" (miles) or "km" (kilometers). E.g., http://search.twitter.com/search.atom?geocode=40.757929%2C-73.985506%2C25km. Note that you cannot use the near operator via the API to geocode arbitrary locations; however you can use this geocode parameter to search near geocodes directly.
  • show_user: when "true", adds "<user>:" to the beginning of the tweet. This is useful for readers that do not display Atom's author field. The default is "false".

JSON API

The JSON API works exactly like the Atom API, but returns the results in JSON format. For example, this is the JSON response for the query twitter. Note that the tweet content is HTML-encoded.

To construct a request URL, append your URL-encoded query to our JSON service URL:

http://search.twitter.com/search.json?q=<query>

The JSON API also supports an additional URL parameter:

Terms of Service

We delight in all manifestations of our API. Only a few guidelines:

  • Set the user agent of the request to something meaningful. This helps us answer any questions about your use of the API.
  • If possible, use the since_id request parameter described above to only retrieve new tweets.
  • Please give us a nod in your app, perhaps by including one of these stylish "Powered by Twitter" badges:

    Powered-by-twitter-sig Powered-by-twitter-badge

  • We do not rate limit the search API under ordinary circumstances, however we have put measures in place to limit the abuse of our API. If you find yourself encountering these limits, please contact us and describe your app's requirements.
  • Finally, let us know what you're up to so we can check it out!

Contact Us

Please contact us with any service questions or business development inquiries. Also visit the Twitter Development Talk Google Group for ongoing API discussions.