Search tweets using location parameter in REST API


#1

how to search tweets based location parameter in REST API?
eg. i will get tweet from specific city


#2

Firstly - note that very few users choose to geotag their Tweets. This is an opt-in operation and overall around 1-2% of Tweets carry geo information.

Beyond that, the Search API is documented here https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html and you’ll want the geocode parameter.

Hope that helps.


#3

is it different from streaming_api that can take tweets based on location?


#4

Yes, the streaming API is realtime with no look back, and requires an active connection; the search API requires you to poll the service (and has a 7 day history limit).


#5

what we can search tweets based on user location in profil user at the time user registration in twitter firstly?