[twitter-dev] Most popular tweets in the search API

2010-03-19 Thread Taylor Singletary
Hi Developers!

The Search team is working on a beta project that returns the most popular
tweets for a query, rather than only the most recent tweets. This is a beta
project, but an important first step to surface the most popular tweets for
users searching Twitter.

You can expect many improvements as we tune and tweak our algorithms, but we
want to give everyone a heads up so we can go over the implications for
those consuming the search API.

--- New attribute in the payload ---

First of all there will be a new attribute in search result payloads. Since
some tweets are popular for a given query while others are simply the most
recent results that match the query, we are adding a metadata section to
specify the type of result that a given result represents.

So for a popular tweet the result_type in the metadata section will have
the value popular.

Example of a result with a popular tweet:

{
results:
[
{
profile_image_url:
http://a1.twimg.com/profile_images/668144840/Elizabeth_Web_normal.jpg;,
created_at:Mon,15 Feb 2010 19:55:18 +,
from_user:Elizabeth,
to_user_id:null,
text:It's the Griswold family trip to Joshua Tree Park!
@rsarver @Devon @Jess @noradio @kevinweil,
id:9153622261,
from_user_id:106309,
geo:null,
iso_language_code:en,
source:lt;a href=quot;http://www.atebits.com/quot;
rel=quot;nofollowquot;gt;Tweetielt;/agt;,
metadata:
{
result_type: popular
}
}

  /* etc ... */
}

Results that are not popular and represent simply recent query matches will
have the result_type in the metadata section with a value of recent.

Example of a recent result:

{
results:
[
{
profile_image_url:
http://a3.twimg.com/profile_images/641350353/TimCheekFinger_normal.jpg;,
created_at:Mon, 15 Feb 2010 23:42:45 +,
from_user:timhaines,
to_user_id:97776,
text:@noradio Nice spot.,
id:9160218997,
from_user_id:159881,
to_user:noradio,
geo:null,
iso_language_code:it,
source:lt;a href=quot;http://www.atebits.com/quot;
rel=quot;nofollowquot;gt;Tweetielt;/agt;,
metadata:
{
result_type: recent
}
},

  /* etc ... */
}


--- Results with popular tweets aren't ordered chronologically ---

Until the popular tweet feature all search results have been sorted
chronologically, most recent results at the top. If a search query has any
popular results, those will be returned at the top, even if they are older
than the other results.

Example of a non-chronologically ordered set of results including popular
results:

{
results:
[
{
profile_image_url:
http://a1.twimg.com/profile_images/668144840/Elizabeth_Web_normal.jpg;,
created_at:Mon, 15 Feb 2010 19:55:18 +,
from_user:Elizabeth,
to_user_id:null,
text:It's the Griswold family trip to Joshua Tree Park!
@rsarver @Devon @Jess @noradio @kevinweil,
id:9153622261,
from_user_id:106309,
geo:null,
iso_language_code:en,
source:lt;a href=quot;http://www.atebits.com/quot;
rel=quot;nofollowquot;gt;Tweetielt;/agt;,
metadata:
{
result_type: popular
}
},
{
profile_image_url:
http://a3.twimg.com/profile_images/641350353/TimCheekFinger_normal.jpg;,
created_at:Mon, 15 Feb 2010 23:42:45 +,
from_user:timhaines,
to_user_id:97776,
text:@noradio Nice spot.,
id:9160218997,
from_user_id:159881,
to_user:noradio,
geo:null,
iso_language_code:it,
source:lt;a href=quot;http://www.atebits.com/quot;
rel=quot;nofollowquot;gt;Tweetielt;/agt;,
metadata:
{
result_type: recent
}
}

  /* etc ... */
}

--- Only getting popular results ---

If you *only* care about popular results for a given query term, you can
provide a result_type parameter with the value popular. Then only
popular results, if there are any, will be returned. By default, if
result_type isn't provided, all result types will be returned.

--- Never getting popular results ---

Conversely, if you *do not* want to receive popular results, provide a
result_type parameter with the value recent. Then only recent results
will be returned.

--- Dealing with popular tweets for refreshing search widgets ---

For those using client side search widgets, by default the first request
might include popular results. If you want to display these you can use the
result_type attribute to visually differentiate them. If you don't want to
display these you can always 

Re: [twitter-dev] Most popular tweets in the search API

2010-03-19 Thread Nick Arnett
On Fri, Mar 19, 2010 at 7:37 AM, Taylor Singletary 
taylorsinglet...@twitter.com wrote:

 Hi Developers!

 The Search team is working on a beta project that returns the most popular
 tweets for a query,


What is the definition of popular?

Nick

To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.


Re: [twitter-dev] Most popular tweets in the search API

2010-03-19 Thread Taylor Singletary
Your questions so far have been great and we're listening.

I wanted to let everyone know that when we do roll this out, it will be such
that developers will opt-in to receiving Top Tweets in their results for
the first month or so of the feature rollout. After the trial transition
period is complete, we'll enable this feature by default. You will have time
to adjust.

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Fri, Mar 19, 2010 at 9:44 AM, Nick Arnett nick.arn...@gmail.com wrote:



 On Fri, Mar 19, 2010 at 7:37 AM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:

 Hi Developers!

 The Search team is working on a beta project that returns the most popular
 tweets for a query,


 What is the definition of popular?

 Nick

  To unsubscribe from this group, send email to twitter-development-talk+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.


Re: [twitter-dev] Most popular tweets in the search API

2010-03-19 Thread Cameron Kaiser
 I wanted to let everyone know that when we do roll this out, it will be such
 that developers will opt-in to receiving Top Tweets in their results for
 the first month or so of the feature rollout. After the trial transition
 period is complete, we'll enable this feature by default. You will have time
 to adjust.

So how do you opt-out? Really, this feature doesn't square with TTYtter's
search API support at all.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Software sucks because users demand it to. -- Nathan Mhyrvold, Microsoft ---

To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.