Closed hwisunbae closed 2 years ago
I am using premium search API, want to filter by language to get only English tweets.
Please investigate how I can filter tweets by language. These are the ways I've tried.
r = api.request('tweets/search/%s/:%s' % (PRODUCT, LABEL), {'query':SEARCH_TERM, 'maxResults':'500', 'lang': 'en'})
r = api.request('tweets/search/%s/:%s' % (PRODUCT, LABEL), {'query':'pizza -lang:en', 'maxResults':'500''})
Premium search operators are listed here: https://developer.twitter.com/en/docs/twitter-api/premium/search-api/overview#AvailableOperators
No hyphen. Use instead: 'query':'pizza lang:en'
I am using premium search API, want to filter by language to get only English tweets.
Please investigate how I can filter tweets by language. These are the ways I've tried.