# Read an X Article by its own id

`GET /v1/x/articles/{id}`

Returns the X Article whose own id you hold: the number in an x.com/i/article/ link, which is not a post id. Weir finds the post that shares it with a `url:` search, then returns the same as `getXArticle`: title, cover image, the full body as plain text, Markdown and X's blocks, with the post and author that carry it. 404 when no public post shares the Article. Billed as one post, like `getXArticle`.

**Price:** 1 credit per call, plus 1 credit per X post returned. Failed and refused calls cost nothing.

**Rate limit:** Counts as 1 request against your per-minute rate limit.

**MCP tool:** `get_x_article_by_id`, on every [MCP](/mcp) connection.

Requires an API key, sent as `Authorization: Bearer <key>`.

## Request

```bash
curl --request GET \
  --url https://api.weirapp.io/v1/x/articles/ID \
  --header "Authorization: Bearer $WEIR_API_KEY"
```

### Path parameters

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | string | yes | The Article's own id: the digits after `/i/article/` in its link. · matches `^\d{1,20}$` |

## Response

The Article, with the post and author that carry it.

### `200`

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `data` | object | yes |  |
| `data.id` | string | yes | The Article's own id, distinct from the id of the post carrying it. |
| `data.url` | string | yes |  |
| `data.title` | string | yes |  |
| `data.previewText` | string or null | yes | The opening lines X shows in a feed. |
| `data.coverImage` | object or null | yes |  |
| `data.coverImage.id` | string | yes | X's media id; blocks refer to media by this id. |
| `data.coverImage.type` | string | yes | X's own media type names. · `photo`, `video`, `animated_gif` |
| `data.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.coverImage.width` | integer or null | yes |  |
| `data.coverImage.height` | integer or null | yes |  |
| `data.publishedAt` | string or null | yes |  |
| `data.updatedAt` | string or null | yes |  |
| `data.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.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.blocks` | array of object or null | yes | The body in X's own block structure. Null wherever `text` is. |
| `data.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.blocks[].text` | string | yes |  |
| `data.blocks[].depth` | integer | yes | Nesting level for list items; 0 otherwise. · min 0 |
| `data.blocks[].styles` | array of object | yes | Inline styles over spans of `text`. |
| `data.blocks[].styles[].offset` | integer | yes | Start, in UTF-16 code units of `text`. · min 0 |
| `data.blocks[].styles[].length` | integer | yes | min 0 |
| `data.blocks[].styles[].style` | string | yes | X's inline style name: `Bold`, `Italic`, `Strikethrough`, … |
| `data.blocks[].entities` | array of object | yes | Links and embeds attached to spans of `text`. |
| `data.blocks[].entities[].offset` | integer | yes | Start, in UTF-16 code units of `text`. · min 0 |
| `data.blocks[].entities[].length` | integer | yes | min 0 |
| `data.blocks[].entities[].type` | string | yes | X's entity type: `LINK`, `MEDIA`, `TWEET` (an embedded post), `DIVIDER`, `MARKDOWN` (a code or formatted snippet), or another X adds later. |
| `data.blocks[].entities[].url` | string or null | yes | The target of a `LINK`. |
| `data.blocks[].entities[].mediaIds` | array of string | yes | For `MEDIA`: ids into the Article's `media` list, in display order. |
| `data.blocks[].entities[].postId` | string or null | yes | For `TWEET`: the embedded post's id. |
| `data.blocks[].entities[].markdown` | string or null | yes | For `MARKDOWN`: the snippet's source. |
| `data.media` | array of object | yes | Images and videos in the body, in order. Empty in lists of posts. |
| `data.media[].id` | string | yes | X's media id; blocks refer to media by this id. |
| `data.media[].type` | string | yes | X's own media type names. · `photo`, `video`, `animated_gif` |
| `data.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.media[].width` | integer or null | yes |  |
| `data.media[].height` | integer or null | yes |  |
| `data.postId` | string | yes | The post that carries the Article. |
| `data.postUrl` | string | 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 |  |
| `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. |
