How to get the location of tweets using the Twitter Search API

The statuses/user_timeline the Twitter API returns geolocation data as a “place” along with each twitter. The search API, on the other hand, does not return location data (as far as I can tell). Is there a way to get location data using the search API?

+7
source share
2 answers

Each result of the search resource has a geo field (see the example in the documentation ), which is a form of geolocation, but not the same as the place field in statuses/user_timeline .

Alternatively, you can make another request using the result id via the statuses/show/:id resource (see documentation ), which returns both geo and place , but that would mean making another request for the result.

+2
source

Matt asked this question directly on Twitter and received an answer , and the developer who answered indicated that the JSON format includes 'geo'.

+1
source

All Articles