YouTube Transcript (Apify)
AIエージェントに、YouTubeの動画、再生リスト、チャンネルの文字起こしを提供します。テキスト、タイムスタンプ、SRT/VTT、タイトル、チャンネル情報に対応しています。字幕のない動画は音声から文字起こし(Whisper)し、字幕の言語が異なる場合はAIで翻訳します。タイムスタンプは保持されます。各結果には作成方法が記載され、失敗した動画にはエラーコードが返されます。リモート:https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper(Apifyアカウントが必要)。ローンチ期間中は無料で、Apifyプラットフォームの利用料のみお支払いいただきます。私が作りました。
ホスト型 MCP サーバー
npx add-mcp 'https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper'Claude Code、Codex、Cursor などにインストールできます
ドキュメント
YouTube transcripts for scripts, RAG pipelines and LLM prompts: examples
Small, copy-paste examples that get YouTube transcripts (plain text, timestamped segments, SRT) into your code, using a free Apify Actor I built: YouTube Transcript API.
| Example | What it does |
|---|---|
python/get_transcript.py | One video → plain text, optionally in another language |
node/videos_to_srt.mjs | Videos, a playlist or a channel → one .srt file per video (no dependencies) |
curl/run.sh | The raw API call, JSON out |
You need an Apify account (the free plan works) and its API token in APIFY_TOKEN
(Console → Settings → API & Integrations).
pip install apify-client
python python/get_transcript.py https://www.youtube.com/watch?v=jNQXAC9IVRw
# # Me at the zoo [en, from captions]
# All right, so here we are, in front of the elephants ...
node node/videos_to_srt.mjs https://www.youtube.com/watch?v=jNQXAC9IVRw
# jNQXAC9IVRw.en.srt Me at the zoo (captions, 39 words)
What the Actor does when YouTube says no
- No captions at all: it transcribes the audio (Whisper large-v3-turbo), with timestamps.
- No captions in your language: it uses YouTube's translation, and when YouTube refuses, translates with AI line by line so every timestamp is kept.
- Every result says how it was made (
transcriptSource:captionsoraudio;translationStatus), and a failed video comes back with anerrorCodeinstead of a silent wrong answer.
Audio transcription and AI translation need a paid Apify plan; captions and YouTube's own translations work on the free plan.
Cost
The Actor is free during launch: you only pay Apify's platform usage, about $0.0002–0.0014 per captioned video (measured), which the free plan's monthly credit covers. See the pricing section for what comes later.
Not using a hosted service?
youtube-transcript-api is the open-source Python library for captions. It doesn't transcribe audio or fall back to AI translation, and from cloud servers YouTube often blocks it unless you add proxies.
Use from an AI agent
The Actor is also a tool for AI agents through Apify's MCP server:
https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper
MIT licensed. Issues and questions welcome.