1
votes

I want to get all the tweets of a user using twitter API 1.1 and this end point:

https://api.twitter.com/1.1/statuses/user_timeline.json

The documents of twitter API https://dev.twitter.com/rest/reference/get/statuses/user_timeline says there's a limit which is 3200 (the parameter count). If that's the case, how do I retrieve all(!) of the tweets of a user, not only 3200?

2

2 Answers

2
votes

The simple answer is that you cannot.

The longer answer is that there are two ways around this.

  1. The user can request their Twitter archive. That will contain a list of every Tweet they have sent.
  2. The new search API indexes every Tweet. You can, theoretically, search for each Tweet. However, if you don't know what you're searching for, it's unlikely to work.
1
votes

just from the API documentation: https://dev.twitter.com/rest/reference/get/statuses/user_timeline

Have you tried to send several requests setting different values for since_id and max_id?

max_id: Returns results with an ID less than (that is, older than) or equal to the specified ID.

since_id: Returns results with an ID greater than (that is, more recent than) the specified ID.