# X (Twitter) 视频口播文稿 API (twitter.video_transcript)

- Canonical page: https://everyinfra.com/twitter-api/video_transcript
- Endpoint: POST /api/v1/social with {"platform": "twitter", "action": "video_transcript", "params": {...}}
- Price: $0.000958 per call ($0.96 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=twitter&action=video_transcript

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 视频帖链接 https://x.com/<用户名>/status/<数字 ID>，或数字帖子 ID；返回视频里说话内容的文字稿。 |
| id | not declared | no | not declared | url 的兼容输入：数字帖子 ID。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| word_count | platform-native meaning |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "twitter",
  "action": "video_transcript",
  "params": {
    "url": "https://x.com/NASA/status/2082555075759685670"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "twitter",
        "action": "video_transcript",
        "params": {
            "url": "https://x.com/NASA/status/2082555075759685670",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "twitter",
  "action": "video_transcript",
  "results": {
    "id": …,
    "url": …,
    "text": …,
    "word_count": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=twitter
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
