Go to example tasks

Turn YouTube videos into RAG chunks for AI

Convert YouTube videos into LLM-ready Markdown and chapter-aware transcript chunks, ready to embed in a vector database such as Pinecone, Qdrant or Supabase. Each chunk has a timestamp, word count, chapter and a deep link to the exact moment in the video, so answers can cite their source. The example processes three well-known TED talks.

Try for free
YouTube Transcript API & Scraper
YouTube Transcript API & Scraperpanix/youtube-transcript-scraper
Video ID
Video title
Markdown
RAG chunks
Text
Number
Boolean
List
Object

Input

YouTube video or Shorts URLs:https://www.youtube.com/watch?v=iG9CE55wbtY+2
LLM-ready Markdown:true
RAG-ready chunks:true
Chunk size:300
Chunk overlap:30

Output fields

Video ID
Video title
Markdown
RAG chunks

How it works

Sign up on Apify or log in

The YouTube Transcript API & Scraper Actor is ready to run with the inputs already set for "Turn YouTube videos into RAG chunks for AI". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "Turn YouTube videos into RAG chunks for AI" task

The YouTube Transcript API & Scraper Actor will start running based on the input automatically. You can also change all the input fields, like youtube video or shorts urls, LLM-ready Markdown, and more, to match your specific use case.

Receive the "Turn YouTube videos into RAG chunks for AI" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as video id, video title, markdown, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "Turn YouTube videos into RAG chunks for AI" task via API.

Image

Integrate "Turn YouTube videos into RAG chunks for AI" into your workflow

Connect "Turn YouTube videos into RAG chunks for AI" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay

Frequently asked questions

Each chunk from the YouTube RAG task has the transcript text, its start time, word count, the video chapter and a deep link that opens the video at that moment, plus the video ID and title.

300 words with 30 words of overlap suits most embedding models. The YouTube RAG task accepts 50 to 2,000 words per chunk and up to 500 words of overlap.

Add channel or playlist URLs next to the video links. The YouTube RAG task removes videos found through several sources and keeps the original order.

The YouTube RAG task charges per delivered transcript, with Markdown and chunks included: $0.003 per video on the Apify Free plan and $0.00275 on Starter, less on bigger plans, plus $0.003 per run.