Some source data is obtained through the X API. Availability and freshness for affected events can reflect that service's stability. Check the official X API status page ↗ when investigating a source-specific interruption.
◴
Caching
Zyrable may cache source results or derived data to control upstream usage and operating cost. A payload can reflect a recently cached state rather than the latest upstream change at the exact moment it is delivered.
Get started
Quickstart
Open a Zyrable WebSocket connection, answer server heartbeats, parse events, and reconnect with bounded backoff.
!
Keep your API key server-side
Do not expose the key in browser code or allow complete WebSocket URLs to enter logs, telemetry, or error reports.
Limits vary by endpoint. Every response includes the values needed to pace requests and back off after a 429.
x-rate-limit-limitRequests allowed in the current interval.
x-rate-limit-remainingRequests remaining in the current interval.
x-rate-limit-reset-after-msMilliseconds until the interval resets.
Check for HTTP 429.
Parse x-rate-limit-reset-after-ms as a number.
Wait that many milliseconds before retrying.
Error responses
Errors use a stable JSON shape containing a short code and human-readable message.
Error shape
{
"code": "NOT_FOUND",
"message": "The resource you requested was not found."
}
StatusCodeMeaning
401UNAUTHORIZEDAuthorization is missing or invalid.
400BAD_CREDENTIALSProvided custom credentials are invalid.
400NOT_WATCHEDThe requested profile is not watched.
404NOT_FOUNDThe requested resource was not found.
400LIMIT_REACHEDThe current plan limit has been reached.
403ACCOUNT_LOCKEDService access is locked for the account.
400RESOURCE_PRIVATEThe requested resource is private.
400USER_SUSPENDEDThe requested profile is suspended.
400INVALID_QUERYThe supplied query is invalid.
500SERVER_ERRORThe request failed inside Zyrable.
429RATE_LIMITEDThe endpoint rate limit was exceeded.
Real-time API
Connect to the event stream
Authenticate one WebSocket connection and implement the Zyrable heartbeat protocol.
WSSwss://api.zyrable.com/v1/events
Authenticate
Pass the Zyrable API key in the required authorization query parameter.
authorizationstringrequired
Your Zyrable API key.
JavaScript
const url = new URL("wss://api.zyrable.com/v1/events");
url.searchParams.set("authorization", process.env.ZYRABLE_API_KEY);
const socket = new WebSocket(url);
!
Query strings can be logged
Redact connection URLs in application, proxy, and error logs. Never commit an API key to source control.
Respond to heartbeats
Server string messages beginning with PING must receive the corresponding PONG message. You may also send pings and use the response to estimate connection latency.
PING…→Your client→PONG…
Reconnect safely
Stop reconnecting during an intentional shutdown.
Retry transient closures with bounded exponential backoff.
Reset backoff after a successful connection.
Keep event deduplication state across reconnects.
Surface repeated authentication failures instead of retrying indefinitely.
Real-time API
Event lifecycle and reference
Every JSON event has a unique id and a literal type. Use the ID for deduplication and the type for dispatch.
◴
Observed state may be cached
Some source results and derived data may be cached. Treat payloads as observed state rather than a guarantee that every field matches the upstream platform at the exact instant of delivery. For source incidents, check the X API status page ↗.
Progressive post lifecycle
New posts can be delivered in three progressively enriched stages. No exact timing is guaranteed.
Never log, transmit, or expose watched.*.credentials. Treat these values as sensitive.
Monitoring API
Watched profiles
Manage the profiles Zyrable monitors, inspect plan usage, retrieve active live sessions, and identify monitoring problems.
!
Protect custom credentials
The optional credentials value enables account-specific monitoring contexts. Treat it as sensitive and never place it in logs, analytics, or client-side code.
Endpoints 5 endpoints
GET/v1/watchedList watched profiles−
Returns plan usage and a map of watched profile IDs. Set expanded to a number to include handle, priority, timestamps, and credential metadata.
invalid-credentialsCustom credential cookies are invalid.
locked.credentialsThe credential account is restricted.
not_following.userThe credential account does not follow the watched profile.
Monitoring API
Watched searches
Manage persistent social search queries and receive matching posts through search.tweets.update events.
◴
Query results may be cached
Zyrable may cache source results or derived data to control upstream usage and operating cost. Validate query behavior before relying on it for long-running monitoring.
Endpoints 3 endpoints
GET/v1/search/watchedList watched queries−
Returns search plan usage and a map of watched query IDs to their query text and recent volume.
Retrieve public posts, profiles, relationships, and communities without first adding the source to watched monitoring.
i
Freshness and availability
Responses can reflect cached source results or derived data, and affected requests rely on X API stability. Check the official X API status page ↗ during source-specific incidents.
→
Forward pagination
Paginated endpoints accept the prior x-next-cursor value in the x-cursor request header. Retain earlier cursors yourself if your application needs backward navigation.
These contract names remain platform-specific where renaming them would misrepresent the current API payload.
i
Nullability and enrichment
Timestamps are JavaScript numbers in milliseconds. Nullable rich fields can be unavailable in an initial event and populated by later expanded or complete events.