How to get tweets of an account posted in a specific time interval?

search
api

#1

Hello,

The REST API endpoint GET search/tweets provides an until parameter to return tweets created before a given date.
However, it does not provide a since parameter to specify the start date.
Source: https://dev.twitter.com/rest/reference/get/search/tweets

Is there any way to accomplish this task through the rest API that I am missing?
Also, would it be illegal to use instead the Twitter advanced search interface (https://twitter.com/search-advanced?lang=en) which provides both parameters, and then save the tweets manually, and process the results?
The Twitter terms of services specify that scraping is illegal unless prior consent is given.
Is there any way to obtain consent in such case?

Thank you!


#2

Scraping is not a valid way of obtaining Tweet data (and against TOS), and you should use the published programming interfaces.

There is no since parameter but the search endpoint only supports a seven day index, so generally this would not be super-useful as the window would end up being relatively small.


How could I get Twitter data for research?
#3

Thank you for your reply.

Is it safe to assume that each call using the GET search/tweets with the parameter until=T1 would return the set of tweets posted between T1 - 7days and T1?


#4

correct.


#5

Thank you !