Loading...
|
|
Search API DocumentationPage history last edited by Matt Sanford 10 hours, 2 minutes ago
IntroductionYou 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 currently serve two flavors of our Search API: Atom and JSON. In the near future, the Search API will be updated to more closely reflect the Twitter REST API, and we'll support XML responses as well. Formats
AtomYou can grab the search results for any query as a standard Atom feed. For example, this is the Atom feed for the query twitter. For example, to request search results in Atom, append your URL-encoded query as a parameter to the search method and specify the Atom format:
http://search.twitter.com/search.atom?q=<query> JSONYou can also request search results in JSON format. For example, this is the JSON response for the query twitter. Note that the tweet content is HTML-encoded. To request search results in JSON, append your URL-encoded query as a parameter to the search method and specify the JSON format:
http://search.twitter.com/search.json?q=<query>
Requests for JSON support an additional URL parameter:
Methods
SearchReturns tweets that match a specified query. You can use a variety of 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 search method also supports the following optional URL parameters:
There are a few restrictions to the search method:
TrendsReturns the top ten queries that are currently trending on Twitter. The response includes the time of the request, the name of each trending topic, and the url to the Twitter Search results page for that topic. Currently, the only supported format for this method is JSON. The callback parameter is supported, however.
The request URL for this method is:
http://search.twitter.com/trends.json
Terms of ServiceWe delight in all manifestations of our API. Only a few guidelines:
|
Comments (0)
You don't have permission to comment on this page.