Search code examples
rtwittertweetsrtweet

How to include language and other filters in Rtweet's search_fullarchive query?


I want to include language filters in my Twitter premium search query in Rtweet's search_fullarchive. I'd like tweets for search query to be in hindi and English.

I have got this so far and it throws error

 tweet <- search_fullarchive("(#x or #Y or #z) lang: (en OR hi) place: India", n = 100, fromDate = "201911250000", toDate = "202001280000", env_name = "xxx", safedir = NULL, parse = TRUE, token = token)

Throws error for --> lang: (en OR hi)

How should I make it work?


Solution

  • You need to use (lang:en OR lang:hi) instead of the way you've got it here. The operator and query go together inside the parentheses.