Skip to main content
Connect to wss://scrape.st/ws for bidirectional, real-time data streaming across all sources. WebSocket delivers full SourceEvent payloads for every tracked source.

Connection

Query Parameters

Append to the WebSocket URL:

Event categories (types)

Every message carries a top-level event field naming its category. By default a connection only receives source events — opt into derived events explicitly:
Unknown values are ignored; an empty or missing types falls back to source.

Event Flow

When useFastX=true, you receive two events per post:
  1. fast-x — Arrives ~50ms after posting. Contains basic post data (text, author, timestamp) before GraphQL enrichment.
  2. x — Arrives ~200-500ms after posting. Full ResolvedXPost with engagement counts, media, entities, quoted posts.
If you only need speed and don’t care about engagement metrics, set ignoreFullPayload=true to skip the second event.

Keepalive

The server pings idle connections every 30 seconds. Connections with no activity for 60 seconds are terminated. To keep your connection alive, respond to pings (automatic in most WebSocket libraries) or send a manual ping:

Reconnection

WebSocket does not auto-reconnect. Implement retry logic:

Payload Shape

Every message carries an event category and a stable id. A plain source event looks like:
See source pages for full payload details: X · Telegram · Discord