Get the posts an X account highlights
GET /v1/x/users/{user}/highlights
Returns the profile's Highlights tab: posts the account chose to feature. Only accounts with X Premium can highlight, so for others the list is empty. 404 when the account does not exist, is suspended (then details.reason is suspended), or is protected: a protected account's posts and connections are visible only to accounts it approved. Billed per post returned. The first page also bills one profile lookup, to resolve {user}; later pages carry the account in the cursor and do not.
Price: 1 credit per call, plus 2 credits per X profile and 1 credit per X post returned. Failed and refused calls cost nothing.
Rate limit: Counts as 2 requests against your per-minute rate limit.
MCP tool: get_x_user_highlights, on every MCP connection.
Requires an API key, sent as Authorization: Bearer <key>.
Request
curl --request GET \
--url https://api.weirapp.io/v1/x/users/USER/highlights \
--header "Authorization: Bearer $WEIR_API_KEY"Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
user |
string | yes | A username, with or without the @, or a numeric account id. An all-digit value is read as an id. · matches ^@?[A-Za-z0-9_]{1,50}$ |
Query parameters
| Field | Type | Required | Notes |
|---|---|---|---|
limit |
integer | no | Most posts to return. X may return fewer. · 1–20, default 20 |
cursor |
string | no | Opaque cursor from the previous page's meta.nextCursor. Pass it back unchanged, with the same path and query parameters; a cursor from another request is rejected with 400. · 1–4096 chars |
Response
Highlighted posts.
200
| Field | Type | Required | Notes |
|---|---|---|---|
data |
array of object | yes | |
data[].id |
string | yes | Numeric post id, as a string. It exceeds 2^53. |
data[].text |
string | yes | Full post text, untruncated. |
data[].url |
string | yes | |
data[].lang |
string or null | yes | BCP-47 language tag detected by X. |
data[].createdAt |
string (date-time) | yes | |
data[].conversationId |
string or null | yes | The thread this post belongs to. |
data[].inReplyToId |
string or null | yes | |
data[].author |
object | yes | |
data[].author.id |
string | yes | |
data[].author.username |
string | yes | |
data[].author.name |
string | yes | |
data[].author.verified |
boolean | yes | |
data[].author.followersCount |
integer | yes | min 0 |
data[].author.profileImageUrl |
string or null | yes | |
data[].likeCount |
integer or null | yes | min 0 |
data[].retweetCount |
integer or null | yes | min 0 |
data[].replyCount |
integer or null | yes | min 0 |
data[].viewCount |
integer or null | yes | min 0 |
data[].quoteCount |
integer or null | yes | min 0 |
data[].bookmarkCount |
integer or null | yes | min 0 |
data[].media |
array of object | yes | Attached photos, videos, and GIFs, in display order. |
data[].media[].id |
string | yes | |
data[].media[].type |
string | yes | X's own media type names. · photo, video, animated_gif |
data[].media[].url |
string or null | yes | The original upload for a photo (name=orig, full size); the highest-bitrate MP4 for a video or GIF. Null when X offers only a stream. |
data[].media[].previewImageUrl |
string or null | yes | Poster frame for a video. Null for photos and GIFs. |
data[].entities |
object | yes | |
data[].entities.hashtags |
array of string | yes | Hashtags, without the #. |
data[].entities.mentions |
array of string | yes | Mentioned usernames, without the @. |
data[].entities.urls |
array of string | yes | Expanded link targets, not t.co short links. |
data[].article |
object or null | yes | Set when the post is an X Article; its text is then only a link to it. |
data[].article.id |
string | yes | The Article's own id, distinct from the id of the post carrying it. |
data[].article.url |
string | yes | |
data[].article.title |
string | yes | |
data[].article.previewText |
string or null | yes | The opening lines X shows in a feed. |
data[].article.coverImage |
object or null | yes | |
data[].article.coverImage.id |
string | yes | X's media id; blocks refer to media by this id. |
data[].article.coverImage.type |
string | yes | X's own media type names. · photo, video, animated_gif |
data[].article.coverImage.url |
string or null | yes | The original image for a photo; the highest-bitrate MP4 for a video or GIF. Null when X offers only a stream. |
data[].article.coverImage.width |
integer or null | yes | |
data[].article.coverImage.height |
integer or null | yes | |
data[].article.publishedAt |
string or null | yes | |
data[].article.updatedAt |
string or null | yes | |
data[].article.text |
string or null | yes | The full body as plain text. Null in lists of posts, where X sends only the preview: get the post, or its article, for the body. |
data[].article.markdown |
string or null | yes | The full body as Markdown — headings, emphasis, lists, quotes, code, links, images, and embedded posts — for reading or for a model. Null wherever text is. |
data[].article.blocks |
array of object or null | yes | The body in X's own block structure. Null wherever text is. |
data[].article.blocks[].type |
string | yes | X's block type: unstyled (paragraph), header-one, header-two, header-three, unordered-list-item, ordered-list-item, blockquote, code-block, or atomic (an embed: see entities). |
data[].article.blocks[].text |
string | yes | |
data[].article.blocks[].depth |
integer | yes | Nesting level for list items; 0 otherwise. · min 0 |
data[].article.blocks[].styles |
array of object | yes | Inline styles over spans of text. |
data[].article.blocks[].entities |
array of object | yes | Links and embeds attached to spans of text. |
data[].article.media |
array of object | yes | Images and videos in the body, in order. Empty in lists of posts. |
data[].article.media[].id |
string | yes | X's media id; blocks refer to media by this id. |
data[].article.media[].type |
string | yes | X's own media type names. · photo, video, animated_gif |
data[].article.media[].url |
string or null | yes | The original image for a photo; the highest-bitrate MP4 for a video or GIF. Null when X offers only a stream. |
data[].article.media[].width |
integer or null | yes | |
data[].article.media[].height |
integer or null | yes | |
data[].quotedPost |
object or null | yes | The post this one quotes, when it is a quote post. |
data[].quotedPost.id |
string | yes | Numeric post id, as a string. It exceeds 2^53. |
data[].quotedPost.text |
string | yes | Full post text, untruncated. |
data[].quotedPost.url |
string | yes | |
data[].quotedPost.lang |
string or null | yes | BCP-47 language tag detected by X. |
data[].quotedPost.createdAt |
string (date-time) | yes | |
data[].quotedPost.conversationId |
string or null | yes | The thread this post belongs to. |
data[].quotedPost.inReplyToId |
string or null | yes | |
data[].quotedPost.author |
object | yes | |
data[].quotedPost.author.id |
string | yes | |
data[].quotedPost.author.username |
string | yes | |
data[].quotedPost.author.name |
string | yes | |
data[].quotedPost.author.verified |
boolean | yes | |
data[].quotedPost.author.followersCount |
integer | yes | min 0 |
data[].quotedPost.author.profileImageUrl |
string or null | yes | |
data[].quotedPost.likeCount |
integer or null | yes | min 0 |
data[].quotedPost.retweetCount |
integer or null | yes | min 0 |
data[].quotedPost.replyCount |
integer or null | yes | min 0 |
data[].quotedPost.viewCount |
integer or null | yes | min 0 |
data[].quotedPost.quoteCount |
integer or null | yes | min 0 |
data[].quotedPost.bookmarkCount |
integer or null | yes | min 0 |
data[].quotedPost.media |
array of object | yes | Attached photos, videos, and GIFs, in display order. |
data[].quotedPost.media[].id |
string | yes | |
data[].quotedPost.media[].type |
string | yes | X's own media type names. · photo, video, animated_gif |
data[].quotedPost.media[].url |
string or null | yes | The original upload for a photo (name=orig, full size); the highest-bitrate MP4 for a video or GIF. Null when X offers only a stream. |
data[].quotedPost.media[].previewImageUrl |
string or null | yes | Poster frame for a video. Null for photos and GIFs. |
data[].quotedPost.entities |
object | yes | |
data[].quotedPost.entities.hashtags |
array of string | yes | Hashtags, without the #. |
data[].quotedPost.entities.mentions |
array of string | yes | Mentioned usernames, without the @. |
data[].quotedPost.entities.urls |
array of string | yes | Expanded link targets, not t.co short links. |
data[].quotedPost.article |
object or null | yes | Set when the post is an X Article; its text is then only a link to it. |
data[].quotedPost.article.id |
string | yes | The Article's own id, distinct from the id of the post carrying it. |
data[].quotedPost.article.url |
string | yes | |
data[].quotedPost.article.title |
string | yes | |
data[].quotedPost.article.previewText |
string or null | yes | The opening lines X shows in a feed. |
data[].quotedPost.article.coverImage |
object or null | yes | |
data[].quotedPost.article.publishedAt |
string or null | yes | |
data[].quotedPost.article.updatedAt |
string or null | yes | |
data[].quotedPost.article.text |
string or null | yes | The full body as plain text. Null in lists of posts, where X sends only the preview: get the post, or its article, for the body. |
data[].quotedPost.article.markdown |
string or null | yes | The full body as Markdown — headings, emphasis, lists, quotes, code, links, images, and embedded posts — for reading or for a model. Null wherever text is. |
data[].quotedPost.article.blocks |
array of object or null | yes | The body in X's own block structure. Null wherever text is. |
data[].quotedPost.article.media |
array of object | yes | Images and videos in the body, in order. Empty in lists of posts. |
data[].retweetedPost |
object or null | yes | Set when this post is a repost. Read the original's text and counts here: X truncates a repost's own text to RT @user: …. |
data[].retweetedPost.id |
string | yes | Numeric post id, as a string. It exceeds 2^53. |
data[].retweetedPost.text |
string | yes | Full post text, untruncated. |
data[].retweetedPost.url |
string | yes | |
data[].retweetedPost.lang |
string or null | yes | BCP-47 language tag detected by X. |
data[].retweetedPost.createdAt |
string (date-time) | yes | |
data[].retweetedPost.conversationId |
string or null | yes | The thread this post belongs to. |
data[].retweetedPost.inReplyToId |
string or null | yes | |
data[].retweetedPost.author |
object | yes | |
data[].retweetedPost.author.id |
string | yes | |
data[].retweetedPost.author.username |
string | yes | |
data[].retweetedPost.author.name |
string | yes | |
data[].retweetedPost.author.verified |
boolean | yes | |
data[].retweetedPost.author.followersCount |
integer | yes | min 0 |
data[].retweetedPost.author.profileImageUrl |
string or null | yes | |
data[].retweetedPost.likeCount |
integer or null | yes | min 0 |
data[].retweetedPost.retweetCount |
integer or null | yes | min 0 |
data[].retweetedPost.replyCount |
integer or null | yes | min 0 |
data[].retweetedPost.viewCount |
integer or null | yes | min 0 |
data[].retweetedPost.quoteCount |
integer or null | yes | min 0 |
data[].retweetedPost.bookmarkCount |
integer or null | yes | min 0 |
data[].retweetedPost.media |
array of object | yes | Attached photos, videos, and GIFs, in display order. |
data[].retweetedPost.media[].id |
string | yes | |
data[].retweetedPost.media[].type |
string | yes | X's own media type names. · photo, video, animated_gif |
data[].retweetedPost.media[].url |
string or null | yes | The original upload for a photo (name=orig, full size); the highest-bitrate MP4 for a video or GIF. Null when X offers only a stream. |
data[].retweetedPost.media[].previewImageUrl |
string or null | yes | Poster frame for a video. Null for photos and GIFs. |
data[].retweetedPost.entities |
object | yes | |
data[].retweetedPost.entities.hashtags |
array of string | yes | Hashtags, without the #. |
data[].retweetedPost.entities.mentions |
array of string | yes | Mentioned usernames, without the @. |
data[].retweetedPost.entities.urls |
array of string | yes | Expanded link targets, not t.co short links. |
data[].retweetedPost.article |
object or null | yes | Set when the post is an X Article; its text is then only a link to it. |
data[].retweetedPost.article.id |
string | yes | The Article's own id, distinct from the id of the post carrying it. |
data[].retweetedPost.article.url |
string | yes | |
data[].retweetedPost.article.title |
string | yes | |
data[].retweetedPost.article.previewText |
string or null | yes | The opening lines X shows in a feed. |
data[].retweetedPost.article.coverImage |
object or null | yes | |
data[].retweetedPost.article.publishedAt |
string or null | yes | |
data[].retweetedPost.article.updatedAt |
string or null | yes | |
data[].retweetedPost.article.text |
string or null | yes | The full body as plain text. Null in lists of posts, where X sends only the preview: get the post, or its article, for the body. |
data[].retweetedPost.article.markdown |
string or null | yes | The full body as Markdown — headings, emphasis, lists, quotes, code, links, images, and embedded posts — for reading or for a model. Null wherever text is. |
data[].retweetedPost.article.blocks |
array of object or null | yes | The body in X's own block structure. Null wherever text is. |
data[].retweetedPost.article.media |
array of object | yes | Images and videos in the body, in order. Empty in lists of posts. |
meta |
object | yes | |
meta.requestId |
string | yes | |
meta.nextCursor |
string or null | no |
Errors
| Status | Meaning | What to do |
|---|---|---|
400 |
The request failed validation. | The request was malformed. The details object names the field. |
401 |
The API key is missing, malformed, expired, or revoked. | The key is missing, malformed, revoked, or expired. |
402 |
The account is out of credits. Not retryable. The message names the day free credits return and the price of the smallest pack; details carries buyUrl, smallestPack and freeCreditsRenewAt. | Out of credits. Never retry. It clears in two ways only: the month's free credits return on the 1st (UTC), or a person adds credits at https://weirapp.io/buy (from $5). Retrying never works. |
403 |
The API key does not carry the scope this route requires. | The key is valid but lacks the scope this operation needs. |
404 |
The requested resource does not exist. | No such resource, or it is not public. |
429 |
The per-minute rate limit is exhausted. Retryable: wait for Retry-After and try again. | Rate limited. Retryable: wait for Retry-After, then try again. |
500 |
An unexpected error occurred. | Something failed on our side. Retryable with backoff. |
503 |
The source is busy or temporarily unavailable. Retryable: wait for Retry-After and try again. | A source was busy or unreachable. Retryable: wait for Retry-After, then try again. |