Go to example tasks

YouTube字幕下载 API · Download subtitles via API

通过 API 下载任意 YouTube 视频的字幕。Download any video's captions as srt, vtt, text. Returns non_timestamped and language_code per URL.

Try for free
YouTube Transcript & Subtitles Scraper API
YouTube Transcript & Subtitles Scraper APIjohnvc/youtubetranscripts
Thumbnail
Title
Channel
Views
+8 fields
Text
Number
Boolean
List
Object

Input

YouTube URL(s):https://www.youtube.com/watch?v=dQw4w9WgXcQ
Additional Output Formats:srt+2

Output fields

Thumbnail
Title
Channel
Views
Language
Source
Duration
Snippets
Translated to
YouTube URL
Cached
OK

How it works

Sign up on Apify or log in

The YouTube Transcript & Subtitles Scraper API Actor is ready to run with the inputs already set for "YouTube字幕下载 API · Download subtitles via API". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "YouTube字幕下载 API · Download subtitles via API" task

The YouTube Transcript & Subtitles Scraper API Actor will start running based on the input automatically. You can also change all the input fields, like youtube url(s) and additional output formats, to match your specific use case.

Receive the "YouTube字幕下载 API · Download subtitles via API" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as thumbnail, title, channel, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "YouTube字幕下载 API · Download subtitles via API" task via API.

Image

Integrate "YouTube字幕下载 API · Download subtitles via API" into your workflow

Connect "YouTube字幕下载 API · Download subtitles via API" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay

Frequently asked questions

每个视频返回一条记录:完整的字幕文本放在 non_timestamped,带时间戳的片段放在 timestamped,视频标题和频道名在 title 和 channel_name 里,再加上 srt、vtt 和 text 三个字幕字符串,直接存成文件就能用。整个数据集可以导出为 JSON、CSV 或 Excel,字幕视图单独列出字幕一列,方便批量处理。

只需要 youtube_url 一个必填项,例如 https://www.youtube.com/watch?v=dQw4w9WgXcQ ,再把 output_formats 设为 srt、vtt 和 text,三种格式的字幕就会一起放进每条记录里。下载任务的默认设置优先取英文字幕轨;如果想要中文字幕,在 languages 里把 zh 排在第一位,任务就会优先挑中文字幕轨,而不是默认的英文。

可以调用该任务在 Apify API 上的运行端点,或者在 Python、Node 里用 apify-client 包把它封装起来,传入 youtube_url 和 output_formats 两个字段,等运行结束后以 JSON 把数据集读回来。把每条记录里的 srt、vtt 和 text 字符串直接写进文件,字幕文件就生成好了,不需要再做任何格式转换,整个流程几行代码就能跑通。

在任务页面点 Actions,然后 Schedule,填入 cron 表达式,例如 0 9 * * 1 表示每周一早上九点运行。定时任务沿用保存好的输入,无需人工干预,每周为频道的新视频生成一批字幕文件。

把 https://mcp.apify.com/?tools=actors,docs,johnvc/youtubetranscripts 添加为 MCP 服务器之后,Claude 或任何其他 MCP 客户端都能把这个任务当作工具来用。在对话里贴上视频链接,让助手下载字幕,它就会自己运行任务,再把字幕文本和各种格式的字幕内容原样读回来,整个过程不用离开聊天窗口,也不用打开控制台。

按成功转写的视频数计费,每个视频计一次 videoprocessed 事件,不按秒数算,所以一小时的讲座和一分钟的短片价格相同。多要几种输出格式也不另外加钱,没有字幕或处理失败的视频不收费。各套餐的费率略有差别,具体请看 Actor 页面。

字幕下载任务取的是视频已经带有的原始字幕轨,按原语言输出 srt、vtt 和 text 三种格式,适合做存档或配字幕。YouTube字幕翻译 API · Translate subtitles via API 则多了 translate_to 输入,把字幕翻译成中文或别的语言后再返回。只想要原文,选下载任务就够了。