views:

162

answers:

2

Is there a way for me to determine the total number of Twitter messages on a given trend topic (e.g. frequency of Twitter messages with subject matter on Haiti/#Haiti) at a given instance in time using the Twitter API? I'm writing a script in Python that will monitor Twitter traffic over a long spell of time and I was wondering how I could go about doing this.

+1  A: 

Yes. Use the Twitter Streaming API to get a representative sample.

Triptych
I was thinking of using the Search API. How would you go about using the Streaming API for this?
rohanbk
You're going to want to read that documentation I linked there, but the short answer is that you open a socket connection to their streaming api: http://apiwiki.twitter.com/Streaming-API-Documentation#Sampling
Triptych
The Search API is going to more and more return relevant results instead of the most recent results. Go with the Streaming API.
abraham
A: 

You might take a look at this site (see below) Drew has several sources of information and was to look at the data. Network of People who Twitter about R http://www.drewconway.com/zia/?p=1471

Vincent