Announcement: get trends from the Search API!

1 view
Skip to first unread message

Alex Payne

unread,
Sep 23, 2008, 5:35:56 PM9/23/08
to twitter-deve...@googlegroups.com
I'm happy to announce that we're now providing the same trends data
that you see on http://search.twitter.com as an API method:

http://search.twitter.com/trends.json

You get back the top ten currently trending topics in no particular
order, like this:

{"as_of": "2008-09-23 17:32:37",
"trends": [
{"name": "Android",
"url": "http:\/\/search.twitter.com\/search?q=Android"},
{"name": "T-Mobile G1",
"url":"http:\/\/search.twitter.com\/search?q=T-Mobile+G1"},
...
]
}

As you can see, each trend includes a URL to the corresponding page of
search results on Twitter Search. Note that this method is only
available in JSON format. As we merge the Search API with the main
Twitter REST API, we'll provide this data in XML format as well.

You can find the updated documentation for the Search API, including
documentation for this new method, on the Twitter API Wiki:
http://apiwiki.twitter.com/Search+API+Documentation. We've already
used this API to develop some neat tools inside of Twitter, and we're
eager to see what you all come up with!

--
Alex Payne - API Lead, Twitter, Inc.
http://twitter.com/al3x

Damon C

unread,
Sep 24, 2008, 7:17:35 AM9/24/08
to Twitter Development Talk
Hey, cool. It works!

http://tweetstats.com/trends

One question - It seems the as_of date is currently outputting in EST?
As of this post (4:16AM in Seattle), the as_of time is "2008-09-24
07:16:04". Can you confirm and perhaps it should be UTC?

Thanks for the new API to play with!

dpc

On Sep 23, 2:35 pm, "Alex Payne" <a...@twitter.com> wrote:
> I'm happy to announce that we're now providing the same trends data
> that you see onhttp://search.twitter.comas an API method:

Matt Sanford

unread,
Sep 24, 2008, 10:31:53 AM9/24/08
to Twitter Development Talk
Hi Damon,

D'oh, time stamps seems to be my recurring bug with this feature :/.
Right after launch I changed from the ISO-8601 date format in the
example to RFC822 ("Wed, 24 Sep 2008 10:29:10 -0400") to make the
output more easily consumed by browsers. That added the time zone
(good) but should have reminded me to force it to UTC (bad). I'll
change the time zone to UTC today.

Thanks;
— Matt Sanford

On Sep 24, 4:17 am, Damon C <d.lifehac...@gmail.com> wrote:
> Hey, cool. It works!
>
> http://tweetstats.com/trends
>
> One question - It seems the as_of date is currently outputting in EST?
> As of this post (4:16AM in Seattle), the as_of time is "2008-09-24
> 07:16:04". Can you confirm and perhaps it should be UTC?
>
> Thanks for the new API to play with!
>
> dpc
>
> On Sep 23, 2:35 pm, "Alex Payne" <a...@twitter.com> wrote:
>
> > I'm happy to announce that we're now providing the same trends data
> > that you see onhttp://search.twitter.comasan API method:

Matt Sanford

unread,
Sep 24, 2008, 11:56:08 AM9/24/08
to Twitter Development Talk
Hi Damon,

I launched both the RFC822 date format and the time zone fix a few
moments ago.

Thanks;
— Matt Sanford

On Sep 24, 7:31 am, Matt Sanford <m...@twitter.com> wrote:
> Hi Damon,
>
>   D'oh, time stamps seems to be my recurring bug with this feature :/.
> Right after launch I changed from the ISO-8601 date format in the
> example to RFC822 ("Wed, 24 Sep 2008 10:29:10 -0400") to make the
> output more easily consumed by browsers. That added the time zone
> (good) but should have reminded me to force it to UTC (bad). I'll
> change the time zone to UTC today.
>
> Thanks;
>   — Matt Sanford
>
> On Sep 24, 4:17 am, Damon C <d.lifehac...@gmail.com> wrote:
>
> > Hey, cool. It works!
>
> >http://tweetstats.com/trends
>
> > One question - It seems the as_of date is currently outputting in EST?
> > As of this post (4:16AM in Seattle), the as_of time is "2008-09-24
> > 07:16:04". Can you confirm and perhaps it should be UTC?
>
> > Thanks for the new API to play with!
>
> > dpc
>
> > On Sep 23, 2:35 pm, "Alex Payne" <a...@twitter.com> wrote:
>
> > > I'm happy to announce that we're now providing the same trends data
> > > that you see onhttp://search.twitter.comasanAPI method:

Damon C

unread,
Sep 24, 2008, 7:57:10 PM9/24/08
to Twitter Development Talk
Awesome, thanks Matt. Data coming back looks like it's got the dates
modified as noted.

Now I'm just cursing python for not having a dead-simple manner of
parsing dates and doing utc->local conversions, arg.

Richie

unread,
Sep 25, 2008, 4:10:25 AM9/25/08
to Twitter Development Talk
Thanks for the API.

I noticed, that the trends can easily influenced through spam by only
one twitterer. Is this behaviour intentional?



On Sep 23, 11:35 pm, "Alex Payne" <a...@twitter.com> wrote:
> I'm happy to announce that we're now providing the same trends data
> that you see onhttp://search.twitter.comas an API method:

Alex Payne

unread,
Sep 25, 2008, 12:02:39 PM9/25/08
to twitter-deve...@googlegroups.com
Definitely not. We're constantly working on ways to remove spammers
from Twitter and from Twitter Search results.

Colby Palmer

unread,
Sep 25, 2008, 5:12:48 PM9/25/08
to Twitter Development Talk
This is a unique and useful addition! I've added it to my Twitter API
client's search options and already had a lot of fun playing with it.
Thanks a bunch!

Colby Palmer
http://itweet.net

Richie

unread,
Sep 26, 2008, 10:20:14 AM9/26/08
to Twitter Development Talk
hi Alex,

thanks for the reply.

I'm halfway through building a mashup with the trends data and spam is
one of the problems for that. Maybe it's possible that you change the
algorithm for calculating the trends from counting each tweet into
counting each user.

I hope I can officially announce my project in the next few days.

thanks,

Richie

On Sep 25, 6:02 pm, "Alex Payne" <a...@twitter.com> wrote:
> Definitely not.  We're constantly working on ways to remove spammers
> from Twitter and from Twitter Search results.
>
>
>
> On Thu, Sep 25, 2008 at 1:10 AM, Richie <rocketeer.so...@gmail.com> wrote:
>
> > Thanks for the API.
>
> > I noticed, that the trends can easily influenced through spam by only
> > one twitterer. Is this behaviour intentional?
>
> > On Sep 23, 11:35 pm, "Alex Payne" <a...@twitter.com> wrote:
> >> I'm happy to announce that we're now providing the same trends data
> >> that you see onhttp://search.twitter.comasan API method:

TCI

unread,
Sep 25, 2008, 1:30:24 PM9/25/08
to Twitter Development Talk
Great! Now one question. Is there a way or plan to determine trends
for a particular user's friends updates? Users that are heavily
followed would find this useful to detect and report on topics being
talked about around him/her.
Example our @CostaRica user - we barely keep up reading, how could we
figure out if they are all taking about Coke Zero or an Schematic
summit (both of which are local trending topics this week but we
figured by reeeeeaaading a lot)
R

On Sep 25, 10:02 am, "Alex Payne" <a...@twitter.com> wrote:
> Definitely not.  We're constantly working on ways to remove spammers
> from Twitter and from Twitter Search results.
>
>
>
> On Thu, Sep 25, 2008 at 1:10 AM, Richie <rocketeer.so...@gmail.com> wrote:
>
> > Thanks for the API.
>
> > I noticed, that the trends can easily influenced through spam by only
> > one twitterer. Is this behaviour intentional?
>
> > On Sep 23, 11:35 pm, "Alex Payne" <a...@twitter.com> wrote:
> >> I'm happy to announce that we're now providing the same trends data
> >> that you see onhttp://search.twitter.comasan API method:

Alex Payne

unread,
Sep 30, 2008, 12:48:59 PM9/30/08
to twitter-deve...@googlegroups.com
We're definitely thinking about how we can expose search results and
trends to sub-sections of the Twitter community. That's a helpful
use-case, thanks!
Reply all
Reply to author
Forward
0 new messages