YouTube Transcript Scraper — Subtitles & Captions for RAG
Pricing
from $4.00 / 1,000 trends queries
YouTube Transcript Scraper — Subtitles & Captions for RAG
Fetch YouTube video transcripts and subtitles as clean text or timestamped segments. Perfect for RAG pipelines, content analysis, and AI agents. Use via Apify Console/API or connect as an MCP server for Claude, Cursor, and other AI agents.
Pricing
from $4.00 / 1,000 trends queries
Rating
0.0
(0)
Developer
Aaron Hampton
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Share
Fetch YouTube video transcripts and subtitles as clean text or timestamped segments. Perfect for RAG pipelines, content analysis, accessibility tools, and AI agents.
Features
- Single & batch mode — fetch one video's transcript or walk an entire channel
- Full-text search — search across multiple video transcripts for specific topics
- Language selection — prefer a specific language, fall back to auto-generated captions
- Timestamped segments — get clean
{ start, duration, text }segments or plain text - Dual-mode — run as a normal Apify Actor OR connect as an MCP server for Claude, Cursor, and other AI agents
- No browser required — uses YouTube's internal timedtext API directly
Use Cases
- RAG pipelines — feed transcripts into vector databases for Q&A over video content
- Content analysis — extract key topics, sentiment, or keywords from video transcripts
- Accessibility — get subtitles for videos that lack proper captioning
- AI agents — let Claude/Cursor read video content via MCP tools
- Research — search across many video transcripts to find specific information
Input (Normal Actor Mode)
| Field | Type | Description |
|---|---|---|
videoUrls | array | YouTube video URLs to fetch transcripts from |
channelUrl | string | Channel URL to fetch recent video transcripts |
maxVideos | integer | Max videos from channel (default 10, max 50) |
includeTimestamps | boolean | Include timing data (default true) |
language | string | Preferred language code (default "en") |
format | enum | "text", "segments", or "both" (default "both") |
Output
{"videoId": "dQw4w9gWgXc","videoUrl": "https://youtube.com/watch?v=dQw4w9gWgXc","title": "Video Title","language": "en","isAutoGenerated": false,"text": "Full plain text transcript...","segments": [{ "start": 0.0, "duration": 3.5, "text": "First segment" },{ "start": 3.5, "duration": 2.1, "text": "Second segment" }],"fetchedAt": "2026-07-04T00:00:00.000Z"}
MCP Tools (Standby Mode)
get_transcript
Fetch a single video's transcript.
{"videoUrl": "https://www.youtube.com/watch?v=dQw4w9gWgXc","language": "en","format": "both"}
get_channel_transcripts
Batch-fetch transcripts for a channel's recent videos.
{"channelUrl": "https://www.youtube.com/@channelname","maxVideos": 10,"language": "en"}
search_transcripts
Search across multiple video transcripts for a query.
{"query": "machine learning","videoUrls": ["https://www.youtube.com/watch?v=abc","https://www.youtube.com/watch?v=def"]}
Pricing (Pay Per Event)
| Event | Price | Free Tier |
|---|---|---|
| Actor start | $0.00005 | — |
| Transcript fetched | $0.005 | First 3 free per run/tool call |
| MCP tool call | $0.01 | — |
Tiered discounts available (Bronze → Diamond).
Technical Approach
- Fetch the YouTube watch page HTML
- Extract
ytInitialPlayerResponseJSON containing caption track metadata - Select the best caption track (manual > ASR, preferred language > fallback)
- Fetch the timedtext XML from the caption track's
baseUrl - Parse XML into clean segments with timestamps
- Fallback to direct timedtext API if watch page scraping fails
Development
npm install # Install dependenciesnpm run build # Compile TypeScriptnpm test # Run testsnpm run start:dev # Run in dev mode
Author
Aaron Hampton
License
ISC