ResolvedTweet object encoded as JSON.
Connection
Connect to the WebSocket endpoint by passing your API key as thex-api-key header during the upgrade handshake.
Your unique API key. The connection will be rejected with HTTP 401 if this is
missing or invalid.
Code Examples
Keep-Alive
The server sends WebSocket ping frames every 30 seconds to keep idle connections alive. If your client does not respond with a pong within 60 seconds, the connection will be terminated. Most WebSocket libraries handle ping/pong automatically. If yours doesn’t, send a"ping" text message and the server will respond with "pong".
Events (Tweet Payload)
Every message you receive is a JSON-encodedResolvedTweet object. The payload contains the full tweet and author information.
Unique tweet ID.
Full text of the tweet.
ISO 8601 timestamp of when the tweet was created.
BCP 47 language tag (e.g.
"en", "fr").Like count.
Retweet count.
Reply count.
Quote count.
Bookmark count.
The account that posted the tweet.
Parsed entities extracted from the tweet text.
Attached media items (photos, videos, GIFs). Each item contains
media_url_https, type, and an optional video_info block.true if this is a retweet.The original tweet object when
retweeted_tweet is true.The quoted tweet when this is a quote-tweet.
Extended text for long-form “Note Tweets”.
ID of the tweet being replied to.
ID of the root tweet in the conversation thread.
Example Payload
Error Codes
| Code | Reason |
|---|---|
401 Unauthorized | x-api-key header is missing. |
401 Invalid API Key | The provided key does not exist. |
| Connection closed | Your session was idle for more than 60 seconds with no pong reply. |