YouTube / Transcripts / RAG
YouTube Transcript Scraper API Alternative
Collect public YouTube transcripts and metadata for search, summaries, citations, and RAG systems without managing the YouTube API.
Published
Updated
7 min read
What this pipeline does
Most transcript workflows do not need a full video platform integration. They need reliable text, timestamps, video metadata, and a source URL that can be cited later.
The YouTube Transcript Scraper collects public video metadata, captions, transcript segments, channel details, and optional comments. That makes it useful for content research, support knowledge bases, sales enablement, and RAG systems that need source-backed answers.
Best first run
Start with a few public video URLs before using channel or search ingestion.
{
"mode": "transcript",
"videoUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"includeComments": false,
"maxVideos": 3,
"enableAiAnalysis": false
}
Check whether each result includes video_id, title, channel_name, transcript_available, transcript_text, transcript_segments, and published_date. If a video has no public captions, route it to a fallback process instead of pretending the transcript is complete.
Chunk shape for retrieval
{
"id": "youtube:dQw4w9WgXcQ:001",
"text": "Timestamped transcript text for this segment.",
"metadata": {
"video_id": "dQw4w9WgXcQ",
"title": "Example video",
"channel_name": "Example Channel",
"start_seconds": 83,
"source_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=83s"
}
}
The chunk above is an application-level document you build from transcript_segments, not a raw actor output row. Use each segment's start, duration, and text to preserve timing. Use segment-level chunks for retrieval. Long full-video documents often bury the useful answer. Segment chunks also let a chatbot cite the exact timestamp instead of only linking to the video.
Check the transcript before indexing
- Require
transcript_available: trueand nonempty text before creating retrieval documents. Missing captions are a coverage gap; the actor does not generate a new transcript from audio. - Keep
transcript_languageandtranscript_kindwith the documents. Automatic captions can mishear names, numbers, and technical terms, so verify consequential quotes against the video. - Preserve timing when combining adjacent short segments into a larger passage. Use the first segment's
startfor the citation and the last segment'sstart + durationfor the end of the passage.
Test retrieval with a question whose answer you can locate in the video. Follow the returned timestamp and confirm that the cited passage supports the answer before indexing a larger channel.
Summary workflow
For a weekly content digest, summarize after retrieval, not before. First fetch the relevant transcript chunks, then ask the model for a short answer with citations. This keeps the summary grounded in the sections that match the user's question.
Deployment notes
Run video lists daily or weekly depending on how often the channels publish. Store the raw transcript beside the chunked documents, because chunking rules change over time. A clean source transcript lets you rebuild the index without scraping the same videos again.
Field definitions, defaults, and current limits: