Talha Anwar
Talha Anwar

Reputation: 2959

How to find tweets of all users from a particular location

I am trying to specify the location in the search bar of Twitter. Here is my query lang:en since:2011-05-15 until:2020-01-13 -filter:links -filter:replies I know there are two parameters like near and within to search based on location. But I am unable to figure, how to use them. I think they are deprecated. But I am not sure.

Upvotes: 0

Views: 381

Answers (1)

Elad Ratson
Elad Ratson

Reputation: 724

Twitter's advance search near: operator works only with names of cities. It is a bit tricky to use it when the city name has 2 or more words and even trickier to use when the desired city is in a country where the language (and original city name) is in a non-latin language.

The more acuarte way to limit a Twitter search to a particular location or place is to use the geocode: operator with latitude,longitude and radius(km/mi) parameters.

For example, your above search query, for tweet originating from the city of New York, you can use the following:

lang:en since:2011-05-15 until:2020-01-13 -filter:links -filter:replies geocode:40.6887908,-73.9273234,30km

The easiest way to get latitude and longitude of places is to user Google Maps. Simply search or pinpoint the desired location. The latitude and longitude are the first 2 parameters after the @ sign in the URL line in the browser, separated with a coma ,:

https://www.google.com/maps/place/New+York,+NY,+USA/@40.6976637,-74.119764,11z/data=!3m1!4b1!4m5!3m4!1s0x89c24fa5d33f083b:0xc80b8f06e177fe62!8m2!3d40.7127753!4d-74.0059728

Upvotes: 1

Related Questions