Is there a way to use the Twitter API to get a user's tweets for a specific time range?
It doesn't seem to be in statuses/user_timeline.
Both Historical PowerTrack and Full-Archive Search provide access to any publicly available Tweet, starting with the first Tweet from March 2006. Deciding which product better suits your use case can be key in getting the data you want when you need it.
30-Day Search API provides data from the previous 30 days. Full-Archive Search API provides complete and instant access to the full corpus of Twitter data dating all the way back to the first Tweet in March 2006.
Pagination is a feature in Twitter API v2 endpoints that return more results than can be returned in a single response. When that happens, the data is returned in a series of 'pages'. Pagination refers to methods for programatically requesting all of the pages, in order to retrieve the entire result data set.
You can use the since
and until
operator.
https://api.twitter.com/1.1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=your_screen_name&since:2011-05-16&until:2011-08-16
But it will do you little good because tweets are searchable in a small time window. To get around this check out several resources,
Snapbird - https://github.com/remy/snapbird
and
20 ways of searching old tweets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With