We provide a RESTful API for getting information about recent trends. We'd love to hear about any cool mashups you've built with What the Trend Join our WTT API Google Group, or contact us on
The API can be used for commercial or non-commercial services. An API key is required. Please generate a different key per deployment platform. By generating a key, you agree to our terms of service.
The What the Trend API is free for commercial or non-commercial use, but is rate limited according to the schedule below. We will waive rate limit requirements if your application provides a mechanism for users to submit a definition back. See restrictions below. If update functionality does not fit the idea of your application, please let us know as there may be alternate options.
*Data may not be cached at an intermediary point for later distribution, as it generally inhibits the user experience. If caching is necessary for size or scale, please contact us to work out details.
Our goal is to enable as many people to use our API as possible, but the data is most interesting when everyone is able to contribute. Thus, we want to encourage developers to add the feature for a user to edit a definition. In order to qualify for rate limit removal, your application must do the following:
http://api.whatthetrend.com/api/
<a href="http://api.whatthetrend.com/"> <img src="http://api.whatthetrend.com/images/wtt_api_badge_120.png" border="0"> </a>There is also a wtt_api_badge_120_white.png and wtt_api_badge_120_border.png for alternate looks.
<!-- Begin What the Trend HTML Attribution Snippet --> <a href="http://api.whatthetrend.com/">Data by What the Trend</a> <!-- End What the Trend HTML Attribution Snippet -->If you are unable to provide a text link in a client application, please use the following attribution:
Definition by whatthetrend.comThese attributions should be placed as near as possible to any trend explanations within the user interface. If neither of these options work within the confines of your application, please contact us and we'll be happy to find an alternate solution.
Some example alternates:
Note that some methods are part of a V2 API. This will feature a different return or calling format to make the response simpler to work with. V1 will not be deprecated, but will not recieve new additional features, only bug fixes. Eventually there will be a V2 version of all V1 APIs. If you need a V2 version sooner, please let us know.
The current trending terms on Twitter, with descriptions.
json
{
"api_version" : "2.0",
"as_of" : "2009-10-15 19:57:01",
"trends" : [
{ "description" : { "created_at" : "2009-10-15 19:54:32",
"text" : "A 6 year old was believed to be stuck in a homemade hot air balloon in Denver, Colorado. The balloon landed with no boy found inside. The boy is still missing.",
"score" : "0"
},
"first_trended_at" : "2009-10-15 19:00:01",
"last_trended_at" : "2009-10-15 19:55:01",
"name" : "Colorado",
"newly_trending" : "0",
"query" : "Colorado",
"trend_index" : "1",
"url" : "http://search.twitter.com/search?q=Colorado",
"related_url" : "http://www.wikipedia.com/Colorado",
"category_id" : "11",
"category_name" : "News",
"locked" : false
},
{ "description" : { "created_at" : "2009-10-15 19:54:10",
"text" : "A 6 year old was believed to be stuck in a homemade hot air balloon in Denver, Colorado. The balloon landed with no boy found inside. The boy is still missing.",
"score" : "0"
},
"first_trended_at" : "2009-10-15 19:30:01",
"last_trended_at" : "2009-10-15 19:55:01",
"name" : "#saveballoonboy",
"newly_trending" : "0",
"query" : "#saveballoonboy",
"trend_index" : "2",
"url" : "http://search.twitter.com/search?q=%23saveballoonboy",
"category_id" : "11",
"category_name" : "News",
"locked" : false
}, ...
]
}
The currently most-edited trends on What the Trend in the last 24 hours.
json
{
"api_version" : "2.0",
"as_of" : "2009-10-15 19:59:00",
"trends" : [
{ "description" : { "created_at" : "2009-10-15 03:22:40",
"text" : "Pero que chuuuuuuuuuuuuuchaaaaaaaaa y Chile ??",
"score" : "0"
},
"edit_count" : "21",
"first_trended_at" : "2009-10-15 03:20:02",
"last_trended_at" : "2009-10-15 06:40:02",
"name" : "#98b351",
"query" : "#98b351",
"url" : "http://search.twitter.com/search?q=%2398b351",
"category_id" : "11",
"category_name" : "News",
"locked" : false
},
{ "description" : { "created_at" : "2009-10-15 17:38:00",
"text" : "It's trending cuzz it's true",
"score" : "0"
},
"edit_count" : "8",
"first_trended_at" : "2009-10-15 17:30:02",
"last_trended_at" : "2009-10-15 19:55:01",
"name" : "#Twitterrules",
"query" : "#Twitterrules",
"url" : "http://search.twitter.com/search?q=%23Twitterrules",
"category_id" : "11",
"category_name" : "News",
"locked" : false
}, ...
]
}
A list of the trends most recently identified as SPAM or spam targets.
json
{
"api_version" : "2.0",
"as_of" : "2009-10-15 19:57:01",
"trends" : [ { "description" : { "created_at" : "2009-10-15 19:54:32",
"text" : "A 6 year old was believed to be stuck in a homemade hot air balloon in Denver, Colorado. The balloon landed with no boy found inside. The boy is still missing.",
"score" : "0"
},
"first_trended_at" : "2009-10-15 19:00:01",
"last_trended_at" : "2009-10-15 19:55:01",
"name" : "Colorado",
"newly_trending" : "0",
"query" : "Colorado",
"trend_index" : "1",
"url" : "http://search.twitter.com/search?q=Colorado",
"category_id" : "11",
"category_name" : "News",
"locked" : false
},
{ "description" : { "created_at" : "2009-10-15 19:54:10",
"text" : "A 6 year old was believed to be stuck in a homemade hot air balloon in Denver, Colorado. The balloon landed with no boy found inside. The boy is still missing.",
"score" : "0"
},
"first_trended_at" : "2009-10-15 19:30:01",
"last_trended_at" : "2009-10-15 19:55:01",
"name" : "#saveballoonboy",
"newly_trending" : "0",
"query" : "#saveballoonboy",
"trend_index" : "2",
"url" : "http://search.twitter.com/search?q=%23saveballoonboy",
"category_id" : "11",
"category_name" : "News",
"locked" : false
}, ...
]
}
A list of the #1 trend by location type.
json
{ "api_version" : "2.0",
"as_of" : 1270572194,
"trends" : [
{ "description" : null,
"id" : "39023",
"last_trended_at" : "2010-03-04T18:08:29+00:00",
"name" : "Karun Chandhok",
"place_name" : "United States",
"slug" : "Karun+Chandhok",
"woeid" : "23424977"
},
{ "description" : { "created_at" : "2010-03-02T05:22:50+00:00",
"text" : "People explaining why they don't care about what someone else is doing or saying",
"score" : "0"
},
"id" : "41236",
"last_trended_at" : "2010-03-04T18:09:50+00:00",
"name" : "#BitchSoWhat",
"place_name" : "United Kingdom",
"slug" : "%23BitchSoWhat",
"woeid" : "23424975"
},
...
]
}
Reverts the trend description to an earlier version.
{
"api_version":"2.0",
"as_of":1328575080,
"success":true,
"message":"Trend description reverted"
}
Updates an existing trend or creates a new trend based on a trend id
{
"api_version":"2.0",
"as_of":1328575080,
"success":true,
"message":"What the trend offers user contributed definitions for trending topics on twitter.com."
}
Marks a trend as SPAM
A list of the categories available.
json
{
"api_version":"2.0",
"categories":
[
{"id":1,"name":"Entertainment"},
{"id":2,"name":"Gaming"},
{"id":3,"name":"Lifestyle"},
{"id":4,"name":"Science"},
{"id":5,"name":"Sports"},
{"id":6,"name":"Technology"},
{"id":7,"name":"Business"},
{"id":8,"name":"SPAM"},
{"id":9,"name":"Meme"},
{"id":10,"name":"Conference or Event"},
{"id":11,"name":"News"},
{"id":12,"name":"Place or Location"},
{"id":13,"name":"Holiday or Date"},
{"id":14,"name":"Other"}
]
}
A list of the current trending locations.
json
{
"api_version" : "2.0",
"as_of" : 1270490234,
"locations" : [
{ "count" : "326",
"country_name" : "1",
"name" : "Earth",
"place_type_code" : "19",
"place_type_name" : "Supername",
"woeid" : "1"
},
{ "count" : "346",
"country_name" : "23424768",
"name" : "Brazil",
"place_type_code" : "12",
"place_type_name" : "Country",
"woeid" : "23424768"
},
...
}
A list of all locations to ever trend.
json
{
"api_version" : "2.0",
"as_of" : 1270490456,
"locations" : [
{ "country_name" : "1",
"name" : "Earth",
"place_type_code" : "19",
"place_type_name" : "Supername",
"updated" : "2010-04-05T18:05:17+00:00",
"woeid" : "1"
},
{ "country_name" : "23424748",
"name" : "Australia",
"place_type_code" : "12",
"place_type_name" : "Country",
"updated" : "2009-12-15T18:14:23+00:00",
"woeid" : "23424748"
},
...
}
Vote the current definition up. A user may only vote once.
json
{
"api_version":"2.0",
"as_of":1328575080,
"success":true,
"score":2
}
Vote the current definition down. A user may only vote once.
json
{
"api_version":"2.0",
"as_of":1328575080,
"success":true,
"score":2
}
Flag the current definition as offensive. A user may only vote once.
json
{
"api_version":"2.0",
"as_of":1328575080,
"success":true,
"score":2
}
Returns all information about a single trend.
json, jsonp, xml, rss
http://search.twitter.com/trends.json or from another API methodBe careful with special characters, the trend name should be URL-encoded:
Returns all information about a single trend, given a trend id.
json, jsonp, xml, rss
Search for a trend with the specified text. Returns up to the top 10 matching trends as a very simple carriage-return-delimited list. This is useful for auto-complete text boxes.
#followfriday Fridays Follow Friday #fridaynight Good Friday Happy Good Friday It's Good Friday Friday Night Lights #UnFollowFriday Its Friday
Search for a trend with the specified text. Returns up to the top 10 matching trends along with with their explanation
rss, xml, json, jsonp
<?xml version="1.0"?> <rss version="2.0"> <channel> <title>What The Trend?</title> <link>http://www.whatthetrend.com/</link> <description>Find out WHY terms are trending on Twitter.</description> <managingEditor>api@whatthetrend.com (What The Trend)</managingEditor> <language>en</language> <item> <pubDate>Sat, 07 Mar 2009 06:40:01 +0800</pubDate> <guid>108.83</guid> <link>http://www.whatthetrend.com/trend/%23followfriday</link> <title>#followfriday</title> <description>Game in which people recommend people to follow on Twitter, on Fridays http://mashable.tumblr.com/post/72589347</description> </item> <item> <pubDate>Fri, 08 May 2009 14:30:03 +0800</pubDate> <guid>144.518</guid> <link>http://www.whatthetrend.com/trend/Fridays</link> <title>Fridays</title> <description>Because it's Friday. </description> </item> </channel> </rss>
<?xml version="1.0"?> <api version="1.0"> <trends> <trend> <id>108</id> <name>#followfriday</name> <dates> <firstTrend>2009-02-20T03:35:01Z</firstTrend> <lastTrend>2009-03-07T06:40:01Z</lastTrend> </dates> <links> <url>http://www.whatthetrend.com/trend/%23followfriday</url> <tinyUrl>http://wttrend.com/108</tinyUrl> </links> <blurb> <id>83</id> <text>Game in which people recommend people to follow on Twitter, on Fridays</text> <timestamp>2009-02-20T03:07:39Z</timestamp> </blurb> <versions/> </trend> <trend> <id>144</id> <name>Fridays</name> <dates> <firstTrend>2009-02-20T14:20:01Z</firstTrend> <lastTrend>2009-05-08T14:30:03Z</lastTrend> </dates> <links> <url>http://www.whatthetrend.com/trend/Fridays</url> <tinyUrl>http://wttrend.com/144</tinyUrl> </links> <blurb> <id>518</id> <text>Because it's Friday. </text> <timestamp>2009-03-06T11:42:44Z</timestamp> </blurb> <versions/> </trend> </trends> </api>
{
"api": {
"@attributes": {
"version": "1.0"
},
"trends": {
"trend": [{
"id": "108",
"name": "#followfriday",
"dates": {
"firstTrend": "2009-02-20T03:35:01Z",
"lastTrend": "2009-03-07T06:40:01Z"
},
"links": {
"url": "http://www.whatthetrend.com/trend/%23followfriday",
"tinyUrl": "http://wttrend.com/108"
},
"blurb": {
"id": "83",
"text": "Game in which people recommend people to follow on Twitter, on Fridays.",
"timestamp": "2009-02-20T03:07:39Z"
},
"versions": ""
},
{
"id": "144",
"name": "Fridays",
"dates": {
"firstTrend": "2009-02-20T14:20:01Z",
"lastTrend": "2009-05-08T14:30:03Z"
},
"links": {
"url": "http://www.whatthetrend.com/trend/Fridays",
"tinyUrl": "http://wttrend.com/144"
},
"blurb": {
"id": "518",
"text": "Because it's Friday.",
"timestamp": "2009-03-06T11:42:44Z"
},
"versions": ""
}]
}
}
}
handleResponse({
"api": {
"@attributes": {
"version": "1.0"
},
"trends": {
"trend": [{
"id": "108",
"name": "#followfriday",
"dates": {
"firstTrend": "2009-02-20T03:35:01Z",
"lastTrend": "2009-03-07T06:40:01Z"
},
"links": {
"url": "http://www.whatthetrend.com/trend/%23followfriday",
"tinyUrl": "http://wttrend.com/108"
},
"blurb": {
"id": "83",
"text": "Game in which people recommend people to follow on Twitter, on Fridays.",
"timestamp": "2009-02-20T03:07:39Z"
},
"versions": ""
},
{
"id": "144",
"name": "Fridays",
"dates": {
"firstTrend": "2009-02-20T14:20:01Z",
"lastTrend": "2009-05-08T14:30:03Z"
},
"links": {
"url": "http://www.whatthetrend.com/trend/Fridays",
"tinyUrl": "http://wttrend.com/144"
},
"blurb": {
"id": "518",
"text": "Because it's Friday.",
"timestamp": "2009-03-06T11:42:44Z"
},
"versions": ""
}]
}
}
})
Updates a trend description via an HTTP POST. Note that this request will only be successful for the first 10 requests each hour from an individual IP address. Access may be blocked if this request is abused (for example, posting spammy descriptions). Please provide a human-readable name of your app in the "from" parameter.
Whether updating is successful or failed, the response is text/html, and contains a copy of the blurb submitted, with any HTML stripped and URLs linked.