The Wayback Machine - https://web.archive.org/web/20131018123601/https://dev.twitter.com/discussions/7488

search api filtering by geo location error

LaurenFratamico
@LaurenFratamico Lauren Fratamico

I am attempting to use the twitter api GET search (https://dev.twitter.com/docs/api/1/get/search) to get the 100 most recent English tweets from 20 different geo location. I do this as follows:

  1. <python>
  2. conn = httplib.HTTPConnection("search.twitter.com")
  3. full_request = "/search.json?geocode=" + str(geo_location[0])+","+str(geo_location[1])+",2mi&lang=en&result_type=recent&rpp=100"
  4. conn.request("GET", full_request)

where geo_location is the tuple of lat/long data. When I return the tweets for all of these locations, about half of them return the same 100 tweets. Does anybody know why this would happen? Also according to the twitter search documentation, it says that the q parameter is required, however I am not passing a q parameter. Why would it not error?

Thanks for any help!

1 year 25 weeks ago