Hi,
I am using Client.search_all_tweets tweepy to get archive tweets from users timeline. Although the max results can be up to 500 as per the documentation here and also as mentioned by Twitter here “This endpoint can deliver up to 500 Tweets per request in reverse-chronological order”, I am getting an error that the number of tweets should be between 10 and 100 max per request. Kindly advise as having 100 per request is making the collection process really slow especially that I am getting a rate limit message every 2 to 3 requests.

Whats the full request look like with all the parameters you’re setting? Client — tweepy 4.10.1 documentation if you have context annotations in tweet fields the max is 100.

I am getting a rate limit message every 2 to 3 requests.

This is probably more due to the 1 call per second rate limit, which can sometimes come up when looping over sets of inputs as the library usually takes care of calls made sequentially when paginating but not when multiple requests are happening.

I remember we had and solved a similar problem with twarc twarc2 (en) - twarc

1 Like

Thanks a lot Igor. Solved now and the issue was that I had the context annotations as one of the tweet fields as you said.

1 Like