Getting geocode from tweets



I am using GET search/tweets(REST API v1.1) to search for tweets within a specific area as below and I am having some issues:

q=&geocode=51.5171,0.1062,5000mi&count=100&since_id=’+(CALCULATED ID)


  1. Most of the tweets have geocode as null so I am getting the location of the tweet(not the exact) by
    a) if is not null then In most tweets is null.
    b) If the above fails(=null) tweet.user.location.

Why most of the tweets have as null? In a rate of 500 returned tweets I can only get location info for only 50-60. Is there any other way to get location of the tweet?

  1. Having specified the radius of the search at 5000 miles, the search is restricted only to a short distance of the specified longitude and latitude and not at 5000 miles.

  2. I haven’t specified any value for the search query ‘q’ as I want all tweets happening at real time.

It works but I want to know if there is any other more efficient way to succeed my search.

Thank you.


Overall, it is true that a relatively small percentage of tweets have geo information attached. This is likely the main cause of the issue you’ve described (your search parameters are probably fine).