Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

How do I get a count of the number of times a Twitter hashtag is used or mentioned in a 24-hour period?

An example use is the Livestrong/BreakCancer world record attempt. I'd like to tally the number of times the use of a hashtag is made in order to have some record on its proliferation.

share|improve this question
    
Do you want to get the list of all the hashtags created in the last 24 hrs? –  Deepak Singh Rawat Jan 8 '11 at 5:44
    
@Deepak no I think he wants the number (the count) of mentions a specific hashtag gets in 24 hours. –  phwd Jan 10 '11 at 0:09
    
This website will work... topsy.com It's the best option I found. –  user10547 Apr 29 '11 at 8:54
add comment

5 Answers 5

One alternative approach is to use Zapier to create a link between Twitter and another tool like StatsMix.

Twitter to StatsMix Zap

The Zap can watch for generic search strings (like a hashtag) and update a counter inside StatsMix. You could even build graphs over time.

Of course you're not limited to just StatsMix. You could use any analytics tool that Zapier supports.

EDIT: Sadly, it looks like StatsMix is shutting down. Try out something similar with Twitter to Leftronic

share|improve this answer
add comment

You need to do this :

  1. Use twitter's streaming API to get realtime tweets.
  2. Extract the "text" out of the JSON you get from the API
  3. Extract the hashtags from the text, ( if you are using ruby , you can find gems for this)
  4. Convert hashtags to uppercase, so you don't miss hashtags with mixed cases.
  5. Filter these hashtags to find the hashtag you want to parse
  6. Feed these hashtags to a rolling counter which has timewindow buckets which look like this : [bucket] => count. The buckets are cyclic , ie , you'll clear the count in the first bucket and use it as the next bucket if you are switching from the last bucket

You should have processes running with big time concurrency if you are planning to parse the streaming api's that fetch you all the tweets. You can use [Storm] for this.

I've put together an app that does something similar. I've open sourced it and you can find it here: http://www.emilsoman.com/tweetness . I looked at Tweitgeist and made this as my POC, it's basically a fork, removed a few things and added some of my own , like a Sinatra app for web UI.

share|improve this answer
add comment

Friend of mine built this app called trends24. This one gives you worldwide trends in the past 24 hours along with a hour-by-hour trends

share|improve this answer
add comment

Check out HashtagBattle

share|improve this answer
add comment

Check out Trendistic or What the Hashtag?! (you need to register for this one but it is free)

EDIT 1

Tredistic has the option to switch between 24hrs, 7 days, 30 days, 90 or 180 days. However, after looking at Trendistic again it appears to only display the percentage not the actual number of tweets. What the Hashtag splits tweets in to days over a 7 day period, displaying the number of tweets on the graph.

EDIT 2

I have been looking at Twitter API documentation and it seems to me that there wouldn't really be a 100% reliable way to get all of the mentions of a hashtag.

These are my observations after reading the API docs:

  • History is only available for 7 days.
  • When using the Search API you can specify dates as parameters but not times. I am presuming that the API would convert 09/01/2011 to 09/01/2011 00:00:00 but I can't be sure
  • Not all tweets are available via the API. Presumably because some of them will be protected.
  • You can only return a certain number of tweets with API calls. So if you have a particularly successful hashtag which spread across Twitter you wouldn't be able to retrieve the actual number of tweets anyway.
share|improve this answer
    
Trendistic gives a graph over a 30 day period (I have not seen any numbers though) on the other hand what the hash tag gives tweet statistics over a 7 day period so you would just have to continuously monitor it. –  phwd Jan 9 '11 at 22:12
    
@phwd - Tredistic has the option to switch between 24hrs, 7 days, 30 days, 90 or 180 days. However, after looking at Trendistic again it appears to only display the percentage not the actual number of tweets. What the Hashtag splits tweets in to days over a 7 day period, displaying the number of tweets on the graph. –  Barry Jan 10 '11 at 7:47
    
@phwd - Just added some observations regarding the Twitter API. Thanks for the previous edit. –  Barry Jan 10 '11 at 13:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.