q parameter is optional, geocode too (see docs ).
This works for me:
import tweepy auth = tweepy.OAuthHandler(<consumer_key>, <consumer_secret>) auth.set_access_token(<key>, <secret>) api = tweepy.API(auth) results = tweepy.api.search(geocode="38.376,-0.5,8km", rpp=1000) for result in results: print result.text print result.location if hasattr(result, 'location') else "Undefined location"
Hope this helps.
source share