GET trends/:woeid
Returns the top 10 trending topics for a specific WOEID, if trending information is available for it.
The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL.
This information is cached for 5 minutes. Requesting more frequently than that will not return any more data, and will count against your rate limit usage.
URL
http://api.twitter.com/version/trends/:woeid.format
Supported formats
json, xml
Supported request methods
GET
Requires Authentication
false About authentication »
Rate Limited
Parameters
Required
-
woeid
The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.
- http://api.twitter.com/1/trends/1.json
Example requests
JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
[
{
"created_at": "2010-07-15T22:31:11Z",
"trends": [
{
"name": "Premios Juventud",
"url": "http://search.twitter.com/search?q=Premios+Juventud",
"query": "Premios+Juventud"
},
{
"name": "#agoodrelationship",
"url": "http://search.twitter.com/search?q=%23agoodrelationship",
"query": "%23agoodrelationship"
},
{
"name": "#thistweetisdedicated2",
"url": "http://search.twitter.com/search?q=%23thistweetisdedicated2",
"query": "%23thistweetisdedicated2"
},
{
"name": "#bb11",
"url": "http://search.twitter.com/search?q=%23bb11",
"query": "%23bb11"
},
{
"name": "Oil Spill",
"url": "http://search.twitter.com/search?q=Oil+Spill",
"query": "Oil+Spill"
},
{
"name": "Inception",
"url": "http://search.twitter.com/search?q=Inception",
"query": "Inception"
},
{
"name": "iOS",
"url": "http://search.twitter.com/search?q=iOS",
"query": "iOS"
},
{
"name": "Goldman",
"url": "http://search.twitter.com/search?q=Goldman",
"query": "Goldman"
},
{
"name": "AnahiPremiosJuventud",
"url": "http://search.twitter.com/search?q=AnahiPremiosJuventud",
"query": "AnahiPremiosJuventud"
},
{
"name": "DulceMariaLivePJ",
"url": "http://search.twitter.com/search?q=DulceMariaLivePJ",
"query": "DulceMariaLivePJ"
}
],
"as_of": "2010-07-15T22:40:45Z",
"locations": [
{
"name": "Worldwide",
"woeid": 1
}
]
}
] |
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?xml version="1.0" encoding="UTF-8"?> <matching_trends type="array"> <trends as_of="2010-07-15T22:39:53Z" created_at="2010-07-15T22:31:11Z"> <locations> <location> <woeid>1</woeid> <name>Worldwide</name> </location> </locations> <trend query="Premios+Juventud" url="http://search.twitter.com/search?q=Premios+Juventud">Premios Juventud</trend> <trend query="%23agoodrelationship" url="http://search.twitter.com/search?q=%23agoodrelationship">#agoodrelationship</trend> <trend query="%23thistweetisdedicated2" url="http://search.twitter.com/search?q=%23thistweetisdedicated2">#thistweetisdedicated2</trend> <trend query="%23bb11" url="http://search.twitter.com/search?q=%23bb11">#bb11</trend> <trend query="Oil+Spill" url="http://search.twitter.com/search?q=Oil+Spill">Oil Spill</trend> <trend query="Inception" url="http://search.twitter.com/search?q=Inception">Inception</trend> <trend query="iOS" url="http://search.twitter.com/search?q=iOS">iOS</trend> <trend query="Goldman" url="http://search.twitter.com/search?q=Goldman">Goldman</trend> <trend query="AnahiPremiosJuventud" url="http://search.twitter.com/search?q=AnahiPremiosJuventud">AnahiPremiosJuventud</trend> <trend query="DulceMariaLivePJ" url="http://search.twitter.com/search?q=DulceMariaLivePJ">DulceMariaLivePJ</trend> </trends> </matching_trends> |