YouTube Transcript API: Subtitles, Captions & Whisper AI
Pricing
from $1.80 / 1,000 transcripts
YouTube Transcript API: Subtitles, Captions & Whisper AI
Transcribe YouTube to text: transcripts, subtitles and captions from videos, Shorts, channels, playlists and search. Whisper AI speech-to-text for videos without captions (paid plans), translation, SRT/VTT and LLM chunks. Works with MCP agents and n8n. From $1.80 per 1,000.
Turn YouTube videos, Shorts, channels, playlists and searches into text: transcripts, subtitles and captions as plain text, SRT, VTT or LLM chunks. Videos without captions can be transcribed by Whisper AI, and transcripts can be translated (AI features on paid Apify plans). You pay only for the transcripts you get.
One video from the API
One field is enough. This call waits for the run to finish and returns the result (up to 300 seconds):
curl -X POST "https://api.apify.com/v2/acts/0xdevinci~youtube-transcript-scraper/run-sync-get-dataset-items" \-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \-d '{"url": "https://www.youtube.com/watch?v=UF8uR6Z6KLc", "compact": true}'
Response with "compact": true (a real result, transcript shortened):
[{"url": "https://www.youtube.com/watch?v=UF8uR6Z6KLc","videoId": "UF8uR6Z6KLc","title": "Steve Jobs' 2005 Stanford Commencement Address","language": "en","transcriptText": "This program is brought to you by Stanford University. Please visit us at stanford.edu Thank You. I am honored to be with you today at your commencement ...","status": "success","errorCode": null,"errorMessage": null,"warning": null}]
"includeSegments": trueadds the timestamped segments (transcript: text, start, duration in seconds)."languages": ["it", "en"]picks the language,"translateTo": "es"translates,"outputFormat": "srt"returns subtitles.- Without
compactyou get the full result with 24 fields (see Output). urlalso takes a Short, ayoutu.belink, a channel or a playlist; for many links useurls.
What a call costs
| FREE | BRONZE | SILVER | GOLD and above | |
|---|---|---|---|---|
| 1 video in one call | $0.00255 | $0.0023 | $0.00205 | $0.00185 |
| 1,000 videos, one call each | $2.55 | $2.30 | $2.05 | $1.85 |
| 1,000 videos in one run | $2.50 | $2.25 | $2.00 | $1.80 |
- A call costs one transcript ($0.0025 on FREE, down to $0.0018) plus Apify's start fee of $0.00005 per run (one per GB of memory; the default memory is below 1 GB, so one fee).
- Failed videos are free: a call that returns no transcript costs only the start fee.
- Videos with no subtitles at all are transcribed by AI on paid plans, for $0.008–$0.010 per started minute on top. Send
"aiFallback": falseto never pay for it.
AI agents (MCP) and n8n
MCP. The Apify MCP server turns this Actor into a tool your agent can call. Configuration for a local MCP client:
{"mcpServers": {"apify": {"command": "npx","args": ["-y", "@apify/actors-mcp-server", "--actors", "0xdevinci/youtube-transcript-scraper"],"env": { "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>" }}}}
The agent sees the tool 0xdevinci--youtube-transcript-scraper and can call it with {"url": "...", "compact": true}.
n8n. Add the Apify node (@apify/n8n-nodes-apify), choose Actors → Run actor and get dataset, Actor 0xdevinci~youtube-transcript-scraper, input mode JSON, and an input such as {"url": "{{ $json.url }}", "compact": true}. Each transcript comes out as one n8n item.
Python (apify-client 3.x):
from apify_client import ApifyClientclient = ApifyClient('<YOUR_APIFY_TOKEN>')run = client.actor('0xdevinci/youtube-transcript-scraper').call(run_input={'url': 'https://youtu.be/UF8uR6Z6KLc', 'compact': True},)item = next(client.dataset(run.default_dataset_id).iterate_items())print(item['status'], item['transcriptText'][:200])
Quick start in Apify Console
- Click Start. The input is pre-filled with a sample video, so the first run works without changing anything.
- Put your own sources in YouTube URLs, one per line, and/or type keywords in Search YouTube:
- a video:
https://www.youtube.com/watch?v=UF8uR6Z6KLcorhttps://youtu.be/UF8uR6Z6KLc - a Short:
https://www.youtube.com/shorts/KBfIo9sZbC4 - a channel:
https://www.youtube.com/@veritasium(newest videos first) - a playlist:
https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi - a search:
retrieval augmented generation tutorial
- a video:
- Optional: pick Transcript languages, Translate to, the Transcript text format (
llmfor ready-made chunks), how many videos per channel, playlist or search, and Only videos published after (e.g.30 days). - Click Start and open the Output tab. Download as JSON, CSV or Excel, or read the results through the API.
Set Maximum cost per run in the run options to control spending: the Actor stops when it is reached and never lists more videos than that budget can pay for.
{"urls": ["https://www.youtube.com/@veritasium","https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi","https://youtu.be/UF8uR6Z6KLc"],"searchQueries": ["retrieval augmented generation tutorial"],"languages": ["en"],"translateTo": "it","outputFormat": "llm","maxVideosPerSource": 50,"maxVideosPerSearch": 20,"publishedAfter": "90 days","includeShorts": false,"aiFallback": true}
What it does
| Inputs | Videos, Shorts, youtu.be, embeds, channels (@handle, /channel/, /c/, /user/, /videos, /shorts, /streams tabs), playlists, YouTube search terms and search links, mixed in one run. |
| No link limit | Add as many links and searches as you want, and as many videos per source as you want. Only your maximum cost per run decides how far a run goes. |
| Filters | publishedAfter (date or "30 days"), includeShorts, videos per source and per search. Live streams in progress and premieres are skipped. |
| Languages | Your languages in order of preference, optional fallback to any available language, translation to a target language, and availableLanguages for every video. |
| AI fallback | Videos with no subtitles at all are transcribed by Whisper (whisper-large-v3-turbo) from the audio (paid plans). |
| LLM-ready formats | llm blocks of ~1,000 tokens with start and end time, Markdown with timestamp links, clean plain text, timestamped segments, SRT and WebVTT. |
| Fair billing | Listing channels, playlists and searches is free. Failed videos are free. Duplicates found in several sources are charged once. |
| Retries | Each request starts on an Apify datacenter IP and moves to a fresh residential IP when YouTube blocks it (up to 3 attempts with increasing waits). One bad video or link never stops the run. |
Compared with other transcript Actors on the Store
Checked on 13 November 2026 on the Store pages of the top four YouTube transcript Actors by monthly users:
| This Actor | Those four Actors | |
|---|---|---|
| AI transcription of videos without subtitles | ✅ Whisper, from the audio | ❌ None of the four |
| Translation when YouTube refuses it | ✅ AI translation with the same timestamps (guaranteed on paid plans) | ❌ None of the four: three use only YouTube's own translation |
| Translation of AI transcripts | ✅ | ❌ None of the four |
| LLM-ready chunks with start and end times | ✅ | ❌ None of the four documents them |
| Videos per run | ✅ No limit: only your maximum cost per run decides | Three of the four have a cap: one video, 100 videos, or 200 videos from a channel |
Keyword search (searchQueries) | ✅ | One of the four |
| Playlists | ✅ | One of the four |
| Channels | ✅ Any number of videos, newest first, with publishedAfter | Three of the four |
| SRT and WebVTT | ✅ | Two of the four |
Built for automation
- One input for everything. Mix hundreds of video links, channels, playlists and searches in one run; duplicates across sources are removed and charged once.
- Stable output. One item per video, every field always present (
nullwhen it does not apply), so your code never breaks on a missing key. Filter onstatus, and retry only the items witherrorCode: "IpBlocked"or"RequestFailed". - Hard cost cap. Set
maxTotalChargeUsdon the run: the Actor never lists more videos than the budget can pay for, sets money aside before AI work, and stops cleanly when the budget is used. - Run report. Every run saves
RUN_STATSin its key-value store: videos listed and processed, successes, failures by code, AI minutes, translations. - Schedules and webhooks. Run it every day on new videos (
publishedAfter: "1 day") and get a webhook when the dataset is ready.
Actor ID for the API: 0xdevinci/youtube-transcript-scraper (Store page: https://apify.com/0xdevinci/youtube-transcript-scraper).
A bigger run from Python, with a cost cap:
from decimal import Decimalfrom apify_client import ApifyClientclient = ApifyClient('<YOUR_APIFY_TOKEN>')run = client.actor('0xdevinci/youtube-transcript-scraper').call(run_input={'urls': ['https://www.youtube.com/@veritasium'],'searchQueries': ['retrieval augmented generation tutorial'],'maxVideosPerSource': 500,'maxVideosPerSearch': 100,'outputFormat': 'llm',},max_total_charge_usd=Decimal('5'), # hard cap for this run)for item in client.dataset(run.default_dataset_id).iterate_items():if item['status'] == 'success':print(item['videoId'], len(item['chunks']), 'chunks')else:print(item['videoId'], item['errorCode'], item['errorMessage'])
For big runs use the asynchronous run endpoint (POST /v2/acts/0xdevinci~youtube-transcript-scraper/runs) and a webhook instead of the synchronous call, which waits at most 300 seconds.
Use cases
| Use case | How |
|---|---|
| RAG and knowledge bases | Choose llm: each video comes as blocks of about 1,000 tokens in chunks, each with start/end seconds, ready to embed and cite. Or markdown, where every paragraph links to its moment in the video. |
| AI agents | Call the Actor from your agent through the Apify MCP server or the API with {"url": "...", "compact": true}: the agent gets the text and a status, without extra fields. |
| Content repurposing | Turn videos into blog posts, newsletters, social threads, show notes or course material: feed transcriptText to your LLM with your own prompt. |
| Research and monitoring | Search a topic or pull the last videos of several channels with publishedAfter: "7 days" on a schedule. |
| Subtitles and translation | srt / vtt files, in the original language or translated with translateTo. |
Output example
Full output: one dataset item per video. Every field is always present and is null when it does not apply. With "compact": true each item has only url, videoId, title, language, transcriptText, status, errorCode, errorMessage and warning (plus transcript with "includeSegments": true).
A real result from a run with "urls": ["https://www.youtube.com/@veritasium"], "translateTo": "it" and "outputFormat": "llm" (transcript and chunks shortened):
{"videoId": "xlNKNnXdtN4","url": "https://www.youtube.com/watch?v=xlNKNnXdtN4","sourceUrl": "https://www.youtube.com/@veritasium","title": "These ponds help support half the people on Earth","channel": "Veritasium","channelId": "UCHnyfMqiRRG1u-2MsSQLbXA","durationSeconds": 112,"language": "it","isGenerated": true,"isTranslated": true,"translatedFrom": "en","translatedBy": "youtube","translationMinutes": null,"availableLanguages": [{ "languageCode": "en", "language": "English (auto-generated)", "isGenerated": true }],"isAiGenerated": false,"aiModel": null,"aiMinutes": null,"transcript": [{ "text": "Nel bel", "start": 0, "duration": 5.08 },{ "text": "mezzo del deserto dello Utah si trovano stagni di un blu elettrico. Che cosa sono", "start": 2.6, "duration": 4.84 }],"transcriptText": "[0:00:00 - 0:01:53]\nNel bel mezzo del deserto dello Utah si trovano stagni di un blu elettrico. Che cosa sono ? Perché sono qui? ...","chunks": [{ "index": 0, "start": 0, "end": 113.96, "tokens": 407, "text": "Nel bel mezzo del deserto dello Utah si trovano stagni di un blu elettrico. ..." }],"status": "success","errorCode": null,"errorMessage": null,"warning": null}
sourceUrlis the input line the video came from (the video itself, or the channel, playlist or search).chunksis filled with"outputFormat": "llm". With other formatstranscriptTextholds plain text, text lines, Markdown, SRT or WebVTT.- When YouTube does not deliver the translation, the same video comes back with
"translatedBy": "groq:openai/gpt-oss-120b"and"translationMinutes": 2(a real run gave "Ci sono stagni di un blu elettrico nel | cuore del deserto dello Utah. ...", same timestamps). - A video transcribed by AI has
"isAiGenerated": true,"aiModel": "whisper-large-v3-turbo"and theaiMinutescharged. warningexplains successful results that differ from what you asked, for example when YouTube does not deliver a translation and the original transcript is returned.
A video without subtitles when AI transcription is off looks like this (other fields null), and is not charged:
{"videoId": "Y1vEGsnNYek","url": "https://www.youtube.com/watch?v=Y1vEGsnNYek","sourceUrl": "https://www.youtube.com/@kurzgesagt","title": "What Is Food Fortification?","availableLanguages": [],"status": "failed","errorCode": "TranscriptNotFound","errorMessage": "This video has no subtitles or automatic captions. Turn on aiFallback to transcribe it with AI."}
Pricing
Pay per event: you pay only for what you get, and the price drops on higher Apify plans:
| Event | FREE | BRONZE | SILVER | GOLD and above | When |
|---|---|---|---|---|---|
| Transcript | $0.0025 | $0.00225 | $0.002 | $0.0018 | Each video whose transcript is delivered. |
| AI minute | $0.010 | $0.0095 | $0.009 | $0.008 | Per started minute of audio, only for videos with no subtitles, transcribed by AI. |
| AI translation minute | $0.003 | $0.003 | $0.003 | $0.003 | Per started minute of video, only when YouTube does not deliver the translation you asked for, and for AI transcripts (paid plans). |
That is $2.50 per 1,000 transcripts on the FREE tier and $1.80 per 1,000 on GOLD.
- Free: listing channels, playlists and searches; failed videos (
TranscriptNotFound, unavailable, age-restricted, blocked); duplicates; AI downloads, transcriptions or translations that fail. - An AI-transcribed video costs one transcript plus its minutes. Example (FREE tier): a 7-minute video with no subtitles costs $0.0025 + 7 × $0.010 = $0.0725.
- AI minutes and AI translation minutes are charged only after the AI succeeded, and never beyond your maximum cost per run: the budget is set aside first, and if it allows only part of a video, only that part is transcribed.
- Apify also charges a small fixed fee when a run starts ($0.00005 per GB of memory, minimum one).
Example (FREE tier): 3 channels × 20 videos where 55 have subtitles and 5 are transcribed by AI (6 minutes each) = 60 × $0.0025 + 30 × $0.010 = $0.45.
Example with translation (BRONZE): a 12-minute video translated by AI because YouTube refused its translation costs $0.00225 + 12 × $0.003 = $0.038.
Translation (guaranteed on paid plans)
Set translateTo (e.g. it) and the Actor delivers the transcript in that language:
- If the video has its own track in that language, that track is used (no translation needed).
- Otherwise YouTube's automatic translation is used, when YouTube delivers it (
translatedBy: "youtube"). - YouTube refuses most of its automatic translations to automated tools (in our tests, more than 9 in 10). On paid Apify plans the Actor then translates the segments itself with an AI text model (
openai/gpt-oss-120bon Groq), keeping every timestamp (translatedBy: "groq:openai/gpt-oss-120b", charged as AI translation minutes). The same happens for videos transcribed by AI, which YouTube cannot translate at all. If even the AI translation fails, you get the original transcript with awarning, free of charge. - On the free Apify plan there is no AI translation: when YouTube does not deliver its translation, you get the original transcript with a
warning, charged as a normal transcript.
Turn off aiTranslationFallback to never pay for AI translations (you then get the original with a warning when YouTube fails, charged normally).
AI transcription for videos without subtitles
- When: only for videos with no subtitles or automatic captions at all (
aiFallback, on by default). Videos that have captions in other languages useanyLanguageFallback/translateToinstead. - How: the Actor downloads only the audio, at a low bitrate, and transcribes it with Whisper (
whisper-large-v3-turbo) in the language spoken in the video. WithtranslateTo, the AI transcript is then translated too. - Limits:
maxAiMinutesPerVideo(default 60) transcribes at most the first N minutes;skipAiOverMinutes(default 120) skips longer videos entirely (free). - Plans: AI transcription is available to users on a paid Apify plan. On the free plan such videos return
TranscriptNotFoundwith an explanation, and are not charged.
Input
| Field | Default | Description |
|---|---|---|
url | empty | One YouTube link (video, Short, channel or playlist). Enough on its own for an API call. |
urls | one sample video in Console | Videos, Shorts, channels, playlists and search links, in any mix, no limit. |
searchQueries | empty | YouTube search terms, one per line. |
languages | ["en"] | Language codes in order of preference; uploader subtitles win over automatic captions. |
anyLanguageFallback | false | When none of your languages exists, return the first available transcript instead of failing. |
translateTo | empty | Target language code. Native track, then YouTube's translation, then (paid plans) AI translation. See "Translation (guaranteed on paid plans)". |
aiTranslationFallback | true | Paid plans: translate with AI when YouTube does not deliver the translation. |
outputFormat | json | json (clean text), text, markdown, llm (~1,000-token blocks), srt, vtt. |
includeMetadata | true | Adds title, channel, channelId, durationSeconds (free). |
compact | false | Return only url, videoId, title, language, transcriptText, status, errorCode, errorMessage, warning. |
includeSegments | false | With compact: also return the timestamped segments (transcript). |
maxVideosPerSource | 20 | Videos per channel or playlist. No upper limit. |
maxVideosPerSearch | 20 | Videos per search. No upper limit. |
publishedAfter | empty | YYYY-MM-DD (UTC) or 30 days, 2 weeks, 1 year. Applies to channels, playlists and searches. |
includeShorts | true | When off, channels give only regular videos and live replays and searches only regular videos. |
aiFallback | true | Transcribe videos without subtitles with AI (paid plans). |
maxAiMinutesPerVideo | 60 | AI transcribes at most the first N minutes. |
skipAiOverMinutes | 120 | No AI for videos longer than this. |
maxConcurrency | 3 | Videos processed in parallel (1–10). |
Error codes
The run never crashes because of one bad video or link: it finishes with partial results and explains every failure. Failed items are free.
errorCode | Meaning | What to do |
|---|---|---|
TranscriptNotFound | No subtitles in your languages (or none at all and AI was off, not available on your plan, or the video too long). | Add languages, turn on anyLanguageFallback or aiFallback. |
VideoUnavailable | The video does not exist, was removed, is private or members-only. | Check the link. |
AgeRestricted | YouTube shows the video only to signed-in adults. | Not supported. |
IpBlocked | YouTube blocked the request even after retrying on fresh residential IPs. | Run those links again later. |
InvalidUrl | The line is not a YouTube video, channel, playlist or search link. | Fix the link. |
SourceNotFound | The channel or playlist does not exist or is private. | Check the link. |
RequestFailed | Network, YouTube or AI service error after all retries. | Run again later. |
FAQ
What happens with videos that have no subtitles?
With aiFallback on (default) and a paid Apify plan, they are transcribed by AI and charged per minute. Otherwise they come back with "errorCode": "TranscriptNotFound" and you are not charged for them.
Do I pay for listing a channel, a playlist or a search? No. You pay only for transcripts (and AI minutes, if used).
Is there a limit on links or videos?
No fixed limit. Add as many sources as you like and raise maxVideosPerSource / maxVideosPerSearch; set a maximum cost per run you are comfortable with.
How do I get only recent videos?
Set publishedAfter to a date (2026-01-01) or a period (30 days). Channels are read newest first, so listing stops as soon as it reaches older videos.
Does translation always work?
Translation is guaranteed on paid Apify plans: when YouTube does not deliver its translation, an AI text model translates the transcript (timestamps unchanged); if that fails too, the original is free. On the free plan you get the original with isTranslated: false and a warning, charged as a normal transcript.
Does it need a YouTube account, API key or browser? No. It reads public captions with small HTTP requests through Apify proxies.
Is it legal? The Actor reads captions and audio that YouTube serves publicly. You are responsible for how you use the content: respect copyright and YouTube's terms, and do not republish transcripts you have no rights to.
How it works
The Actor uses the open-source youtube-transcript-api library with a lighter request flow: it skips the 1.4 MB watch page and asks YouTube only for the fields it needs, so a transcript costs a few kilobytes of traffic and a page of 100 channel videos about 9 KB. Requests go through Apify datacenter proxies first; if YouTube blocks them, the Actor retries on a fresh Apify residential IP (up to 3 attempts with increasing waits). For AI transcription it downloads only the minutes it needs of a low-bitrate audio stream (using yt-dlp to find a downloadable stream for longer videos) and sends it to Whisper on Groq.
Integrations and API
Run it from your code with the Apify API or the client libraries for Python and JavaScript, from n8n with the Apify node, or from AI agents through the Apify MCP server (see AI agents (MCP) and n8n). Apify lists its other integrations at https://docs.apify.com/platform/integrations.