YouTube Transcript (Apify)
Cung cấp cho tác nhân AI bản chép lời của bất kỳ video, danh sách phát hoặc kênh YouTube nào: văn bản, dấu thời gian, SRT/VTT, tiêu đề và kênh. Video không có phụ đề sẽ được chép lời từ âm thanh (Whisper); phụ đề sai ngôn ngữ sẽ được AI dịch, giữ nguyên dấu thời gian. Mỗi kết quả cho biết cách tạo ra bản chép lời, còn video xử lý thất bại sẽ trả về mã lỗi. Từ xa: https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper (cần có tài khoản Apify). Miễn phí trong thời gian ra mắt; bạn chỉ trả phí sử dụng nền tảng Apify. Tôi đã xây dựng công cụ này.
Máy chủ MCP được lưu trữ
npx add-mcp 'https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper'Cài vào Claude Code, Codex, Cursor và nhiều công cụ khác
Tài liệu
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.