YouTube Transcript Extractor for AI and RAG avatar

YouTube Transcript Extractor for AI and RAG

Pricing

from $2.80 / 1,000 transcripts

Go to Apify Store
YouTube Transcript Extractor for AI and RAG

YouTube Transcript Extractor for AI and RAG

Extract YouTube transcripts and captions in bulk as text, timed segments or Markdown, with token-sized chunks for AI and RAG pipelines. Clear status for every video; you pay only for successful transcripts.

Pricing

from $2.80 / 1,000 transcripts

Rating

0.0

(0)

Developer

Wilson Anibe

Wilson Anibe

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

Share

Get the transcript of any public YouTube video as timed segments, plain text or Markdown, with optional token-sized chunks ready for embeddings. Every video you submit comes back with a clear status, and you pay only for transcripts that were actually extracted.

What you can use it for

  • AI and RAG pipelines. Turn videos into chunks of a size you choose, each with start and end times, so answers can link back to the exact moment in the video.
  • Research. Collect transcripts from a list of videos, a playlist or a channel, with title, channel, duration and publish date, for analysis or search.
  • Content repurposing. Get Markdown with the video title as a heading and the creator's chapters as sections, ready to edit into an article, newsletter or show notes.
  • Subtitles and accessibility. Get timed segments with start and duration in seconds, in the language you prefer, with manual captions chosen over auto-generated ones.

Sample output

One item per video. This is a real result for a TED talk, shortened where marked with ...:

{
"videoId": "-moW9jvvMr4",
"url": "https://www.youtube.com/watch?v=-moW9jvvMr4",
"title": "A Simple Way to Break a Bad Habit | Judson Brewer | TED",
"channelName": "TED",
"channelId": "UCAuUUnT6oDeKwE6v1NGQxug",
"durationSeconds": 565,
"publishedAt": "2016-02-24",
"language": "en",
"isAutoGenerated": false,
"availableLanguages": ["ar", "be", "bg", "my", "ckb", "zh-CN", "..."],
"transcript": [
{ "start": 12.76, "duration": 1.856, "text": "When I was first learning to meditate," },
{ "start": 14.64, "duration": 3.056, "text": "the instruction was to simply pay attention to my breath," },
{ "start": 17.72, "duration": 2.08, "text": "and when my mind wandered, to bring it back." },
"..."
],
"chunks": [
{
"index": 0,
"text": "When I was first learning to meditate, the instruction was to simply pay attention to my breath, and when my mind wandered, to bring it back. Sounded simple eno...",
"start": 12.76,
"end": 103.576,
"tokenCount": 356
},
"..."
],
"wordCount": 1509,
"status": "ok",
"statusReason": "Transcript extracted",
"attempts": 1
}

With outputFormat set to text, transcript is one string. With markdown, it looks like this:

# Why Scientists Are Puzzled By This Virus
## Start (0:00)
Very recently scientists discovered that your body is teeming with trillions of the most bizarre viruses ...
## You Are an Ecosystem (0:23)
You're a living, breathing ecosystem made of up to 40 trillion cells. ...

chunks is included only when you set chunkTokens.

Sample input

{
"videos": [
"https://www.youtube.com/watch?v=-moW9jvvMr4",
"https://youtu.be/5MuIMqhT8DM",
"https://www.youtube.com/shorts/QM5vh0ZKvZo"
],
"sources": ["https://www.youtube.com/@TED"],
"maxVideosPerSource": 20,
"languages": ["en", "es"],
"outputFormat": "segments",
"chunkTokens": 400
}
FieldWhat it doesDefault
videosVideo URLs or IDs. Watch, youtu.be, Shorts, embed and live URLs all work. Duplicates are removed.
sourcesChannel or playlist URLs to expand into videos.
maxVideosPerSourceVideos to take from each channel or playlist.50
languagesPreferred language codes, in order. en also matches en-US, en-GB.["en"]
fallbackToAnyLanguageIf no preferred language exists, return an available one.true
preferManualCaptionsUse creator-uploaded captions over auto-generated ones in the same language.true
outputFormatsegments, text or markdown.segments
chunkTokensAlso split into chunks of about this many tokens, breaking at sentence ends.off
includeMetadataTitle, channel, duration, publish date.true
proxyConfigurationApify Proxy settings.Residential
maxConcurrencyVideos processed at the same time.10

Status for every video

Every video you submit produces exactly one result. A video that fails never stops the run.

StatusMeaningCharged
okTranscript extracted.Yes
no_captionsThe video has no captions of any kind.No
language_not_availableNo captions in your languages and fallbackToAnyLanguage is off. availableLanguages lists what exists.No
privatePrivate, paid or members-only video.No
deletedRemoved, unavailable or never existed.No
age_restrictedYouTube requires sign-in to confirm age. This Actor never signs in.No
live_not_finishedLive stream in progress or premiere not yet started. Try again after it ends.No
blockedYouTube refused every attempt, after retries with fresh IP addresses.No
errorAnything else, including input that is not a YouTube video. statusReason explains.No

statusReason gives a short explanation, and attempts shows how many tries were made.

Pricing

This Actor uses pay-per-event pricing. You are charged for one transcript event per video with status ok. Videos with any other status are not charged. The price per transcript is shown on the Pricing tab of this page.

Apify also applies its standard small per-run start charge, shown on the same tab.

If you set a maximum charge per run, the Actor stops cleanly when it is reached. Videos it did not get to are not processed or charged, and the run summary says so.

How it works

  • Transcripts come from YouTube's own captions (manual or auto-generated). Audio and video files are never downloaded.
  • No YouTube account, cookies or sign-in are used. Only public data is read.
  • Requests go through Apify residential proxy by default, because YouTube blocks most datacenter and cloud addresses.
  • If a request is blocked or the connection drops, the Actor retries with a new IP address and a growing delay. If the main method fails twice, it switches to a second, independent extraction method. Attempts per video are capped at five.
  • If the run is restarted or migrated by the platform, finished videos are not processed or charged again.
  • A run summary with counts per status is saved in the key-value store under SUMMARY.

Limits

  • Videos without any captions return no_captions. This Actor does not transcribe audio.
  • Private, members-only, paid and age-restricted videos cannot be read without signing in, so they return a status instead of a transcript.
  • Auto-generated captions often have little punctuation. Chunks then break at caption boundaries, close to the requested size, instead of at sentence ends.
  • tokenCount is an estimate (characters divided by 4). Your model's tokenizer may count differently.
  • wordCount counts space-separated words, so it undercounts languages written without spaces, such as Japanese and Chinese.
  • Channel sources take videos from the channel's Videos tab. Shorts and past live streams on separate tabs are not included unless you add them as videos.
  • Availability can differ by country. A video may be playable in one region and restricted in another.
  • YouTube changes its internals from time to time. That can temporarily raise the share of blocked or error results until the Actor is updated.

FAQ

Do I need a YouTube API key or account? No.

Am I charged for videos that fail? No. Only results with status ok are charged.

Can I get the transcript in a language the video was not captioned in? Not in this version. You get the caption languages the video has, listed in availableLanguages.

Why did a video come back as blocked? YouTube refused all attempts for that video, even after retries with new IP addresses. Run it again later. If many videos are blocked, check that the proxy setting is residential.

Can I use datacenter proxy to save cost? You can select it, but in our testing YouTube refused most requests from datacenter addresses. Residential is the reliable choice.

How do I get only the text for an LLM prompt? Set outputFormat to text, or markdown if you want headings.

Is there a limit on video length? No fixed limit. Three-hour videos have been tested.