Multiple Operators in Query


Hi! I cannot seem to add a location operator to my search. I’m sure I’m just missing a bit of syntax, but for the life of me I don´t know what and it’s really hard to find exact examples when I search for it.

I’ve built the query as:

‘query’:‘TOPIC’ near:“NAME_COUNTRY”

I´ve tried versions such as:

‘query’:‘TOPIC’, near:“NAME_COUNTRY”

‘query’:‘TOPIC’, “near”:“NAME_COUNTRY”

None works.

Sorry if this is a stupid question, but I’m really stuck here!




Hi @VerBianchini - The search operator near isn’t available with the API. Instead, you can use the place operator, which matches Tweets tagged with the specified location or Twitter place ID. Note that multi-word place names (e.g. “New York City”, “Palo Alto”) should be enclosed in quotes.

So for example:

	"query":"winter place:England"

There are other operators that you can also use to find Tweets based on location. You can read more about these in our documentation here.


@VerBianchini - We also have an extensive tutorial on filtering based on location here.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.