The statuses/user_timeline
part of the Twitter API returns geolocation data as "place" along with each Tweet. The search API, on the other hand, does not return this location data (as far as I can tell). Is there a way to get location data with the search API?
There is a geo
field in each result of the search
resource (see the example in the documentation), which is a form of geolocation, but is not the exact same thing as the place
field in the statuses/user_timeline
.
Alternatively you can make another request using the id
of the result through the statuses/show/:id
resource (see documentation) which returns both the geo
and place
fields, but that would mean making one more request per result.
Matt asked this question directly to Twitter and got a response, and the dev who answered pointed out that the JSON format does include a 'geo' attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With