<< Back to Twitter API Documentation
Returns the locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in.
The WOEID that is returned in the location object is to be used when querying for a specific trend.
method status | report a bug
URL:
http://api.twitter.com/1/trends/available.format
Format:
xml, json
HTTP Method:
GET
Requires Authentication (about authentication):
false
API rate limited (about rate limiting):
true
Parameters:
Response (about return values):
XML example (truncated):
<?xml version="1.0" encoding="UTF-8"?>
<locations type="array">
<location>
<woeid>2487956</woeid>
<name>San Francisco</name>
<placeTypeName code="7">Town</placeTypeName>
<country type="Country" code="US">United States</country>
<url>http://where.yahooapis.com/v1/place/2487956</url>
</location>
...
</locations>
JSON example (truncated):
[
{
"placeType":
{
"code":7
"name":"Town"
},
"woeid":44418,
"country":"United Kingdom",
"countryCode":"GB",
"url":"http://where.yahooapis.com/v1/place/44418",
"name":"London"
},
...
]
Usage examples:
cURL (about cURL):
curl http://api.twitter.com/1/trends/available.json
Do you have an example to share in the language of your choice? Please share!