Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter API tweets for time range

Tags:

twitter

api

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.

like image 646
Tom Kincaid Avatar asked Oct 05 '11 00:10

Tom Kincaid


People also ask

Can you get old tweets from Twitter API?

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.

How far back can you go with Twitter API?

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.

What is pagination in Twitter API?

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.


1 Answers

You can use the since and until operator.

https://api.twitter.com/1.1/statuses/user_timeline.json?include_entities=true&inc‌​lude_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

like image 85
Chamilyan Avatar answered Oct 03 '22 17:10

Chamilyan