Twitter Changing Search API to Include Popular Tweets

Adam DuVander
May. 05 2010, 01:47AM EDT

Twitter's platform is maturing and with it comes recognizing that some tweets just have more staying power. A recent addition to the search API means that popular tweets can be mixed in with realtime results. And in a future release that setting will be the default.

Popular tweets appears to be determined by the number of retweets (likely weighted higher for more recent retweets). Featuring them in search results, as Twitter now does on its own site, can help make sense of trends. Plus, if hundreds of other people found the tweet worthwhile, there's a good chance others will, too.

From a technical standpoint, Twitter added a new parameter option to its search API, "result_type." To keep the old method, with only realtime results, set it to "recent." The new default will be "mixed," with a combination of realtime and popular tweets. You can also use "popular" to only get the tweets that Twitter determines are exceptional.

Like retweets and promoted tweets (which were announced before Chirp), popular tweets have meta-data that declare them as special. You'll find it as "result_type" in the "metadata" section.

If your application uses the Twitter API and expects realtime results, you'll want to make a change to your code. There's no word on when Twitter will make the switch, but expect it soon.

Adam DuVander -- Adam heads developer relations at Orchestrate, a database-as-a-service company. He's spent many years analyzing APIs and developer tools. Previously he worked at SendGrid, edited ProgrammableWeb and wrote for Wired and Webmonkey. Adam is also the author of mapping API cookbook Map Scripting 101.

Comments