Geolocation


#1

Hello i am new in the use of the twitter API. How do I locate the tweets of a specific region?


#2

You’ll want to look at the geo operator on the search API. There’s a page on that here.

Two important things to understand:

  • The search API is optimised for recency, not completeness, and has roughly a 7 day history window;
  • Only a very small proportion of Tweets overall are geotagged by the users that post them, so the results are very often quite limited.

#3

There is no way to locate these tweets without they being geotagged?


#5

Correct - geo data is not automatically associated with any Tweets, it is up to the user to choose to add that information at their own discretion when they post.


#6

Ah ok that’s why it’s limited. But the result of the geotagged tweets can be how much percentage


#7

About 1-2% of all Tweets in general.


#8

it’s complicated. And there is way to group the tweets according to the events and count them?


#9

Not in the API, but you could implement that in code.


#10

OK, thanks. For my work of the school I really needed to locate the tweets and group them according to the regions


#11

Hello Mr. andypiper is there way to recover the IP address of the person who tweet?


#12

No. That would be an even more serious privacy violation than providing geo information when a user had not opted to explicitly add it to a Tweet. This data is not available.


#13

But is it possible to group the tweets by age in the code?


#14

That’s a coding issue, not a Twitter API issue - you could just check the dates on the Tweet objects and do your own grouping.