YouTube Transcript (Apify)

Gives an AI agent the transcript of any YouTube video, playlist or channel: text, timestamps, SRT/VTT, title and channel. Videos without captions are transcribed from the audio (Whisper); captions in the wrong language are translated with AI, timestamps kept. Each result says how it was made, and failed videos return an error code. Remote: https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper (Apify account required). Free during launch; you pay only Apify platform usage. I built it.

Hosted MCP Server

npx add-mcp 'https://mcp.apify.com?tools=luisbendeckdev/youtube-transcript-scraper'

Installs into Claude Code, Codex, Cursor and more

Documentation

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.

ExampleWhat it does
python/get_transcript.pyOne video → plain text, optionally in another language
node/videos_to_srt.mjsVideos, a playlist or a channel → one .srt file per video (no dependencies)
curl/run.shThe 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: captions or audio; translationStatus), and a failed video comes back with an errorCode instead 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.