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
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."
},
"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"
},
{ "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."
},
"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"
}, ...
]
}
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 ??"
},
"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"
},
{ "description" : { "created_at" : "2009-10-15 17:38:00",
"text" : "It's trending cuzz it's true"
},
"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"
}, ...
]
}
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."
},
"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"
},
{ "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."
},
"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"
}, ...
]
}
Reverts the trend description to an earlier version.
Updates an existing trend or creates a new trend based on a trend id
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"}
]
}
Lists all trends (currently limited to 100). Most recently updated trends are returned first.
rss, xml, json, jsonp
Lists all trends (currently limited to 100) which have been explained by users. Most recently explained trends are returned first.
rss, xml, json, jsonp
Returns all information about a single trend.
xml, json, jsonp
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.
xml, json
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.