Vojtiik
Vojtiik

Reputation: 2560

Twitter API 1.1 search/tweets - search by date

Since the "since" param is no longer in use, how can I search tweets older than specific date ? I understand how to use since_id, but in my case I don't have any historic tweet to take the tweet_id from. How is search by date done these days ?

Upvotes: 2

Views: 2650

Answers (2)

Moradnejad
Moradnejad

Reputation: 3673

It's an old question, but since it has no answer i share what i have found regarding this question by reading the docs and using the API.

Since and until params are only for maximum 9 past days.

Instead we can use since_id and max_id. You have to set them to unique ids of tweets. You can find one tweet in the specified time (from any user you want). Detect the id by using the API or simply by Developer tools of your browser.

Upvotes: 1

JackPoint
JackPoint

Reputation: 4111

You can use the until param:

Returns tweets generated before the given date. Date should be formatted as YYYY-MM-DD. Keep in mind that the search index may not go back as far as the date you specify here.

Upvotes: 0

Related Questions