Base Message Format
Every message sent over the websocket follows this base format:Tweet Events
tweet.mini.update
The fastest event for any new tweet. Sent immediately with compressed data.
tweet.mini.update
The fastest event for any new tweet. Sent immediately with compressed data.
tweet.update will follow shortly after if the tweet:- Is quoting, replying to, or retweeting another tweet
tweet.update
Full tweet data including subtweets (up to 2 levels deep).
tweet.update
Full tweet data including subtweets (up to 2 levels deep).
tweet.mini.update with complete tweet data including resolved subtweets.Note: Subtweet chains are resolved up to 2 levels deep. If a chain is 3+ levels (e.g. a retweet of a reply to another tweet), levels 3+ will have minimal/default data. See tweet.full for fully resolved deep chains.tweet.update.expanded
Expanded tweet data with full text and article content.
tweet.update.expanded
Expanded tweet data with full text and article content.
tweet.update but with full untruncated text and article content if present.Only sent when:- The tweet text was truncated in
tweet.update - The tweet contains an article
tweet.full
Fully resolved deep chain (3-5+ levels) with complete data at every level.
tweet.full
Fully resolved deep chain (3-5+ levels) with complete data at every level.
tweet.mini.updatearrives first (fastest)tweet.updatearrives ~60ms later (levels 3+ may have empty data)tweet.fullarrives ~200-500ms later (all levels fully resolved)
tweet.update, levels 3-5 would have empty/default data. In tweet.full, every level has complete data.Supports up to 6 levels including the main tweet, we might increase it in the future, but 6 levels seems good for most use cases for nowProfile Events
profile.pinned.update
Fired when a tracked user pins a tweet to their profile.
profile.pinned.update
Fired when a tracked user pins a tweet to their profile.
profile.unpinned.update
Fired when a tracked user unpins a tweet from their profile.
profile.unpinned.update
Fired when a tracked user unpins a tweet from their profile.
profile.update
Fired when a tracked user updates their profile information.
profile.update
Fired when a tracked user updates their profile information.
Activity Events
following.update
Fired when a tracked user follows or unfollows another account.
following.update
Fired when a tracked user follows or unfollows another account.
tweet.deleted
Fired when a tracked user's tweet is deleted.
tweet.deleted
Fired when a tracked user's tweet is deleted.
Types
TwitterUser
TwitterUser
Complete user profile data.
TwitterUser
Complete user profile data.
| Field | Description |
|---|---|
id | The user’s account ID |
handle | The user’s handle (without @) |
private | Whether the account is currently private |
verified.type | blue = blue checkmark, gold = business/organization, gray = government/official, none = not verified |
verified.label | Affiliated organization info (badge, description, profile link) — null if none |
sensitive | Whether the account is flagged for sensitive content |
restricted | Whether the account is restricted for unusual activity |
joined_at | UNIX timestamp in milliseconds |
profile.pinned | Array of pinned tweet IDs |
metrics.friends | Mutual followers (people who follow the user and the user follows back) |
TwitterMiniUser
TwitterMiniUser
Compressed user data for fast delivery.
TwitterMiniUser
Compressed user data for fast delivery.
TwitterTweet
TwitterTweet
Complete tweet data with all fields.
TwitterTweet
Complete tweet data with all fields.
| Field | Description |
|---|---|
subtweet | The nested tweet this tweet references (reply parent, quoted tweet, or retweeted tweet). Recursive — can contain its own subtweet. |
reply | If this is a REPLY, contains the ID and handle of the tweet being replied to |
quoted | If this is a QUOTE, contains the ID and handle of the tweet being quoted |
body.components | Rich text components for expanded/long tweets — only populated in tweet.update.expanded |
media.proxied | Proxied media URLs — not always available, fall back to normal URLs |
grok | Embedded Grok AI conversation preview, if the tweet contains one |
card | URL card preview (image, title, description) for linked articles |
article | Full article content if the tweet is a Twitter article |
metrics.advanced | View count — null until expanded version is fetched |
TwitterMiniTweet
TwitterMiniTweet
Compressed tweet data for fast delivery.
TwitterMiniTweet
Compressed tweet data for fast delivery.
