Turn any YouTube channel into RAG‑ready transcripts (no YouTube API key)
说明与用途
Apify Actor 自动从任何 YouTube 频道提取准确的字幕,清理 HTML 实体,按章节拆分为 RAG 友好的块,并输出可直接用于向量存储的结构化数据。
问题
Obtaining accurate, clean transcripts from arbitrary YouTube channels for RAG pipelines is difficult because the official API does not expose caption text for non‑owned videos, scrapers often return only one video at a time, may provide auto‑translated captions instead of the spoken language, and require manual cleaning of HTML entities, chunking, and timestamp handling.
结果
The solution reliably returns 20/20 transcripts in the correct spoken language within ~30 seconds, correctly handles right‑to‑left languages, and flags videos without captions with a NO_CAPTIONS row. It eliminates manual cleaning and chunking, enabling seamless RAG pipeline integration.
工作流
- 1. Deploy the Apify Actor "panix/youtube-transcript-scraper" via the web console, Python, or an n8n workflow.
- 2. Provide a list of channel URLs, @handles, playlists or Shorts URLs, and set parameters such as maximum videos and inclusion of chunks.
- 3. The Actor fetches each video’s transcript, detects the spoken language, cleans HTML entities, splits into non‑crossing chapter chunks, and attaches timestamps and deep links.
- 4. Output is returned as JSON rows containing transcript text, segments, and optional formats (SRT, WebVTT, Markdown, RAG chunks).
- 5. For automated pipelines, consume the JSON via the Apify API, iterate over rows, and upsert each chunk into a vector store (Pinecone, Qdrant, Supabase pgvector, Chroma) using the dedupeKey and chunkIndex as the record ID.
证据
The official YouTube Data API doesn’t give you caption text for videos you don’t own.
I tested it on 20 videos in 20 languages in one run: English, German, French, Spanish, Hindi, Arabic, Urdu, Japanese, Italian, Filipino, Polish, Romanian, Dutch, Persian, Portuguese, Bengali, Tamil, Telugu, Ukrainian and Marathi.
20/20 came back in the language actually spoken, in about 30 seconds.
- 记录日期: 2026-10-26T22:26:11.557Z