’s “trending topics” algorithm


What algorithm does twitter use to determine the 10 topics that you can see at I would like to implement that algorithm and I would also like to show the 50 most popular topics (instead of 10). Can you describe the most efficient algorithm?


(Twitters API can be found at-

Also, I would like to be able to implement the algorithm by searching through the public timeline-

Best Solution

Twitter's trending algorithm is not just volume of keywords. That's part of it, but there's also a decay factor so that "justin beiber" isn't top trending forever.

This post on quora backs this up.

decay is typically done by using the relative age of the post in the algorithm, giving more weight to newer topics/posts/etc.

see also