Take the 2-minute tour ×

I'm filtering the twitter streaming API by tracking for several keywords.

If for example I only want to query and return from my database tweet information that was filtered by tracking for the keyword = 'BBC' how could this be done?

Do the tweet information collected have a key:value relating to that keyword by which it was filtered?

I'm using python, tweepy and MongoDB.

Would an option be to search for the keyword in the returned json 'text' field? Thus generate a query where it searches for that keyword = 'BBC' in the text field of the returned json data?

share|improve this question
Can you elaborate? (Possibly with an example)? What does "have a key:value relating to that keyword by which it was filtered" mean? –  shelman Nov 13 '12 at 20:21
I mean, say for example I'm doing filter(track=[BBC]). Then in the json returned is their a value like 'track:BBC'? We can track upto 400 keywords and if you're storing this in storage and in the future only want to retrive that information by keyword how else could it be done? –  user94628 Nov 14 '12 at 0:06
add comment

1 Answer

Unfortunately, the Twitter API doesn't provide a way to do this. You can try searching through receive tweets for the keywords you specified, but it might not match exactly.

share|improve this answer
add comment

Your Answer


