Search code examples
curltwitter

Using Twurl to get a geolocated set of screen names


I'm trying to use Twurl to capture a json file with the contents of this search:

https://twitter.com/search?f=users&q=keyword%20near%3A"United%20Kingdom"%20within%3A15mi&src=typd

I tried:

twurl /1.1/users/search.json?q=keyword%20near%3ALondon%20within%3A15mi
twurl /1.1/users/search.json?q=keyword%20near%3A"London%20within%3A15mi
twurl  /1.1/users/search.json -X "Content-Type: application/json" -d '{"query":"keyword","maxResults":"100","near":"London, England","within":"1500mi"}'

And many variations. the get/Users API documentation doesn't list geolocation as an option, but I thought any search which can be constructed using the search api could be queried using Twurl. What am I missing?


Solution

  • You've answered your own question here. The documentation would list a geocode option if this was possible. The users/search endpoint only supports keywords, which match across the user profile. There is no geo search for users in the API.