Turn any YouTube channel into RAG‑ready transcripts (no YouTube API key)
Описание и применение
Автоматический скрипт на Apify извлекает точные транскрипты из любых каналов 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