This snapshot, taken on
27/09/2010
, shows web content acquired for preservation by The National Archives. External links, forms and search may not work in archived websites and contact details are likely to be out of date.
 
 
The UK Government Web Archive does not use cookies but some may be left in your browser from archived websites.

Basic Auth has been deprecated.

Attention! August 31, 2010 Basic Auth has been deprecated. All applications must now use OAuth. Read more »   x

Don't fret! @twitterapi is here to help! Feel free to reach out to us directly, or via our Twitter Development Talk group.

The switch to OAuth is a good thing! You, as the application developer,

  • don't have the burden of keeping potentially damaging credentials for your users (especially considering that a lot of people use the same password for multiple services);
  • don't have to worry about the user changing their password — a user can change his or her password and the OAuth "connection" to your app will still work;
  • don't have to worry about other applications masquerading as your application as only your application can set the byline with your application name;
  • will eventually have access to more trusted APIs from Twitter that will only be available to "trusted" OAuth-enabled applications; and
  • will be contributing to the web of trust between users, service providers, and applications.

Choose your authorization path.

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

true About rate limiting »

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>
This document last updated by themattharris on July 15, 2010