<p class="crumbs"><a href="/zh/apis/">数据接口</a> / <a href="/zh/apis/x/">X（Twitter）</a></p>

# X 视频字幕 API

X 帖子里的视频说了什么，全文；AI 转写，只做 2 分钟以内的视频。

| 项目 | 值 |
| --- | --- |
| 地址 | `GET https://api.feedmcp.com/v1/x/posts/transcript/get` |
| ID | `x.posts.transcript.get` |
| 价格 | **$0.002** / 次 |
| 返回 | 一个 字幕对象 |
| 认证 | `Authorization: Bearer $FEEDMCP_API_KEY` |

> AI 转写，只做 2 分钟以内的视频，更长的返回 `video_too_long`，不收费。帖子没有视频或视频没有人声时返回「对象不存在」。

## 参数

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `id` | string | <span class="nw">二选一</span> | 帖子 ID（链接 /status/ 后面的数字） |
| `url` | string | <span class="nw">二选一</span> | 视频或帖子链接 |

所有接口还支持 `view=full`：在返回里附上平台的原始数据（`raw`），价格不变。

## 返回字段

`data.item` 是一个「字幕」对象，所有平台字段相同：

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `id` | string | 视频或帖子的 ID，和这个平台详情接口用的一样 |
| `platform` | string | 平台 |
| `url` | string \| null | 视频或帖子链接 |
| `language` | string \| null | 字幕语言（平台给的时候才有） |
| `text` | string | 字幕全文 |
| `segments` | {start, end, text}[] | 带时间的分段，单位秒（YouTube、TikTok、Instagram、Reddit 有，其他平台为空） |
| `duration_seconds` | number \| null | 视频时长（秒） |
| `source` | 'captions' \| 'ai' \| null | captions 平台自带字幕、ai AI 转写、null 不确定 |

## 什么时候扣费

成功取到数据一次 $0.002。对象不存在、没取到数据、参数错误、平台出错、超时都不收费。

每次返回的 `meta.billing` 里写着这次扣了多少、还剩多少余额。

## 调用示例

### cURL

```bash
curl "https://api.feedmcp.com/v1/x/posts/transcript/get?id=2109760407824961716" \
  -H "Authorization: Bearer $FEEDMCP_API_KEY"
```

### Python

```python
import os, requests

r = requests.get(
    "https://api.feedmcp.com/v1/x/posts/transcript/get",
    params={"id": "2109760407824961716"},
    headers={"Authorization": f"Bearer {os.environ['FEEDMCP_API_KEY']}"},
    timeout=30,
)
print(r.json())
```

### JavaScript

```js
const res = await fetch("https://api.feedmcp.com/v1/x/posts/transcript/get?id=2109760407824961716", {
  headers: { Authorization: `Bearer ${process.env.FEEDMCP_API_KEY}` },
});
console.log(await res.json());
```

### MCP

在装好 FeedMCP 的 AI 里，调用 `call` 工具：

```json
{
  "endpoint": "x.posts.transcript.get",
  "params": {
    "id": "2109760407824961716"
  },
  "max_price": "0.002"
}
```

## 返回示例

示例数据是虚构的，格式和真实返回一致。

```json
{
  "code": "ok",
  "request_id": "req_7Qm2kXb9TzLp",
  "data": {
    "item": {
      "id": "2109760407824961716",
      "platform": "x",
      "url": "https://x.com/i/status/2109760407824961716",
      "language": null,
      "text": "Three things to pack for a winter night.",
      "segments": [],
      "duration_seconds": 33.7,
      "source": "ai"
    }
  },
  "page": null,
  "warnings": [],
  "meta": {
    "endpoint": "x.posts.transcript.get",
    "platform": "x",
    "fetched_at": "2026-11-19T08:00:00.000Z",
    "source": "FeedMCP",
    "catalog_revision": "d09a736bd39e8b3f",
    "billing": {
      "charged": true,
      "amount": "0.002",
      "currency": "USD",
      "balance": "9.98"
    }
  }
}
```

出错时的格式见 [错误码](/zh/docs/errors/)：每个错误都写明扣没扣钱（`charged`）和能不能重试（`retry`）。

## X（Twitter）的其他接口

- [X 帖子搜索](/zh/apis/x/posts/search/)：$0.002
- [X 帖子详情](/zh/apis/x/posts/get/)：$0.002
- [X 帖子的回复](/zh/apis/x/posts/replies/list/)：$0.002
- [X 账号资料](/zh/apis/x/users/get/)：$0.002
- [X 账号的帖子](/zh/apis/x/users/posts/list/)：$0.002
- [X 热门趋势](/zh/apis/x/trends/list/)：$0.002
- [X 账号的粉丝](/zh/apis/x/users/followers/list/)：$0.002
- [X 账号的关注](/zh/apis/x/users/following/list/)：$0.002
- [X 帖子的转发者](/zh/apis/x/posts/retweeters/list/)：$0.002
- [X 社区资料](/zh/apis/x/communities/get/)：$0.002
- [X 社区成员](/zh/apis/x/communities/members/list/)：$0.002
- [X 社区的帖子](/zh/apis/x/communities/posts/list/)：$0.002
- [X 列表的帖子](/zh/apis/x/lists/posts/list/)：$0.002
- [X 列表的成员](/zh/apis/x/lists/members/list/)：$0.002
- [X 列表的关注者](/zh/apis/x/lists/followers/list/)：$0.002
- [X 帖子的引用](/zh/apis/x/posts/quotes/list/)：$0.0003 per item ($0.0003–0.006 a call)
- [X 账号被提及](/zh/apis/x/users/mentions/list/)：$0.0003 per item ($0.0003–0.006 a call)
- [X 对话串](/zh/apis/x/posts/thread/list/)：$0.0003 per item ($0.0003–0.015 a call)
- [X 长文](/zh/apis/x/posts/article/get/)：$0.002
- [X 账号搜索](/zh/apis/x/users/search/)：$0.0004 per item ($0.0004–0.008 a call)

## 常见问题

### X 视频字幕接口多少钱？

成功取到数据一次 $0.002。对象不存在、没取到数据、参数错误、平台出错、超时都不收费。

### 需要平台账号吗？

不需要，只取公开数据。

### ID 或链接怎么找？

帖子 ID 是链接 /status/ 后面的数字；账号用用户名（@ 后面那一串，不带 @）。

### 怎么在 AI 里用？

装好 [MCP](/zh/mcp/) 后直接说你要什么，AI 会调用 `x.posts.transcript.get`。

---

网页版: https://feedmcp.com/zh/apis/x/posts/transcript/get/
