how to get twitter top tweets in specific language?

1.1k views Asked by At

With this url you can get the 100 best recent tweets which have the word 'ALI':

https://api.twitter.com/1.1/search/tweets.json?q=ALI&result_type=popular&count=100&lang=en

But how can we keep q empty ?

I just want to get the top tweets by language and not by keyword.

I tried to put space for the q but it didn't work.

1

There are 1 answers

0
Yuri Schimke On BEST ANSWER

Use a term like "lang:et" or "lang:ja". Most of the features are part of the "q" param instead of additional params.

You can generally experiment with search by going to Advanced Search and after you search copy the query out of the search bar at the top right of the page.

e.g. 1 Japanese tweets, using q=lang%3Aja

$ twitterapi '/1.1/search/tweets.json?q=lang%3Aja&result_type=popular&count=1' | jq .statuses[].text
"ぽい!ま〜きの"