The filtered stream endpoint group enables developers to filter the real-time stream of public Tweets. This endpoint group’s functionality includes multiple endpoints that enable you to create and manage rules, and apply those rules to filter a stream of real-time Tweets that will return matching public Tweets. This endpoint group allows users to listen for specific topics and events in real-time, monitor the conversation around competitions, understand how trends develop in real-time, and much more.

Developers can use the RESTful rules endpoint to add and remove up to 25 rules, each one up to 512 characters long, to a persistent stream connection without needing to disconnect. These filter queries can be created with operators that match on Tweet attributes, such as message keywords, hashtags, and URLs. Operators and rule clauses can be combined with boolean logic and parentheses to help refine the filter’s matching behavior.

Once a connection is established, Tweet objects are delivered in JSON format through a persistent HTTP Streaming connection. You will only receive content matching your rules while connected to the stream.

To access this endpoint, you must have an approved developer account, and have activated the new developer portal. When authenticating, you must use keys and tokens from a developer App that is located within a Project. Learn more about getting access to the Twitter API v2 endpoints in our "Getting started" page.

Was this document helpful?

Thank you

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.