I am using the TypeScript SDK (twitter-api-sdk
) and I wondered if it was possible to add a rule (for use by the streamSearch
method) matching tweets whose created_at attribute satisfy a specific time window, such as “created within the last 5 minutes”.
I was not able to find operators able to achieve that. Did I miss anything?
Of course there’s always the option to filter when processing the data, but I’d think that doing this directly in the query would be more efficient.
Thanks!
I’m not sure what problem you’re trying to solve here.
The streaming API always delivers Tweets in real-time i.e. “just created”, so there would be no obvious value to having an additional time-based filter rule.
If you are trying to filter out Retweets (i.e. someone just Retweeted something that was originally Tweeted yesterday), you can already do that using the -is:retweet
syntax.
Ah my bad due to time offset setting I didn’t see that Tweets were streamed in real time. All good!
1 Like