# Bilibili Transcript & Subtitles for AI Agents – B站视频转文字 字幕 (`lone_fascia/bilibili-video-transcriber`) Actor

Bilibili (B站) transcript & speech to text: timestamped transcripts, SRT/VTT subtitles (字幕、文字稿), AI English summary & optional English translation, video metadata. Public videos only. API & MCP ready. $0.005/audio min.

- **URL**: https://apify.com/lone_fascia/bilibili-video-transcriber.md
- **Developed by:** [mullvad lu](https://apify.com/lone_fascia) (community)
- **Categories:** Videos, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 audio minute transcribeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bilibili Video Transcriber – B站视频转文字

Turn **Bilibili (B站) videos into text**. Paste video links or BV ids and get a clean transcript with sentence-level **timestamps**, ready-made **SRT / WebVTT subtitles**, an **AI English summary** of every video, an optional **full English translation**, and the video's **metadata** (title, creator, stats, publish time). Works for Mandarin, Cantonese, English, Japanese and Korean.

- **Batch friendly.** Process one video or hundreds in one run, including multi-part (分P) videos.
- **Cheap and predictable:** **$0.005 per audio minute**. A 10-minute video costs about $0.05. Failed or skipped videos cost nothing.
- **Public videos only.** Paid and members-only content (charge-exclusive 充电专属 videos, paid courses 课堂, bangumi/films) is detected and skipped for free, before any audio is downloaded. See [Supported content](#supported-content).
- **English summary included (new in 1.1).** Every transcribed part gets a short English bullet-point summary at no extra cost. Turn it off with `englishSummary: false`.
- **Optional full English translation (new in 1.1).** Set `translateToEnglish: true` to get the whole transcript in English, for $0.002 per audio minute, charged only if the translation succeeds.
- **Chinese speech recognition.** Uses the open-source SenseVoice-Small speech model, which supports Mandarin, Chinese-English code-switching, Cantonese, English, Japanese and Korean. Punctuation is added automatically. Transcripts are machine-generated and can contain mistakes.

### Why use it?

Many Bilibili videos have **no subtitles**. This Actor recognizes the audio directly, so you get text even for videos that never had subtitles.

Typical uses:

- Build **RAG / LLM knowledge bases** from Chinese video content
- **Read Chinese videos in English**: skim the English summary, or get the full translation
- **Summarise, translate or search** Bilibili videos
- **Accessibility**: subtitles and transcripts for deaf and hard-of-hearing viewers
- **Personal study and research**: language learning, note-taking, academic and content research
- Help **non-Chinese speakers understand and research** Bilibili content
- Do **market and content research** on Chinese creators, products and trends

### Why not just use a free tool?

Free scripts and desktop apps can transcribe Bilibili videos too, but you have to run and maintain them yourself. With this Actor:

- **Nothing to install.** No speech model, ffmpeg or GPU on your own computer. Everything runs in Apify's cloud.
- **Batch in the cloud.** Send one video or hundreds in a single run, and let it work while your computer is off. Schedule it or trigger it from your own code.
- **Callable by AI agents.** Use it as an MCP tool in Claude, Cursor and other MCP clients, or call it with one REST/Python request (see [Use from AI agents](#use-from-ai-agents-mcp-and-the-api)).
- **Structured, ready-to-use output.** JSON with sentence timestamps, SRT/WebVTT subtitles, video metadata and an English summary in the same item, with no post-processing needed.
- **Pay only for what you use.** $0.005 per audio minute and no subscription. Failed and skipped videos are free.

### Supported content

The Actor only transcribes **public Bilibili videos that anyone can watch without logging in or paying**. These inputs are detected and **skipped**. You get a `"type": "skipped"` item with the reason, you aren't charged, and no audio is downloaded:

| Skipped type | How it's detected | `errorCode` |
|---|---|---|
| Charge-exclusive videos (UP主充电专属, including 单片付费 and 抢先看 while it's still exclusive) | `is_upower_exclusive` / `is_upower_exclusive_with_qa` in the public video info | `UPOWER_EXCLUSIVE` |
| Paid courses (B站课堂, `bilibili.com/cheese/...` links or b23.tv links to them) | Link type, or a `redirect_url` pointing to `/cheese/` | `PAID_COURSE` |
| Paid videos and paid collections (UGC付费, 付费合集) | `rights.ugc_pay` / `rights.arc_pay`, or a paid collection with no public audio | `PAID_CONTENT` |
| Videos where only a short preview is public | The public stream is much shorter than the video | `PREVIEW_ONLY` |
| Bangumi, films and TV (番剧/影视, `/bangumi/` links, PGC paid content) | Link type, `redirect_url` or `rights.pay` | `UNSUPPORTED` |

Private, deleted, under-review and region-locked videos produce an error item (`NOT_FOUND`, `UNDER_REVIEW`, `RESTRICTED`, `NO_AUDIO`), which is also free. Course episodes entered by their av id usually aren't visible through the public video API, so they come back as `NOT_FOUND`.

### Input

| Field | Description | Default |
|---|---|---|
| `videos` | Video URLs, BV ids (`BV1Eapz6PErV`), av ids (`av170001`) or `b23.tv` short links. Add `?p=N` to a URL to choose a part. | – |
| `parts` | `first` (the first part, or the `?p=` part) or `all` parts of multi-part videos | `first` |
| `language` | `zh` (Mandarin, recommended), `auto`, `en`, `yue`, `ja`, `ko`. With `zh`, parts that are clearly English, Japanese, Korean or Cantonese are detected and switched automatically. | `zh` |
| `outputFormats` | Any of `text`, `segments`, `srt`, `vtt`. Add `srt` to get SRT subtitles built from the speech-recognition segment timestamps (off by default, no extra charge). | `text`, `segments` |
| `saveSubtitleFiles` | Also save `<BVID>_p<N>.srt` / `.txt` files to the key-value store | `false` |
| `englishSummary` | Add an AI-written English summary (up to 5 bullet points) per part. Included in the price. | `true` |
| `translateToEnglish` | Add a full English translation of the transcript per part. Extra charge: $0.002 per audio minute, only when it succeeds. | `false` |
| `maxLlmCharsPerVideo` | Safety cap on transcript characters sent to the AI per part (max 30000 ≈ 60–75 min of Chinese speech). Longer text is cut and flagged `LLM_INPUT_TRUNCATED`. | 30000 |
| `qualityCheck` | Detect the spoken language and add dialect / accent / noise warnings (no extra charge) | `true` |
| `includeMetadata` | Include the description, stats, category, publish time and cover | `true` |
| `maxVideos` | Maximum number of parts per run | 50 |
| `maxAudioMinutesPerVideo` | Skip parts longer than this (they aren't charged) | 120 |

Example:

```json
{
  "videos": ["https://www.bilibili.com/video/BV1Eapz6PErV", "BV15Lpf62EG8"],
  "outputFormats": ["text", "segments", "srt"]
}
```

With a full English translation:

```json
{
  "videos": ["BV1sapm6KE2q"],
  "translateToEnglish": true
}
```

### Output

You get one dataset item per video part:

```json
{
  "type": "transcript",
  "input": "https://www.bilibili.com/video/BV1Eapz6PErV",
  "bvid": "BV1Eapz6PErV", "aid": 117434522538286, "cid": 42731438751, "page": 1, "partsCount": 1,
  "url": "https://www.bilibili.com/video/BV1Eapz6PErV",
  "title": "原来，小猫是这样认识武警哥哥的～",
  "durationSec": 60,
  "publishedAt": "2026-10-14T07:00:00+08:00",
  "creator": { "mid": 456664753, "name": "央视新闻" },
  "stats": { "view": 1631199, "like": 208454, "coin": 3893, "favorite": 15862, "share": 2614, "danmaku": 635, "reply": 2197 },
  "transcript": {
    "engine": "sensevoice-small-int8@sherpa-onnx-1.13.8",
    "requestedLanguage": "zh",
    "language": "zh",
    "text": "当时就觉得有一个毛茸茸的东西从我的脚边来回穿梭。……",
    "segments": [
      { "start": 0.25, "end": 5.63, "text": "当时就觉得有一个毛茸茸的东西从我的脚边来回穿梭。" },
      { "start": 5.63, "end": 11.03, "text": "根据稍微纪律来讲的话，我要平视前方，……" }
    ],
    "charCount": 275, "segmentCount": 15, "speechSec": 55.0, "audioSec": 60.0, "flags": [],
    "quality": { "confidence": "high", "probeDisagreement": 0.0, "probeSampleSec": 35.8, "probeLanguages": { "zh": 1.0 }, "charsPerSpeechSec": 4.69, "speechRatio": 0.879 }
  },
  "englishSummary": {
    "status": "OK",
    "text": "- A guard noticed something furry moving around his feet; though discipline required looking straight ahead, he checked and was surprised and delighted to see a kitten.\n- One rainy day, the kitten took shelter on his post, and with few people around he stepped over slightly to shield it from the wind and rain.\n- Over time, the kitten and the guard grew closer, and the cat often stayed by his side while he was on duty.\n- He reflected that cats are very alert animals and may seek out someone who makes them feel safe.\n- He said that as a people's armed police officer, providing a sense of security to the people is part of the job, which may be why the kitten came to them.",
    "model": "deepseek-v4.1-flash", "inputChars": 275, "totalChars": 275, "inputTruncated": false,
    "latencySec": 2.56, "promptTokens": 283, "completionTokens": 143
  },
  "billedAudioMinutes": 1,
  "scrapedAt": "2026-10-15T06:40:37+00:00"
}
```

With `translateToEnglish: true` the item also has:

```json
"englishTranslation": {
  "status": "OK",
  "text": "Recently, a project called RAEA suddenly became popular for no apparent reason. Looking at the official website, it's all pretentious, and the title clearly looks like it was made by AI. Its full name is very domineering: reverse engineer anything. …",
  "model": "deepseek-v4.1-flash", "inputChars": 2848, "totalChars": 2848, "inputTruncated": false, "chunks": 2,
  "latencySec": 12.76, "residualChineseRatio": 0.0, "billedTranslationMinutes": 7
}
```

#### English summary and translation

- Written by an LLM (DeepSeek, via Alibaba Cloud Model Studio) from the machine transcript, so ASR mistakes can carry over. Treat them as a reading aid.
- `status` is `OK`, `FAILED` or `SKIPPED`. **A failed summary or translation never affects the transcript**: the transcript is returned as usual, and `transcript.flags` gets `SUMMARY_FAILED` or `TRANSLATION_FAILED`, with the reason in `errorCode` / `message`. Failed translations are not charged.
- `SKIPPED` reasons: `NO_SPEECH` (nothing to summarize), `ALREADY_ENGLISH` (English parts aren't translated or charged), `CHARGE_LIMIT_REACHED` (the translation would go over your max cost per run).
- Long transcripts are translated in chunks of about 2000 characters. At most `maxLlmCharsPerVideo` characters (default and max 30000) are sent per part; longer text is cut, flagged `LLM_INPUT_TRUNCATED`, and only the translated share of the minutes is charged.
- Skipped (paid/members-only) and failed videos are never sent to the AI.
- `residualChineseRatio` is the share of Chinese characters left in the translation (normally 0).

#### Quality warnings

`transcript.quality.confidence` is `high`, `medium` or `low`. `transcript.flags` lists warnings. The flags come from heuristics: treat them as hints, not guarantees.

| Flag | Meaning |
|---|---|
| `POSSIBLE_DIALECT_ACCENT_OR_NOISE` | Dialect, a strong accent or noisy/outdoor audio is likely, so expect more errors |
| `LOW_CONFIDENCE` | The transcript is probably unreliable (strong dialect, wind noise, singing) |
| `LANGUAGE_SWITCHED` | You asked for `zh`, but the part was clearly another supported language, so it was transcribed in that language (see `transcript.language`) |
| `MIXED_OR_UNSUPPORTED_LANGUAGE` | No supported language dominates (for example Spanish), so the text is unreliable |
| `CANTONESE_DETECTED` | Cantonese speech was detected |
| `FOREIGN_SCRIPT_IN_TEXT` | Japanese or Korean characters appeared in a Chinese transcript |
| `LOW_SPEECH_RATIO` / `NO_SPEECH_DETECTED` | Little or no speech (music, silent screen recordings) |
| `SUMMARY_FAILED` / `TRANSLATION_FAILED` | The English summary / translation failed (the transcript is fine). See `englishSummary` / `englishTranslation` for the reason. |
| `LLM_INPUT_TRUNCATED` | The transcript was longer than `maxLlmCharsPerVideo`; the summary/translation covers only the first part |

How the check works: a sample of about 20–90 s of speech is decoded a second time with automatic language detection. Two signals are used: how much the two decodes disagree, and how many characters come out per second of speech (clean Mandarin is about 5 per second). Both were calibrated on 18 test videos. Clean news and narration were never flagged. All dialect videos, wind noise, crowd noise and concerts were flagged. An outdoor street-food video was flagged `medium`. Kitchen noise wasn't flagged, because the model coped well with it. There is no per-word confidence score.

Inputs that fail produce an error item instead, and **you aren't charged for them**:

```json
{ "type": "error", "input": "BV1xxxxxxxxx", "errorCode": "NOT_FOUND", "message": "..." }
```

Paid or unsupported inputs produce a free `skipped` item:

```json
{ "type": "skipped", "input": "BV1oMBUBREK8", "errorCode": "UPOWER_EXCLUSIVE", "bvid": "BV1oMBUBREK8", "billedAudioMinutes": 0, "message": "charge-exclusive video (UP主充电专属): ..." }
```

| Error code | Meaning |
|---|---|
| `INVALID_INPUT` | No BV/av id found in the input |
| `NOT_FOUND` / `UNDER_REVIEW` | The video was deleted, is private or is under review |
| `RESTRICTED` / `NO_AUDIO` | Region-locked or members-only content, or no audio stream |
| `UPOWER_EXCLUSIVE` / `PAID_COURSE` / `PAID_CONTENT` / `PREVIEW_ONLY` / `UNSUPPORTED` | Paid or unsupported content. These come as `"type": "skipped"` items; see [Supported content](#supported-content) |
| `TOO_LONG` | The part is longer than `maxAudioMinutesPerVideo` |
| `BILI_RISK_CONTROL` | Bilibili rate-limited the request. Please retry later. |
| `DOWNLOAD_FAILED` / `ASR_FAILED` | Temporary failure. Retry. |
| `CHARGE_LIMIT_REACHED` | Your *max cost per run* was reached, so the run stopped |

### Use from AI agents (MCP) and the API

**MCP (Claude, Cursor, any MCP client):** add the Apify MCP server with only this Actor loaded:

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com?tools=lone_fascia/bilibili-video-transcriber" }
  }
}
```

On first connection your browser opens to sign in to Apify (or send `Authorization: Bearer <APIFY_TOKEN>`). Then just ask your agent, e.g. *"Transcribe https://www.bilibili.com/video/BV1xx411c7mD and summarize it."* The agent calls the Actor and reads the results with `get-dataset-items`.

**REST API (one call, returns the transcript items):**

```bash
curl -X POST "https://api.apify.com/v2/acts/lone_fascia~bilibili-video-transcriber/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"videos": ["https://www.bilibili.com/video/BV1xx411c7mD"], "outputFormats": ["text", "segments", "srt"]}'
```

**Python:**

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("lone_fascia/bilibili-video-transcriber").call(
    run_input={"videos": ["BV1xx411c7mD"], "outputFormats": ["text", "srt"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("transcript", {}).get("text"))
```

### Pricing

**Pay per event: $0.005 per audio minute** (event `audio-minute`), English summary included.
Optional full English translation: **+$0.002 per audio minute** (event `translation-minute`), only for parts whose translation succeeded.

- You're charged per *started* minute of each successfully transcribed part: a 61-second video counts as 2 minutes.
- Parts where no speech is detected are charged the 1-minute minimum.
- Failed, skipped (paid/unsupported) and too-long parts are free.
- SRT/VTT subtitles, quality checks, metadata and the English summary don't cost extra.
- Translation is charged per started audio minute of each successfully translated part. Failed translations, English parts and skipped parts are free.
- The Actor respects your **Max cost per run** setting and stops before it would go over.

| Video length | Transcript + English summary | With full English translation |
|---|---|---|
| 1 min | $0.005 | $0.007 |
| 10 min | $0.05 | $0.07 |
| 1 hour | $0.30 | $0.42 |

### Speed and limits

- **Recommended memory: 4 GB (the default and the maximum).** One transcription thread, with peak memory around 0.9 GB. A 10-minute video takes about 1.5 minutes.
- 2 GB also works, but it's about 2× slower: a 10-minute video takes about 3–4 minutes. The price per audio minute is the same.
- The English summary adds about 3–6 seconds per part. A full translation adds about 2–3 seconds per audio minute (a 10-minute video: about 20–40 seconds).
- Each part can be up to 300 minutes long. The default skip limit is 120 minutes.
- Requests to Bilibili are spaced out on purpose, to be polite and to avoid rate limits.

### Compliance, privacy and fair use

- **Public videos only.** The Actor only processes public videos that anyone can watch without logging in or paying. Paid content and charge-exclusive (充电专属) videos are detected and skipped.
- **No danmaku, comments or user data.** The Actor does not collect danmaku (bullet comments), comments, or any viewer/user personal data. It reads only public video information (title, creator name, public stats) and the lowest-bitrate audio stream needed for transcription.
- **Audio is deleted after processing.** Audio is deleted right after it's transcribed; no audio or video is stored or returned.
- **Third-party AI processing.** When `englishSummary` or `translateToEnglish` is on, the transcript text (not the audio) is sent to Alibaba Cloud Model Studio (阿里云百炼, servers in mainland China) for processing with a DeepSeek model. If you don't want that, set `englishSummary: false` (and leave `translateToEnglish` off).
- **Not affiliated with Bilibili.** This Actor is an independent tool and is not affiliated with, endorsed or sponsored by Bilibili. Bilibili is a trademark of its respective owner.
- Transcripts are machine-generated and can contain mistakes, especially with strong dialects, heavy background music or overlapping speakers.
- You're responsible for how you use the transcripts. Respect the creators' copyright and Bilibili's terms of service, and don't republish content you don't have the rights to.

***

### 中文说明

**B站视频转文字**：把 B站视频链接或 BV 号贴进来，就能拿到**带时间戳的逐句文字稿**、可以直接用的 **SRT / VTT 字幕**、**AI 英文摘要**、可选的**全文英文翻译**，以及**视频元数据**（标题、UP主、播放/点赞/投币/收藏等数据、发布时间）。

- 很多视频没有字幕，本工具直接识别音频，没有字幕的视频也能转写。
- 支持**普通话、粤语、英语、日语、韩语**，中英夹杂也能识别，自动加标点。`language` 默认是 `zh`（普通话）：自动识别模式在口音重的普通话里容易混进日文和韩文字符，所以默认固定为中文。如果某个视频明显是英语、日语、韩语或粤语，会自动切换成对应语言，并标记 `LANGUAGE_SWITCHED`。
- **和免费工具比**：不用在自己电脑上装语音模型、ffmpeg 或显卡，全部在 Apify 云端运行；一次可以批量跑几百个视频，关机也不影响；AI agent 可以通过 MCP 或 API 直接调用；输出是现成的结构化 JSON（时间戳、字幕、元数据、英文摘要），按用量付费，没有订阅费。
- 支持**批量处理**和**多P视频**（`parts` 选 `all` 就会转写所有分P）。
- **价格：每音频分钟 $0.005**，10 分钟的视频约 $0.05，**已包含英文摘要**。失败、跳过、超长的视频**不收费**；没有检测到人声的视频按最低 1 分钟计费。
- **英文摘要（1.1 新增，默认开启）**：每个转写成功的分P都会附带一段英文要点摘要（最多 5 条，字段 `englishSummary.text`），由大模型（阿里云百炼 DeepSeek）根据文字稿生成，不额外收费；不需要可以设 `englishSummary: false`。
- **全文英文翻译（1.1 新增，可选）**：设 `translateToEnglish: true` 后输出整篇英文译文（字段 `englishTranslation.text`），长文本自动分块翻译。按音频分钟**另收 $0.002**（收费事件 `translation-minute`），**只在翻译成功后收费**；翻译失败、英文视频、跳过的视频都不收费。10 分钟视频含翻译约 $0.07。
- **AI 失败不影响文字稿**：摘要或翻译失败时，文字稿照常返回，`transcript.flags` 里会标 `SUMMARY_FAILED` / `TRANSLATION_FAILED`，原因写在 `englishSummary` / `englishTranslation` 的 `errorCode`、`message` 里。每个分P最多送 `maxLlmCharsPerVideo`（默认也是上限 30000）字给大模型，超出部分截断并标记 `LLM_INPUT_TRUNCATED`，翻译只按实际翻译的比例收费。付费/充电等被跳过的视频不会调用大模型。
- 摘要和翻译基于机器转写结果，转写错误可能被带入，仅供参考。开启摘要/翻译时，文字稿（不含音频）会发送到阿里云百炼（服务器在中国大陆）处理；不需要可关闭 `englishSummary`（并保持 `translateToEnglish` 关闭）。
- **只支持公开视频**（不登录、不付费就能看的视频）。下面这些类型会被识别出来并**直接跳过**：输出一条 `"type": "skipped"` 记录并写明原因，**不收费，也不下载音频**：
  - UP主**充电专属**视频（包括单片付费、仍在抢先看期内的视频）→ `UPOWER_EXCLUSIVE`
  - **B站课堂付费课程**（`bilibili.com/cheese/...` 链接，或者跳转到课堂的 b23.tv 短链）→ `PAID_COURSE`
  - **付费视频 / 付费合集**（UGC付费）→ `PAID_CONTENT`；只公开了试看片段的视频 → `PREVIEW_ONLY`
  - **番剧、电影、电视剧**（`/bangumi/` 链接、PGC 付费内容）→ `UNSUPPORTED`
  - 私密、已删除、审核中或有地区限制的视频会返回错误记录（`NOT_FOUND` / `UNDER_REVIEW` / `RESTRICTED` / `NO_AUDIO`），同样不收费。
- **SRT 字幕**：在 `outputFormats` 里勾选 `srt`（默认不开），就会按语音识别的分段时间戳生成标准 SRT 字幕；勾选 `vtt` 生成 WebVTT。不额外收费。
- 输入支持：完整链接、`BV` 号、`av` 号、`b23.tv` 短链；链接后面加 `?p=N` 可以指定分P。
- 输出：每个分P一条数据。`transcript.text` 是全文，`transcript.segments` 是逐句时间戳，`srt` / `vtt` 是字幕文本。开启 `saveSubtitleFiles` 后，还会把 `.srt` / `.txt` 文件保存到 Key-value store，可以直接下载。
- **给 AI agent / MCP 用**：在 MCP 客户端（Claude、Cursor 等）里添加 `https://mcp.apify.com?tools=lone_fascia/bilibili-video-transcriber`，登录 Apify 后直接对 agent 说"把这个 B站视频转成文字并总结"即可；也可以用 REST API `run-sync-get-dataset-items` 或 Python `apify-client` 一次调用拿到结果（示例见上方英文部分）。
- 适用场景：无障碍字幕（方便听障用户）、个人学习与研究、搭建 AI 知识库（RAG）、视频总结、帮海外用户看懂和研究 B站内容。
- **质量提示**：`transcript.quality.confidence` 取 high / medium / low 三档；`transcript.flags` 会标出 `POSSIBLE_DIALECT_ACCENT_OR_NOISE`（可能是方言、口音重或户外噪声）、`LOW_CONFIDENCE`（结果可能不可靠）、`MIXED_OR_UNSUPPORTED_LANGUAGE`（不支持的语言或多种语言混杂）、`CANTONESE_DETECTED`（检测到粤语）、`NO_SPEECH_DETECTED` / `LOW_SPEECH_RATIO`（没有或很少人声）等。这些标记是启发式判断，只作参考。
- **内存**：推荐默认的 4 GB（也是上限），10 分钟的视频大约 1.5 分钟处理完；2 GB 也能用，但慢一倍左右（大约 3–4 分钟），每分钟价格不变。
- 说明：识别结果由机器生成，方言、背景音乐很重或多人同时说话时可能有错误。请遵守版权和 B站用户协议，不要未经授权转载他人内容。

#### 合规与隐私

- **只处理公开视频**：只处理不登录、不付费就能看的公开视频；付费内容和充电专属视频会被识别并跳过。
- **不抓弹幕和用户数据**：不采集弹幕、评论或任何观众/用户个人数据，只读取公开的视频信息和转写所需的最低码率音频。
- **音频处理完即删**：音频转写完成后立即删除，不保存、不返回音频或视频。
- **第三方 AI 处理**：开启摘要/翻译时，文字稿会发送到阿里云百炼（服务器在中国大陆）处理；不需要可关闭 `englishSummary`。
- **声明**：本工具与哔哩哔哩无关联，Bilibili 是其所有者的商标。

# Actor input Schema

## `videos` (type: `array`):

Public videos only: charge-exclusive (充电专属), paid course (课堂), paid and bangumi content is skipped for free. Video URLs, BV ids, av ids or b23.tv short links, one per line. Examples: https://www.bilibili.com/video/BV1Eapz6PErV , BV1Eapz6PErV , av170001 , https://b23.tv/xxxx . Add ?p=N to a URL to pick a specific part. 支持完整链接、BV号、av号、b23.tv 短链。

## `parts` (type: `string`):

For videos with several parts (分P): transcribe only the first part (or the part given by ?p=N), or all parts. Each part is billed separately by its audio length.

## `language` (type: `string`):

Default Mandarin (zh): recommended for Chinese videos; auto-detect tends to leak Japanese/Korean characters into accented Mandarin. If a part is clearly English/Japanese/Korean/Cantonese, the Actor detects it and switches automatically (flag LANGUAGE_SWITCHED). Choose Auto-detect for mixed-language content.

## `outputFormats` (type: `array`):

What to include in each dataset item. text = full plain text; segments = sentence-level \[{start,end,text}] with seconds; srt / vtt = ready-to-use subtitle files as strings, built from the speech-recognition segment timestamps (off by default, no extra charge).

## `saveSubtitleFiles` (type: `boolean`):

Saves <BVID>\_p<N>.srt and .txt to the run's key-value store so you can download them directly.

## `englishSummary` (type: `boolean`):

Adds a short English bullet-point summary of each transcribed part (englishSummary.text), written by an LLM (DeepSeek) from the transcript. When on, the transcript text (not the audio) is sent to Alibaba Cloud Model Studio (servers in mainland China) for processing; turn this off if you don't want that. Included in the audio-minute price, no extra charge. If the LLM fails, the transcript is still returned and the item is flagged SUMMARY_FAILED. 英文摘要，默认开启，不额外收费；开启时文字稿会发送到阿里云百炼（服务器在中国大陆）处理，不需要可关闭。

## `translateToEnglish` (type: `boolean`):

Translates the whole transcript into English (englishTranslation.text) with an LLM, in chunks. The transcript text is sent to Alibaba Cloud Model Studio (servers in mainland China). Charged separately per audio minute (event translation-minute) and ONLY when the translation succeeds; failed translations are flagged TRANSLATION_FAILED and are free. English transcripts are not translated or charged. 全文英文翻译，文字稿会发送到阿里云百炼（中国大陆）处理，按音频分钟另行收费，失败不收费。

## `maxLlmCharsPerVideo` (type: `integer`):

Safety cap for summary and translation. Longer transcripts are cut to this length (about 60-75 minutes of Chinese speech at 30000) and flagged LLM_INPUT_TRUNCATED; a truncated translation is only charged for the translated share of the audio minutes. Max 30000.

## `includeMetadata` (type: `boolean`):

Description, stats (views/likes/coins/favorites/shares/danmaku/replies), category, publish time and cover URL. Title, BV id, creator and duration are always included.

## `qualityCheck` (type: `boolean`):

Re-decodes a small sample (about 20-90 s of speech) to detect the spoken language and flag likely dialect, accent, noisy or low-confidence audio in transcript.flags and transcript.quality. Adds roughly 10-30% processing time and costs nothing extra.

## `maxVideos` (type: `integer`):

Safety cap on the number of video parts transcribed in one run.

## `maxAudioMinutesPerVideo` (type: `integer`):

Parts longer than this are skipped (not charged) and reported as TOO_LONG. Max 300.

## `minRequestIntervalSecs` (type: `integer`):

Politeness delay between requests to Bilibili.

## Actor input object example

```json
{
  "videos": [
    "https://www.bilibili.com/video/BV1Eapz6PErV"
  ],
  "parts": "first",
  "language": "zh",
  "outputFormats": [
    "text",
    "segments"
  ],
  "saveSubtitleFiles": false,
  "englishSummary": true,
  "translateToEnglish": false,
  "maxLlmCharsPerVideo": 30000,
  "includeMetadata": true,
  "qualityCheck": true,
  "maxVideos": 50,
  "maxAudioMinutesPerVideo": 120,
  "minRequestIntervalSecs": 1
}
```

# Actor output Schema

## `transcripts` (type: `string`):

Dataset items (overview view): transcripts, English summaries/translations, metadata, skipped and error items.

## `runSummary` (type: `string`):

RUN_SUMMARY record in the default key-value store: counts of transcribed/skipped/failed parts, audio minutes and billed minutes.

## `files` (type: `string`):

Keys of the default key-value store; contains <BVID>\_p<N>.srt and .txt files when saveSubtitleFiles is on.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videos": [
        "https://www.bilibili.com/video/BV1Eapz6PErV"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lone_fascia/bilibili-video-transcriber").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "videos": ["https://www.bilibili.com/video/BV1Eapz6PErV"] }

# Run the Actor and wait for it to finish
run = client.actor("lone_fascia/bilibili-video-transcriber").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videos": [
    "https://www.bilibili.com/video/BV1Eapz6PErV"
  ]
}' |
apify call lone_fascia/bilibili-video-transcriber --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lone_fascia/bilibili-video-transcriber"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NAQL41zh5q175zNss/builds/vld668qScoPbllVwj/openapi.json
