These endpoints provide similar functionality to the standard v1.1 POST statuses/filter endpoint and the enterprise PowerTrack API product. While elevated levels of v2 access are coming soon, developers in need of higher levels of access should explore the PowerTrack API.
Learn more about the new Twitter API v2: Early Access.
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 REST rules endpoint to add and remove rules to a persistent stream connection without needing to disconnect. These rules 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 you've added a set of rules, you can establish a streaming connection which will start to deliver Tweet objects in JSON format through a persistent HTTP Streaming connection. You will only receive content matching your rules while connected to the stream.
Standard product track
If you are using a Standard Project at the Basic access level, you can add up to 25 concurrent rules to your stream, and each rule can be up to 512 characters long. You can only use the Core operators when building your rules for a Standard Project.
Academic product track
If you are using an Academic Research Project at the Basic access level, you can add up to 1,000 concurrent rules to your stream, and each rule can be up to 1,024 characters long. You can use both Core and Advanced operators when building your rules for an Academic Research Project. You can also use the recovery features, redundant connections and backfill to connect to a given stream up to two times to maximize up-time, and to recover up to five minutes of lost Tweets during a disconnection.
To access this endpoint, you must have an approved developer account. When authenticating, you must use keys and tokens from a developer App that is located within a Project. The returned Tweets from filtered stream count towards the monthly Tweet cap.
Learn more about getting access to the Twitter API v2 endpoints in our "Getting started" page.