How can I use Twitter Search API
(or other) to get a list of tweets which have the \"geo\"
param?
--EDIT--
By example: I wont get list
Use -180,-90,180,90
to get any geotagged tweet.
You can look for every tweet but save only the geotaged ones. I know it dont make a lot of sense, but works quite well.
if you call you search results, you can state
for result in results:
if result.geo != None:
print result.text.encode('utf-8', errors='ignore') # or do anything you want with the tweets
Looks like the latest API supports that; simply use a large enough geo region for your query:
-180,-90,180,90
See more from the API link for filter and location
The streaming API allowed you to filter by a location and the search API allows you to search by geocode. You can find more information on these services on our developer resources site.
Streaming API: http://dev.twitter.com/pages/streaming_api
Example: Create a file called ‘locations’ that contains, excluding the quotation marks, the phrase: “locations=-122.75,36.8,-121.75,37.8,-74,40,-73,41” then execute:
curl -d @locations http://stream.twitter.com/1/statuses/filter.json -uAnyTwitterUser:Password.
You will receive all geo tagged tweets from the San Francisco and New York City area.
Search API: http://dev.twitter.com/doc/get/search
Example:
http://search.twitter.com/search.json?geocode=37.781157,-122.398720,1mi
From the Twitter API
Documentation, this should be the format of your search query:
http://search.twitter.com/search.json?geocode=37.781157,-122.398720,1mi
Where 37.781157
is the latitude, -122.398720
is the longitude and 1mi
is the radius to search within.