What is the best alternative to the X (Twitter) filtered stream?

Get an API key See pricing

If your filtered stream rules mostly read from:account, the closest replacement is a WebSocket that streams every post from a list of accounts. Xanguard's B2B API does that: add the handles, connect to one socket, and receive tweets, replies, quotes, reposts and deleted tweets with a median detection under 250 ms (published live), from $49 a month for 50 accounts. No X developer account is needed.

This page covers what X's filtered stream offers today, how each kind of rule maps to Xanguard, a migration in Python and Node, what you gain and lose, and the monthly cost against X's pay-per-use pricing. X facts below were read on docs.x.com on 20 November 2026.

X's filtered stream in 2026: the facts

X filtered stream, pay-per-useX filtered stream, EnterpriseXanguard B2B API
TransportPersistent HTTP connection (blank keep-alive every 20 s); webhook optionSame, plus Powerstream on select Enterprise plansWebSocket: wss://api.xanguard.tech/v1/dt/realtime/ws
What you subscribe toUp to 1,000 rules, 1,024 characters each25,000+ rules, 2,048 charactersA list of accounts: 50, 250, 500 or 1,000 per plan
Connections1MultipleUp to 5 at once per account
Stated latencyAbout 4 to 5 seconds P99Powerstream: "lowest-latency", no figureMedian detection under 250 ms, measured hourly at /speed
Throughput cap250 posts a secondNot statedEvery post from your accounts
Deleted tweetsNot in the stream (X's Activity API has a separate post.delete event)SameYes, every plan
Follows, profile changesSeparate product (X Activity API)Separate productSame socket on Pro and Enterprise
Price$0.005 per post read; 3 million post reads a month capOn requestFlat: $49 for 50 accounts to $849 for 1,000 (Starter)
PaymentCard, prepaid creditsPriced on requestSOL, activates automatically

X sources: filtered stream introduction, rate limits and pricing, read 20 November 2026. X notes that prices are subject to change.

How filtered stream rules map to Xanguard

Xanguard does not take rule strings. It takes accounts, and optional filters you send once at login. Most account-based rules translate directly:

Filtered stream ruleXanguard equivalent
from:elonmuskAdd the handle: POST /v1/dt/targets {"handle": "elonmusk"}
from:a OR from:b OR from:c (many rules)One handle list, up to your plan's limit. No rule length to manage
from:x -is:retweetLogin filter "types": ["tweet", "quote", "reply"]
from:x -is:replyLogin filter "types": ["tweet", "quote", "retweet"]
from:x has:cashtagsLogin filter "onlyTicker": true (each event also carries data.cashtags)
Rules that look for a token contract addressLogin filter "onlyCA": true
from:x bitcoin (keyword inside an account's posts)Stream the account and match the keyword on data.text in your client
bitcoin lang:en, #hashtag, @mention across all of XNo equivalent on the stream. Keep X's filtered stream for these

Filters only ever remove events, and a login with just the key gets everything. Once you send a types list it applies to non-tweet events too, so add "deleted" (and "follow", "unfollow" on Enterprise) to keep them. Full filter reference: B2B REST docs.

Migration in two steps

1. Turn your from: rules into handles

# Python: read your current rule values, keep the from: handles, add them to Xanguard
import re, requests

KEY = "dt_YOUR_API_KEY"
rules = ["from:elonmusk -is:retweet", "from:VitalikButerin OR from:cz_binance"]

handles = sorted({h.lower() for r in rules for h in re.findall(r"from:(\w+)", r)})
for h in handles:
    r = requests.post("https://api.xanguard.tech/v1/dt/targets",
                      headers={"Authorization": f"Bearer {KEY}"},
                      json={"handle": h}, timeout=10)
    print(h, r.status_code)   # 201 added, 409 already tracked

2. Replace the stream reader

Python (asyncio, pip install websockets):

import asyncio, json, websockets

URL = "wss://api.xanguard.tech/v1/dt/realtime/ws"
KEY = "dt_YOUR_API_KEY"

async def main():
    async with websockets.connect(URL) as ws:
        hello = json.loads(await ws.recv())                 # op 10 HELLO
        beat = hello["d"]["heartbeat_interval"] / 1000
        await ws.send(json.dumps({"op": 2, "d": {           # op 2 LOGIN with filters
            "api_key": KEY, "types": ["tweet", "quote", "reply", "deleted"]}}))

        async def heartbeat():
            while True:
                await asyncio.sleep(beat)
                await ws.send(json.dumps({"op": 1}))
        hb = asyncio.create_task(heartbeat())

        async for raw in ws:
            msg = json.loads(raw)
            if msg["op"] == 0 and msg["d"]["event"] == "twitter.post.new":
                t = msg["d"]["data"]
                print(t["author"]["handle"], t["text"])
            elif msg["op"] == 3:                            # DISCONNECT: read d.code
                print("disconnect:", msg["d"].get("code")); break
        hb.cancel()

asyncio.run(main())

Node.js 22+ (built-in WebSocket):

const ws = new WebSocket('wss://api.xanguard.tech/v1/dt/realtime/ws');
const KEY = 'dt_YOUR_API_KEY';
let hb;

ws.onmessage = (e) => {
  const m = JSON.parse(e.data);
  if (m.op === 10) {                                    // HELLO
    ws.send(JSON.stringify({ op: 2, d: { api_key: KEY, types: ['tweet', 'quote', 'reply', 'deleted'] } }));
    hb = setInterval(() => ws.send(JSON.stringify({ op: 1 })), m.d.heartbeat_interval);
  } else if (m.op === 0 && m.d.event === 'twitter.post.new') {
    console.log(m.d.data.author.handle, m.d.data.text);
  } else if (m.op === 3) {                              // DISCONNECT
    console.warn('disconnect:', m.d.code);
  }
};
ws.onclose = () => clearInterval(hb);                  // reconnect with backoff in production

These are minimal readers. The production clients in the docs add reconnect with backoff and heartbeat-ACK checks: B2B WebSocket docs, Python client guide, Node client guide.

Field mapping

What you gain and what you lose

You gainYou lose
A published median detection under 250 ms, against X's stated P99 of about 4 to 5 sKeyword, hashtag, mention and language rules across all of X
Deleted-tweet events on every plan, with the deleted text when it was seenSearch and history: Xanguard has no archive (opt-in replay covers the last 15 minutes)
Profile changes and new followers (Pro), follows and unfollows (Enterprise) on the same socketPosting, replies, DMs and every other write action
Up to 5 concurrent connections for redundancyCard payment: Xanguard is paid in SOL
A flat monthly price, no per-post metering and no 3 million post capFirst-party data and terms from X itself
No X developer account, app review or credit top-upsLists above 1,000 accounts: published plans stop at 1,000

If most of your rules are keyword rules, stay on X's filtered stream. If most are from: rules, the handle list is simpler, faster and usually cheaper. Many teams run both.

Price: Xanguard vs X pay-per-use

Formula: X cost per month = accounts × posts a day × 30 × $0.005. The table assumes every post is read once and counts post reads only. Posting rates of 7 and 20 a day are example assumptions; check your own accounts' rates.

AccountsX API, 7 posts/day eachX API, 20 posts/day eachXanguard Starter (flat)
50$52.50$150$49
250$262.50$750$229
500$525$1,500$449
1,000$1,050$3,000$849

Quiet lists are the exception: 50 accounts posting once a day cost about $7.50 a month on X, well under $49. For the full X price list and other providers, see X API cost in 2026.

Pricing

AccountsStarter (tweets + deleted tweets)Pro (+ profile changes, new followers)Enterprise (+ follows and unfollows, image OCR)
50$49/mo$99/mo$249/mo
250$229/mo$429/mo$979/mo
500$449/mo$749/mo$1,649/mo
1,000$849/mo$1,349/mo$2,849/mo

Keys come from @B2B_Xanguard_bot. Payment is in SOL and the plan activates automatically when it confirms. Prices from the live plan list on 20 November 2026.

Twitter/X WebSocket API · Latency compared · Follow and unfollow events API · SocialData alternative · Xanguard vs the X API · X feed for trading terminals

Frequently Asked Questions

Does the X API filtered stream use WebSockets?

No. X's filtered stream is a persistent HTTP connection that sends JSON lines and a blank keep-alive line every 20 seconds, according to X's filtered stream documentation (checked 20 November 2026). Xanguard's B2B API is a WebSocket at wss://api.xanguard.tech/v1/dt/realtime/ws with a login, heartbeat and event opcodes.

How fast is the X filtered stream?

X's documentation states approximately 4 to 5 seconds of P99 latency for the filtered stream and points to Powerstream, an Enterprise product, for lower latency (checked 20 November 2026). Xanguard publishes its own measured figure: median tweet detection under 250 ms, refreshed hourly at xanguard.tech/speed.

How much does the X filtered stream cost?

X's pay-per-use pricing bills post reads at $0.005 per post, with a cap of 3 million post reads per monthly billing cycle before Enterprise (pricing page checked 20 November 2026). 50 accounts posting 7 times a day is about 10,500 posts, or $52.50 a month. Xanguard is flat: $49 a month for 50 accounts.

How many rules does the X filtered stream allow?

On pay-per-use access: 1,000 rules per project, 1,024 characters per rule and 1 connection. Enterprise raises this to 25,000+ rules, 2,048 characters and multiple connections (X filtered stream docs, checked 20 November 2026). Xanguard has no rules: you list up to 1,000 accounts per plan and get every post they make.

Can Xanguard filter by keyword like a filtered stream rule?

Not on the server. Xanguard streams everything the accounts you list post, and lets you narrow it at login by tweet type (tweet, reply, quote, retweet), to tweets with a cashtag, or to tweets with a contract address. Keyword matching inside those accounts' posts is a one-line check in your client. Keyword rules across all of X have no equivalent on the stream.

What do I gain by switching from the filtered stream?

Deleted-tweet events on every plan, profile changes and new followers on Pro, follow and unfollow events on Enterprise, a published median detection under 250 ms, up to 5 concurrent connections for redundancy, and a flat monthly price instead of per-post billing. You need no X developer account.

What do I lose by switching?

Keyword, hashtag, mention and language rules across all of X, historical search and backfill beyond the opt-in 15-minute tweet replay, posting and other write actions, card payment (Xanguard is paid in SOL), and first-party data from X itself. Many teams keep the X API for those and use Xanguard for the account feed.

Is there a free alternative to the X filtered stream?

Not for developers. X has no free read tier, and Xanguard's B2B API starts at $49 a month. Xanguard's Telegram bot tracks 1 account free if you only need alerts in Telegram, not a stream into your code.

Replace your filtered stream rules with a handle list

Move your from: rules to a handle list and compare both feeds side by side. Starter streams 50 accounts for $49 a month.