API and output the results as a CSV
tweet2csv requires Tweepy. The easiest way to install Tweepy is:
$ easy_install tweepy
Altnerative installation methods can be found here
Usage typically follows this format:
$ python tweet2csv.py [QUERY]
So get a list tweets mentioning @user:
$ python tweet2csv.py "@user"
Or, get a list of tweets mentioning @user and #hashtag:
$ python tweet2csv.py "@user #hashtag"
Or, just get usernames of people saying "exact phrase":
$ python tweet2csv.py "'exact phrase'" -c from_user
See Using the Twitter Search API for more examples of queries that can be run against Twitter's Search API