• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Twitter REST API Method: trends available

Page history last edited by Raffi Krikorian 10 years, 7 months ago

<< Back to Twitter API Documentation

 

trends/available

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:

  • lat.  Optional.  If passed in conjunction with long, then the available trend locations will be sorted by distance to the lat and long passed in.  The sort is nearest to furthest.
  • long.  Optional.  See lat.

 

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!

 

<< Back to Twitter API Documentation

Comments (0)

You don't have permission to comment on this page.