Hi guys, I am new to Python and Twitter API’s, so my question might be too basic but I do not know how to solve the problem.
I am using TwitterAPI (GitHub - geduldig/TwitterAPI: Minimal python wrapper for Twitter's REST and Streaming APIs) to search tweets with Premium API’s.

My search parameters work well without lang filter. I would like to search specific language tweets with the Premium Search API. Below is the query without lang parameter, that works fine.

pager = TwitterPager(api, 'tweets/search/30day/:30da', {'query': SEARCH_TERM, 'fromDate':"201809180000",'toDate':'201809200000'})

But when I add lang parameter, that does not work:

pager = TwitterPager(api, 'tweets/search/30day/:30da', {'query': SEARCH_TERM, 'lang':'tr', 'fromDate':"201809180000",'toDate':'201809200000'})

What is the problem with the lang parameter?

Thanks in advance.

1 Like

Hi, I figured out. For the future inquiries:
We put the lang parameter within the search term as

pager = TwitterPager(api, 'tweets/search/30day/:30da', {'query': 'searchterm lang:tr', 'fromDate':"201809180000",'toDate':'201809200000'})

Admin, can you please close the issue?

Regards

1 Like