Home > other >  How to only get the last 5 minutes tweets from Twitter API
How to only get the last 5 minutes tweets from Twitter API

Time:07-30

I am using the twitter V2 API, how would I be able to only get the last 5minutes tweets from the api, using https://api.twitter.com/2/users/:id/tweets link

CodePudding user response:

One of the tweet.fields parameters that it can take is created_at, which is passed in the form of an ISO-8601 timestamp. You can set that timestamp to be 5 minutes ago, to get the newest tweets

  • Related