Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

twitter search api no place returned

I am having a bit of trouble sifting through the twitter API. I am trying to search for tweets near a certain location and then see their exact (or approximate) geo coordinates. I understand the geo field is deprecated and now we are supposed to use the "place" field. Unfortunately when I use the following url: http://search.twitter.com/search.json?q=&geocode=30.1829,-97.832,10mi I get a bunch of responses with a location that matches the city of the geo coordinates, but geo: is null and there is no place field. Am I stuck with only having an accuracy up to city coordinates, or am I using the wrong search call?

Thanks in advance!

like image 880
akhalsa Avatar asked Dec 16 '11 20:12

akhalsa


People also ask

Does Twitter remove geolocation?

Tweet location is off by default, and you will need to opt in to the service. You can turn Tweet location on or off at any time. You can delete your past location data from displaying in your Tweets in a single place (see this article for step-by-step instructions).

What is the limit of Twitter's search API?

The default per-minute rate limit for Full-Archive search is 120 requests per minute, for an average of 2 queries per second (QPS). This average QPS means that, in theory, 2 requests can be made of the API every second.

Can I still use Twitter API v1 1?

The v1. 1 search/tweets and the Twitter API v2 recent search endpoint support both OAuth 1.0a User Context and OAuth 2.0 App-Only. Therefore, if you were previously using the standard v1. 1 search endpoint you can continue using the same authentication method if you migrate to the Twitter API v2 version.

What does the Twitter API return?

All Twitter APIs that return Tweets provide that data encoded using JavaScript Object Notation (JSON). JSON is based on key-value pairs, with named attributes and associated values. These attributes, and their state are used to describe objects. At Twitter we serve many objects as JSON, including Tweets and Users.


1 Answers

Remember, tweeting with a geo location is an opt-in process. Twitter will supply a feed from the area for all tweeters in that area, but only those who have opted to tweet their coordinates will show up with "geo" info.

Using q=here with your url it did return 1 tweet for me with "geo" info in this form (though likely it will have moved on down the timeline by the time you try...):

"geo":{"coordinates":[-33.9769,18.5080],"type":"Point"}
like image 57
jsleuth Avatar answered Nov 15 '22 05:11

jsleuth