As explained in the DOCS ,

The recent search endpoint allows to get topics for the last 7 days.
However, it seems there is no way to filter within these 7 days. The query looks like this:
https://api.twitter.com/2/tweets/search/recent?query=Barcelona contaminación&tweet.fields=public_metrics,author_id,created_at

How to filter by date within those 7 days?

Thanks

Oh, that part is here: Search Tweets - How to paginate | Docs | Twitter Developer Platform

using the start_time and end_time request parameters.

It’s in YYYY-MM-DDTHH:mm:ssZ format GET /2/tweets/search/recent | Docs | Twitter Developer Platform

2 Likes