YouTube To AI RAG avatar

YouTube To AI RAG

Pricing

from $4.00 / 1,000 video minute processeds

Go to Apify Store
YouTube To AI RAG

YouTube To AI RAG

Pricing

from $4.00 / 1,000 video minute processeds

Rating

0.0

(0)

Developer

Enrique G.

Enrique G.

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

🎬 YouTube to AI & RAG: Multimodal Markdown & Visual Extractor

Transform any YouTube video into an AI-ready Multimodal Markdown document and structured dataset.
Extract timestamped spoken transcripts synchronized with exact slide, code, and diagram screen captures—ready for ChatGPT, Claude 3.5, Gemini, Cursor, Notion AI, LangChain, and RAG pipelines.


⚡ The Problem: Why Traditional YouTube Scrapers Fail for AI

Most YouTube scrapers on the market only extract plain text transcripts. But in technical tutorials, lectures, webinars, and product demos, over 70% of critical knowledge is visual:

  • 📊 Complex architectural diagrams and workflows
  • 💻 Code snippets, terminal commands, and IDE windows
  • 📈 Financial charts, comparison tables, and slide decks
  • 🖥️ UI walkthroughs and visual settings

When you feed plain text into an LLM, the model misses the entire visual context.

YouTube to AI & RAG Extractor solves this completely: it pairs every spoken paragraph with the exact visual frame displayed on screen at that precise second, hosted via permanent high-speed URLs and formatted into token-dense Markdown.


📊 Feature Comparison

FeatureStandard YouTube ScrapersYouTube to AI & RAG Extractor
Output FormatPlain raw text or bulky JSON✅ Token-dense Multimodal Markdown + YAML Frontmatter
Visual Context❌ None (Audio text only)✅ Synchronized screen captures of slides, code & diagrams
Duplicate Slide Filtering❌ None✅ Smart Visual Deduplication (no redundant images)
Hosted Image URLs❌ Broken or local paths✅ Permanent cloud-hosted public URLs ready for LLMs
Clickable Timestamp Links❌ Raw second numbers✅ Direct clickable YouTube jump links (https://youtu.be/...)
Time Range Trimming⚠️ Must download whole video✅ Process specific clips (startTime / endTime)
LLM & RAG Ready❌ Requires custom pipelines✅ Drop directly into ChatGPT, Claude, Gemini, or Vector DBs

📄 Sample Multimodal Markdown Output

When processed, each video generates a clean, token-optimized Markdown document structured like this:

---
video_id: "7xTGNNLPyMI"
title: "Building Autonomous Agents with Memory & Tool Calling"
channel: "AI Engineering Hub"
duration: "24:18"
time_range: "02:00 - 10:30"
total_captures: 8
source_url: "https://www.youtube.com/watch?v=7xTGNNLPyMI"
---
# Building Autonomous Agents with Memory & Tool Calling
**Channel:** AI Engineering Hub | **Duration:** 24:18 | **Source:** [https://www.youtube.com/watch?v=7xTGNNLPyMI](https://www.youtube.com/watch?v=7xTGNNLPyMI)
**Extracted Range:** 02:00 - 10:30 | **Visual Captures:** 8 screenshots
---
### ⏱️ [02:15](https://youtu.be/7xTGNNLPyMI?t=135)
In this section, we examine the core multi-agent architecture. The supervisor agent coordinates tool execution across worker agents.
![Screen Capture 02:15](https://api.apify.com/v2/key-value-stores/.../records/frame_7xTGNNLPyMI_00135.jpg)
---
### ⏱️ [04:40](https://youtu.be/7xTGNNLPyMI?t=280)
Here is the concrete implementation. Notice how the state schema persists conversational history across sub-agent handoffs.
![Screen Capture 04:40](https://api.apify.com/v2/key-value-stores/.../records/frame_7xTGNNLPyMI_00280.jpg)
---
### ⏱️ [07:12](https://youtu.be/7xTGNNLPyMI?t=432)
Finally, let's benchmark latency when streaming tokens with local models versus cloud inference endpoints.
![Screen Capture 07:12](https://api.apify.com/v2/key-value-stores/.../records/frame_7xTGNNLPyMI_00432.jpg)

🛠️ Input Configuration

ParameterTypeDefaultDescription
videoUrlsArray(Required)List of YouTube video URLs or 11-character video IDs (supports standard watch URLs, youtu.be, shorts, and live streams).
captureModeSelectintervalChoose capture frequency: interval (every N seconds), timestamp (on each transcript phrase), smart_scene (slide changes), or none (text only).
intervalSecondsInteger15Interval in seconds between screenshots when using interval mode (2 to 600 seconds).
deduplicateFramesBooleantrueWhen enabled, skips redundant screenshots if the slide, code window, or graphic hasn't changed.
maxScreenshotsInteger100Safety limit on maximum screenshots per video to control token usage and run speed.
preferredLanguagesArray["en", "es", "auto"]Prioritized subtitle languages with automatic fallback to original video audio tracks.
startTimeString""Optional start timestamp (e.g. 02:30, 5, or 01:10:00).
endTimeString""Optional end timestamp (e.g. 12:45 or 01:30:00).
imageResolutionSelect480pResolution of captured slides (360p ultra-fast, 480p recommended sharp text balance, 720p high-def).
outputFormatSelectbothFormats to deliver: both, markdown_only, or dataset_only.
proxyConfigurationObjectDefaultOptional proxy settings to access region-restricted videos.

🤖 Integrations & AI Workflows

1. Direct LLM Context Injection (Claude 3.5 Sonnet, ChatGPT Plus, Gemini)

Download the generated .md file or copy the aiMarkdown field directly into your prompt. Vision-capable models will simultaneously analyze the spoken explanations and the code or architecture shown in the screenshots.

2. LangChain & LlamaIndex RAG Pipelines

Load dataset items directly and convert into documents with visual metadata:

Python (Apify Client & LangChain):

from apify_client import ApifyClient
from langchain_core.documents import Document
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("egsand/youtube-to-ai-rag").call(run_input={
"videoUrls": ["https://www.youtube.com/watch?v=7xTGNNLPyMI"],
"captureMode": "interval",
"intervalSeconds": 20
})
dataset_items = client.dataset(run["defaultDatasetId"]).list_items().items
documents = [
Document(
page_content=item["aiMarkdown"],
metadata={
"title": item["title"],
"url": item["videoUrl"],
"duration": item["durationFormatted"]
}
)
for item in dataset_items
]

JavaScript / TypeScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('egsand/youtube-to-ai-rag').call({
videoUrls: ['https://www.youtube.com/watch?v=7xTGNNLPyMI'],
captureMode: 'interval',
intervalSeconds: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Extracted Markdown for: ${items[0].title}`);

3. Automated Workflows with n8n, Make & Zapier

  1. Trigger: Watch an RSS feed or YouTube channel for new tutorial uploads.
  2. Action: Run this Actor with the new video URL.
  3. Delivery: Send the generated Markdown document to Notion, Obsidian, Slack, or a vector store.

💡 Practical Use Cases

  • AI Researchers & Engineers: Ingest entire university lecture series, technical conference talks, and paper presentations into your personal RAG knowledge base.
  • Developers & Learners: Summarize 2-hour coding tutorials into clean, readable Markdown guides with all code snippets captured.
  • Product Teams & Marketers: Extract competitor demo videos and feature walkthroughs into structured visual reports.
  • Content Creators: Repurpose video content into illustrated blog articles, LinkedIn carousels, and newsletter guides.

💰 Transparent Per-Minute Billing

This Actor uses fair Pay-Per-Event (video-minute) pricing based strictly on the processed video duration:

  • Minimum 1 Minute (Videos < 60s): Videos or clips shorter than 60 seconds (such as YouTube Shorts) are billed as 1 minute (1 video-minute event).
  • Per Started Minute Rounding: Partial minutes are rounded up to the next full minute (e.g., a 03:33 video is billed as 4 minutes).
  • Clip-Range Savings (startTime / endTime): If you extract a 5-minute segment from a 2-hour video using startTime and endTime, you are only billed for the 5 minutes processed, not the full 2-hour video.

❓ Frequently Asked Questions (FAQ)

Q: Do the image links expire?
A: No. Screenshots are stored in your Apify Key-Value Store with permanent direct URLs that can be embedded anywhere.

Q: Does it work with videos without official captions?
A: Yes! The actor automatically extracts auto-generated speech recognition tracks whenever manual subtitles are not available. If a video has no spoken audio at all, it automatically generates a visual keyframe timeline.

Q: Can I process only a specific portion of a long video?
A: Yes. Use the startTime and endTime fields (e.g. startTime: "10:00", endTime: "25:30") to extract and pay only for the relevant chapter.

Q: How are short videos under 1 minute billed?
A: Any video or trimmed clip under 60 seconds is billed at the minimum unit of 1 minute (1 video-minute event).