skip to Main Content

I want to collect all tweets in English using tweepy. Twitter search API can be used here, but I don’t know what to give in ‘query’ part of api. From documentation I understand that this part is required.

How to handle this query part and collect all English tweets?

2

Answers


  1. I am not sure how you can do this with Tweepy but if you can directly invoke a Twitter endpoint you just have to add the lang parameter as followed :

    https://api.twitter.com/1.1/search/tweets.json?q=your_search&lang=en

    Login or Signup to reply.
  2. If you want to gather all Tweets in English – that’s impossible without access to Twitter’s GNIP platform.

    What you can do, is use the streaming API to get a sample of all English Tweets.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search