---
title: "B 站视频转文字（文案提取、逐字稿）接口 · SocialToAI"
canonical: https://socialtoai.com/zh/bilibili-transcript-api/
updated: 2026-11-27
---

# B 站视频转文字（文案提取、逐字稿）接口

给一个 B 站视频的链接或 BV 号，返回视频里说的话。B 站视频转文字（文案提取、逐字稿） API（数据接口）每次调用 14 积分（约 $0.028–$0.047），失败不扣。用 HTTP 调用，或让 AI 客户端通过 MCP 调用。

- 页面：https://socialtoai.com/zh/bilibili-transcript-api/
- 最近更新：2026-11-27

| 请求 | 价格键 | 积分 |
| --- | --- | --- |
| `POST /v1/call/bilibili.transcript` | `bilibili.transcript` | 14 |

## 不写代码？

不用懂下面这些。三种用法任选：

- 每天看竞品：填账号链接，新内容每天发到邮箱。 [开始盯一个账号](https://socialtoai.com/zh/tools/account-watch.md)
- 看一个品牌口碑：填品牌名，当场拿到结果。 [打开品牌口碑](https://socialtoai.com/zh/tools/brand-buzz.md)
- 让 ChatGPT 替你读：在电脑上粘贴一个地址就行，手机上暂时加不了。 [看步骤](https://socialtoai.com/zh/connect/chatgpt.md)

## 调用 B 站视频转文字（文案提取、逐字稿），你会拿到什么

录制的一次调用返回了下面这个对象。名称和正文在示例里去掉了，数字是录制时的真实值。

| 字段 | 录制时的值 |
| --- | --- |
| title | null |
| url | null |
| rank | null |
| heat | null |
| fields.status | done |
| fields.job | null |
| fields.retry_after_seconds | null |
| fields.lang | null：B 站给不了 |
| fields.text | 示例里已去掉 |
| fields.duration | 142.613 |
| fields.segments | 2 项 |
| fields.post.title | 示例里已去掉 |
| fields.post.text | 示例里已去掉 |
| fields.post.url | 示例里已去掉 |
| fields.post.published_at | 2026-09-16T03:30:00.000Z |
| fields.post.duration | 143 |
| fields.post.author.id | 示例里已去掉 |
| fields.post.author.name | 示例里已去掉 |
| fields.post.metrics.likes | 7,530 |
| fields.post.metrics.comments | 1,073 |

每次 14 积分（≈ $0.028–$0.047），$10 约够 214 次。

## B 站视频转文字（文案提取、逐字稿）的请求与返回

```bash
curl https://api.socialtoai.com/v1/call/bilibili.transcript \
  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "BV1ECeJ65EZS"
  }'
```

```python
import os
import uuid
import requests

response = requests.post(
    "https://api.socialtoai.com/v1/call/bilibili.transcript",
    headers={
        "Authorization": f"Bearer {os.environ['SOCIALTOAI_API_KEY']}",
        # A new key for each request; the same one again retries it without paying twice.
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "id": "BV1ECeJ65EZS",
    },
)
print(response.json())
```

## B 站视频转文字（文案提取、逐字稿）的参数

| 名称 | 类型 | 是否必填 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| `id` | string | 几个里给一个 | — | 视频的 BV 号，BV1 开头共 12 位 |
| `url` | string | 几个里给一个 | — | 视频链接，原样粘贴即可：视频页链接 www.bilibili.com/video/BV…、手机版 m.bilibili.com/video/BV…，或 App 复制出来的 b23.tv 短链接。短链接由我们打开一次，看它跳到哪个视频 |
| `speakers` | string | 选填 | no | 要不要区分说话人：yes 在每一段标出是谁说的（1、2…），no 不分 `"yes"` `"no"` |
| `job` | string | 几个里给一个 | — | 长视频（超过 5 分钟、2 小时以内），或一次调用里没识别完的视频，按链接调用时返回的 job：过一会儿带着它再调这个接口取文字，提交后 24 小时内有效。和 id、url 三样给一样；带 job 时 speakers 按提交时的 |

## 这些值从哪里拿

- `id`：视频的 BV 号，BV1 开头共 12 位（例如 `BV1ECeJ65EZS`）
  这些接口返回的每一条都带 `ref`：[B 站搜索接口](https://socialtoai.com/zh/bilibili-search-api.md), [B 站账号作品接口](https://socialtoai.com/zh/bilibili-user-posts-api.md), [B 站热榜接口](https://socialtoai.com/zh/bilibili-trending-api.md)；也可以填返回里的 `url`。

- `job`：长视频（超过 5 分钟、2 小时以内），或一次调用里没识别完的视频，按链接调用时返回的 job：过一会儿带着它再调这个接口取文字，提交后 24 小时内有效。和 id、url 三样给一样；带 job 时 speakers 按提交时的（例如 `tr_047_BiliExampleJob000000`）
  平台上没有别的接口返回它。

## B 站视频转文字（文案提取、逐字稿）返回的字段

| 字段 | 类型 | 含义 | 能否给出 |
| --- | --- | --- | --- |
| `items[].extra` | object | 平台在下面这些字段之外给的内容，用平台自己的字段名（IP 属地、uid、有没有橱窗等），每个是什么见接口的 extra_fields；没有就是空对象。评论和评价里不会有写的人是谁。 | 有 |
| `items[].title` | string | 条目的标题或名称。 | 有 |
| `items[].url` | string | 能打开它的链接；平台的列表不带链接时为 null。 | 有 |
| `items[].rank` | integer | 榜上的名次，从 1 起。 | 有 |
| `items[].heat` | integer | 平台给的热度值。 | 有 |
| `items[].fields.status` | string | done：文字已经在这里。processing：长视频还在识别，文字还没有，这次没有扣费。 | 有 |
| `items[].fields.job` | string | processing 时才有：过 retry_after_seconds 秒后用同一个条目只带 job 再调取文字，24 小时内有效；取到文字时才扣费，同一个 job 再取不扣。 | 有 |
| `items[].fields.retry_after_seconds` | integer | processing 时才有：建议多少秒后再来取。 | 有 |
| `items[].fields.lang` | string | 逐字稿的语言。 | B 站给不了，始终是 null |
| `items[].fields.text` | string | 全文。 | 有 |
| `items[].fields.duration` | number | 转写的音视频时长，秒。 | 有 |
| `items[].fields.segments` | array | 带时间的分段：start、end、text 和 speaker（要求区分说话人时是 1、2…）。 | 有 |
| `items[].fields.post.title` | string | 这段话所在内容的标题；没有标题的平台为 null。 | 有 |
| `items[].fields.post.text` | string | 它的文案或简介。 | 有 |
| `items[].fields.post.url` | string | 它的链接。 | 有 |
| `items[].fields.post.published_at` | string | 发布时间，ISO 8601（UTC）。 | 有 |
| `items[].fields.post.duration` | number | 平台写的视频时长，秒。 | 有 |
| `items[].fields.post.author.id` | string | 作者编号。 | 有 |
| `items[].fields.post.author.name` | string | 作者的名字。 | 有 |
| `items[].fields.post.metrics.likes` | integer | 点赞数。 | 有 |
| `items[].fields.post.metrics.comments` | integer | 评论数。 | 有 |

每一条另有 platform、id、ref、approx、type；items 外面的部分每个调用都一样。 [返回格式](https://socialtoai.com/zh/docs/api/response.md)

## 示例返回

示例数据：名称、链接和正文已替换成占位符，数字是录制时的真实值。

```json
{
  "request_id": "req_00000000-0000-4000-8000-000000000001",
  "schema_version": "v1",
  "fetched_at": "2026-11-21T10:04:02.000Z",
  "action": "call",
  "op": "bilibili.transcript",
  "platform": "bilibili",
  "status": "ok",
  "items": [
    {
      "platform": "bilibili",
      "id": "…",
      "ref": "…",
      "approx": [],
      "extra": {},
      "type": "entry",
      "entry_type": "transcript",
      "title": null,
      "url": null,
      "rank": null,
      "heat": null,
      "fields": {
        "status": "done",
        "job": null,
        "retry_after_seconds": null,
        "lang": null,
        "text": "…",
        "duration": 142.613,
        "segments": [
          {
            "start": 0.59,
            "end": 3.35,
            "text": "…",
            "speaker": null
          },
          {
            "start": 3.55,
            "end": 5.15,
            "text": "…",
            "speaker": null
          }
        ],
        "post": {
          "title": "…",
          "text": "…",
          "url": "https://example.com/…",
          "published_at": "2026-09-16T03:30:00.000Z",
          "duration": 143,
          "author": {
            "id": "…",
            "name": "…"
          },
          "metrics": {
            "likes": 7530,
            "comments": 1073
          }
        }
      }
    }
  ],
  "unavailable": ["fields.lang"],
  "warnings": [],
  "applied_params": {
    "id": "BV1ECeJ65EZS"
  },
  "cost_credits": 14,
  "billing": {
    "cost_credits": 14,
    "balance_credits": 86,
    "today_spend_credits": 14,
    "daily_limit_credits": null,
    "daily_remaining_credits": null,
    "display": "本次 14 积分（约 $0.047），余额 86 积分（约 $0.29）"
  },
  "replayed": false
}
```

## B 站视频转文字（文案提取、逐字稿）的翻页与计费

- 一次调用返回一个对象，不翻页，14 积分。
- 每把 Key 每秒 5 次，购买后 20 次；超出不扣费。 [频率限制](https://socialtoai.com/zh/docs/credits-and-billing.md#rate-limits)
- 失败的调用 0 积分，不会自动重试。 [错误码](https://socialtoai.com/zh/docs/api/errors.md)
- 接口上次实测：2026-11-22。每次调用从平台读取，返回里的 `fetched_at` 是读取时间；同一把 Key 5 分钟内重发完全相同的请求算重放（`replayed: true`），0 积分，返回第一次读到的结果。

## 接好 MCP 后，这样问就会用到 B 站视频转文字（文案提取、逐字稿）

- 给一个 B 站视频的链接或 BV 号，返回视频里说的话：BV1ECeJ65EZS → `call {"op":"bilibili.transcript","id":"BV1ECeJ65EZS"}`，14 积分
- 给一个 B 站视频的链接或 BV 号，返回视频里说的话：BV1ECeJ65EZS，speakers 取 yes。 → `call {"op":"bilibili.transcript","id":"BV1ECeJ65EZS","speakers":"yes"}`，14 积分
- 在 B 站上搜和“机械键盘”有关的视频，再对前 3 个结果：给一个 B 站视频的链接或 BV 号，返回视频里说的话。 → `search {"platform":"bilibili","query":"机械键盘"}`, `call {"op":"bilibili.transcript","id":"<ref>"}` × 3，44 积分

## 交给你的 AI

```
用 SocialToAI 的 MCP 服务（https://mcp.socialtoai.com/mcp）完成这件事：给一个 B 站视频的链接或 BV 号，返回视频里说的话：BV1ECeJ65EZS
调用 call 工具，参数是 {"op":"bilibili.transcript","id":"BV1ECeJ65EZS"}。必填：id、url、job；可选：speakers（yes、no）。
要查多个就一个一个调用，每个 14 积分。
开跑前先算出总共要多少积分，问我同意了再调用。
拿到结果后，可以接着调：comments（评论），用返回的 ref 或 username。
如果还没接上 SocialToAI，告诉我怎么接，不要让我把 Key 贴进对话。
回答时附上你用到的每一条的链接，最后告诉我花了多少积分。
```

## 同一个调用在其他平台

| 接口 | 价格键 | 积分 |
| --- | --- | --- |
| [小红书视频转文字（文案提取、逐字稿）接口](https://socialtoai.com/zh/xiaohongshu-transcript-api.md) | `xiaohongshu.transcript` | 24 |
| [抖音视频转文字（文案提取、逐字稿）接口](https://socialtoai.com/zh/douyin-transcript-api.md) | `douyin.transcript` | 13 |
| [微博视频转文字（文案提取、逐字稿）接口](https://socialtoai.com/zh/weibo-transcript-api.md) | `weibo.transcript` | 13 |
| [快手视频转文字（文案提取、逐字稿）接口](https://socialtoai.com/zh/kuaishou-transcript-api.md) | `kuaishou.transcript` | 13 |
| [视频号视频转文字（逐字稿）接口](https://socialtoai.com/zh/wechat-channels-transcript-api.md) | `wechat_channels.transcript` | 24 |

## B 站的其他接口

| 接口 | 做什么 | 价格键 | 积分 |
| --- | --- | --- | --- |
| [B 站视频和音频下载地址接口](https://socialtoai.com/zh/bilibili-media-api.md) | 给一个 B 站视频的 BV 号或链接，返回视频的各档清晰度和音频的各档音质，分开给（带宽高、编码、码率、备用地址和过期时间）。 | `bilibili.media` | 2 |
| [B 站账号作品接口](https://socialtoai.com/zh/bilibili-user-posts-api.md) | 一个账号最近发布的视频。 | `bilibili.user_posts` | 2 |
| [B 站搜索接口](https://socialtoai.com/zh/bilibili-search-api.md) | 按关键词找视频：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | `bilibili.search` | 2 |
| [B 站热榜接口](https://socialtoai.com/zh/bilibili-trending-api.md) | 现在的热榜：标题、名次和热度。 | `bilibili.trending` | 2 |
| [B 站详情接口](https://socialtoai.com/zh/bilibili-detail-api.md) | 用编号或链接取一条视频：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | `bilibili.detail` | 2 |
| [B 站评论接口](https://socialtoai.com/zh/bilibili-comments-api.md) | 一条视频下的评论：正文、点赞数、回复数和时间。 | `bilibili.comments` | 2 |
| [B 站账号资料接口](https://socialtoai.com/zh/bilibili-user-profile-api.md) | 一个账号：名称、简介、粉丝数、关注数和作品数。 | `bilibili.user_profile` | 2 |

## 接着看

- [B 站官方 API 的申请条件和价格](https://socialtoai.com/zh/does-bilibili-have-an-api.md)：官方能做什么、谁能申请、多少钱，带来源。
- [B 站 MCP 服务器](https://socialtoai.com/zh/mcp/bilibili.md)：让你的 AI 直接读 B 站。

## 关于 B 站视频转文字（文案提取、逐字稿）的常见问题

**需要 B 站账号，或者申请 B 站官方的 API 吗？**

不需要，只要一把 SocialToAI 的 Key。返回的是 B 站上公开可见的内容和账号信息，你不用登录 B 站，也不用在那边申请任何东西。

**一次调用折合多少钱？**

14 积分：按每美元 300 积分（$10 起的购买）是 $0.047，按每美元 500 积分（$200 起）是 $0.028。积分不过期，不订阅。注册送 100 积分，不用绑卡。

**调用失败或没搜到，扣不扣积分？**

失败的调用 0 积分，也不会自动重试。

**一次调用返回多少条？**

一次调用返回一个对象，不翻页，14 积分。

**调用频率有限制吗？**

每把 Key 每秒 5 次，第一次购买后每秒 20 次。超出的请求会告诉你等多久再试，不扣积分。

**怎么在 Claude、ChatGPT 或 Cursor 里用？**

可以。在 Claude 或 ChatGPT 里把 MCP 地址 https://mcp.socialtoai.com/mcp 加成自定义连接器，用邮箱验证码登录后点“允许”，不用贴 Key。Claude Code 运行一条命令后输入 /mcp、选 socialtoai、登录；Codex 和 Cursor 也是登录授权，步骤在接入页。接好后直接用大白话问，你的 AI 会替你调用 call。
