API · X
GET /x/tweets/{id}
One post (tweet) with its author, metrics incl. views, media, quoted post and top replies.
| Request | GET /v1/x/tweets/{id} |
| Operation id | x.tweet.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
One post (tweet) with its author, metrics incl. views, media, quoted post and top replies.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | A post id or a post URL (x.com or twitter.com). Example: 1585341984679469056. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The post, what it refers to, and its top replies. | XTweetResponse |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The post or account does not exist, was deleted, or is suspended. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | X is temporarily unavailable. Retryable; nothing was charged. | Error |
XTweetResponse fields
| Field | Type | Description |
|---|---|---|
data | XTweet | |
includes | XIncludes | Objects the response refers to by id, each once: authors, quoted and reposted posts, media, polls. |
replies | XTweet[] | The top replies X shows a logged-out visitor under the post (usually a handful, ranked by X). Their authors and media are in includes. Not the full thread. |
Errors use one shape everywhere; see Errors for every code and what to do.