API · X
GET /x/tweets/{id}/transcript
The transcript of the video in an X post, from the captions X serves with it.
| |
|---|
| Request | GET /v1/x/tweets/{id}/transcript |
| Operation id | x.tweet.transcript |
| Cost | 2 credits, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
The transcript of the video in an X post, from the captions X serves with it.
| Name | Type | Required | Description |
|---|
id | string | yes | A post id or a post URL (x.com or twitter.com). Example: 1585341984679469056. |
| Name | Type | Required | Description |
|---|
lang | string | no | Preferred caption language (BCP 47), e.g. en. Example: en. |
| Status | Meaning | Schema |
|---|
200 | The transcript and the caption tracks available. | XTranscriptResponse |
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 |
| Field | Type | Description |
|---|
data | object | |
tracks | XCaptionTrack[] | Every caption track the video has; data is one of them. |
Errors use one shape everywhere; see Errors for every code and what to do.