GET trends/:woeid

Updated on Sat, 2012-08-25 08:47

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.

Resource URL

http://api.twitter.com/1/trends/:woeid.format

Parameters

woeid required

The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.

Example Values: 1

exclude optional

Setting this equal to hashtags will remove all hashtags from the trends list.

Example Request

GET

https://api.twitter.com/1/trends/1.json

  1. [
  2.   {
  3.     "created_at": "2010-07-15T22:31:11Z",
  4.     "trends": [
  5.       {
  6.         "name": "Premios Juventud",
  7.         "url": "http://search.twitter.com/search?q=Premios+Juventud",
  8.         "query": "Premios+Juventud"
  9.       },
  10.       {
  11.         "name": "#agoodrelationship",
  12.         "url": "http://search.twitter.com/search?q=%23agoodrelationship",
  13.         "query": "%23agoodrelationship"
  14.       },
  15.       {
  16.         "name": "#thistweetisdedicated2",
  17.         "url": "http://search.twitter.com/search?q=%23thistweetisdedicated2",
  18.         "query": "%23thistweetisdedicated2"
  19.       },
  20.       {
  21.         "name": "#bb11",
  22.         "url": "http://search.twitter.com/search?q=%23bb11",
  23.         "query": "%23bb11"
  24.       },
  25.       {
  26.         "name": "Oil Spill",
  27.         "url": "http://search.twitter.com/search?q=Oil+Spill",
  28.         "query": "Oil+Spill"
  29.       },
  30.       {
  31.         "name": "Inception",
  32.         "url": "http://search.twitter.com/search?q=Inception",
  33.         "query": "Inception"
  34.       },
  35.       {
  36.         "name": "iOS",
  37.         "url": "http://search.twitter.com/search?q=iOS",
  38.         "query": "iOS"
  39.       },
  40.       {
  41.         "name": "Goldman",
  42.         "url": "http://search.twitter.com/search?q=Goldman",
  43.         "query": "Goldman"
  44.       },
  45.       {
  46.         "name": "AnahiPremiosJuventud",
  47.         "url": "http://search.twitter.com/search?q=AnahiPremiosJuventud",
  48.         "query": "AnahiPremiosJuventud"
  49.       },
  50.       {
  51.         "name": "DulceMariaLivePJ",
  52.         "url": "http://search.twitter.com/search?q=DulceMariaLivePJ",
  53.         "query": "DulceMariaLivePJ"
  54.       }
  55.     ],
  56.     "as_of": "2010-07-15T22:40:45Z",
  57.     "locations": [
  58.       {
  59.         "name": "Worldwide",
  60.         "woeid": 1
  61.       }
  62.     ]
  63.   }
  64. ]