I am following up on a previous question.

Goal
Trying to return all tweets from the previous week from a given list.

Problem
Now that I have tried paginating my results by using a cursor, I have come to the next limit issue. I am only returning 720 tweets with the following code:

Code
test_max_pages = tweepy.Cursor(api.list_timeline
, list_id=‘example_list’
, since_id=‘id_from_7_days_ago’
, include_rts=0
, tweet_mode=“extended”
, count=200
).pages()

Conclusion
I was under the impression that using the .page() parameter of the Tweepy cursor would allow me to pull much more than just 720 tweets. It’s only going back 10 hours rather than the full 7 days that the since_id should be querying.

Have I run up against another limit? If so, is there a work around?

I can’t remember exactly but it might be limited to the last 800 tweets or something like that? Or the last 3200 - either way, you’re not going to be guaranteed the last 7 days worth of tweets from that endpoint - the search endpoint will give you the last 7 days but it can’t query by list, so you’ll have to specify a long query like

(from:user1 OR from:user2 OR from:user3..) since:2021-12-01

Or something like that.

1 Like

The limit must be 800 on list_timeline then because I haven’t been able to get past seven hundred something (with the deleted tweets not showing up that would make that add up to 800).

Do you have any links to documentation which will guarantee my ability to return the last 7 days from a list? The list I’m looking at could have up to 10k tweets in that timeframe.

There is no guarantees in v1.1, the Search API is “roughly 7 days” Twitter's search endpoints | Docs | Twitter Developer Platform and it’s not a complete index. The lists statuses endpoint seems incomplete too - so i think your best bet is the v2 Recent search, using the from: operators instead.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.