Documentation Index Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
This page provides a complete list of operators available when building rules for Powerstream .
Overview
Powerstream uses Boolean queries with operators to filter Posts based on keywords and metadata. Rules can be up to 2,048 characters and you can have up to 1,000 rules.
User Operators
Operator Summary Example from:Matches posts from a specific user from:xdevelopers or from:123456to:Matches posts directed to a specific user to:jvaleskiretweets_of:Matches reposts of a specific user retweets_of:xdevelopers
Content Operators
Operator Summary Example contains:Matches posts containing specific text/keywords contains:hello or contains:-2345.432url_contains:Matches posts with URLs containing specific text url_contains:"com/willplayforfood"lang:Matches posts in specific languages lang:en
Entity Operators
Operator Summary Example has:Matches posts containing specific entities has:images, has:geo, has:mentionsis:Matches posts of specific types or properties is:retweet, is:reply
Available has: options
has:mentions — Posts that mention another user
has:geo — Posts with geolocation data
has:links — Posts containing links
has:media — Posts containing media
has:lang — Posts with detected language
has:symbols — Posts containing cashtags
has:images — Posts containing images
has:videos — Posts containing videos
Available is: options
is:retweet — Retweets
is:reply — Replies to other posts
Location Operators
Operator Summary Example place:Matches posts from specific places/locations place:"Belmont Central" or place:02763fa2a7611cf3bounding_box:Matches posts within a geographic bounding box bounding_box:[-112.424083 42.355283 -112.409111 42.792311]point_radius:Matches posts within a radius of a point point_radius:[-111.464973 46.371179 25mi] or point_radius:[-111.464973 46.371179 15km]
User Profile Operators
Operator Summary Example bio:Matches posts from users with specific bio content bio:"data scientist"bio_name:Matches posts from users with specific name in bio bio_name:PhD
Post Reference Operators
Operator Summary Example retweets_of_status_id:Matches reposts of specific posts retweets_of_status_id:1234567890123456789in_reply_to_status_id:Matches replies to specific posts in_reply_to_status_id:1234567890123456789
Special Syntax Operators
Operator Summary Example @Mention operator @username"phrase"Matches exact phrases "exact phrase"
Logical Operators
Operator Summary Example ORLogical OR between expressions x OR facebookSpace/AND Logical AND between expressions x facebook (both terms must be present)()Grouping for complex expressions (x OR facebook) iphone-Negation/exclusion x -facebook (x but not facebook)
Building rules
Basic examples
# Match posts from a specific user
from:xdevelopers
# Match posts containing keywords
contains:API contains:developer
# Match posts with images in English
has:images lang:en
Combining operators
# Posts from @xdevelopers OR @api that aren't retweets
(from:xdevelopers OR from:api) -is:retweet
# Posts mentioning AI with images, excluding retweets
contains:AI has:images -is:retweet lang:en
# Posts within 25 miles of a location
point_radius:[-73.935242 40.730610 25mi] lang:en
Next steps
Powerstream introduction Get started with Powerstream
Handling disconnections Handle streaming disconnections
Recovery and redundancy Recover missed data