YouTube Transcript to RAG Dataset
Pricing
from $0.80 / 1,000 page processeds
YouTube Transcript to RAG Dataset
Extract YouTube transcripts and convert them into RAG-ready chunks with timestamps, metadata, and content hashes.
Pricing
from $0.80 / 1,000 page processeds
Rating
0.0
(0)
Developer
GhostGrid
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
Extract YouTube video transcripts and convert them into structured, RAG-ready chunks with timestamps, metadata, and content hashes. No API key required.
What does this Actor do?
This Actor takes YouTube video URLs, fetches their transcripts using the YouTube transcript API, and splits them into chunks optimized for Retrieval-Augmented Generation (RAG) pipelines. Each chunk includes precise timestamps, stable IDs, content hashes, and token estimates. It also outputs the raw transcript alongside the chunks.
Why use it?
- Build knowledge bases from YouTube content without manual transcription
- Feed video transcripts into vector databases, search systems, or LLM context windows
- Get stable, deterministic chunk IDs so re-runs produce the same identifiers
- No YouTube Data API key needed for basic metadata (uses oEmbed)
- Choose from three chunking strategies to fit your embedding model's context window
Data Fields
Chunk Records
| Field | Type | Description |
|---|---|---|
| type | string | Always "chunk" |
| chunk_id | string | Stable UUID based on video ID and start time |
| video_id | string | YouTube video ID |
| video_url | string | Full YouTube URL |
| video_title | string | Video title from oEmbed |
| channel_name | string | Channel name from oEmbed |
| duration_seconds | float | Total video duration |
| language | string | Transcript language code |
| start_time | float | Chunk start time in seconds |
| end_time | float | Chunk end time in seconds |
| text | string | Chunk text content |
| source_url | string | YouTube URL with timestamp parameter |
| content_hash | string | SHA-256 hash of chunk text |
| token_estimate | int | Estimated token count (chars / 4) |
| chunk_index | int | Zero-based index of this chunk |
| total_chunks | int | Total chunks for this video |
| crawled_at | string | ISO timestamp of when data was fetched |
Transcript Records
| Field | Type | Description |
|---|---|---|
| type | string | Always "transcript" |
| video_id | string | YouTube video ID |
| video_url | string | Full YouTube URL |
| video_title | string | Video title |
| channel_name | string | Channel name |
| duration_seconds | float | Video duration |
| language | string | Language code |
| transcript_text | string | Full concatenated transcript |
| segments | array | List of {text, start, duration} objects |
| word_count | int | Total word count |
| token_estimate | int | Estimated token count |
| crawled_at | string | ISO timestamp |
How to Use
- Go to the Actor page on Apify
- Click "Start" or configure input
- Add YouTube video URLs to the
video_urlsarray - Choose your chunk strategy (timestamp, fixed_size, or sentence)
- Set chunk duration or token limit depending on strategy
- Run the Actor
- Download results from the Dataset tab as JSON, CSV, or Excel
Pricing
This Actor uses the Apify platform pricing model. Costs are based on:
- Compute: ~0.5 CU per video processed (simple API calls, no browser)
- Transcript charges: 1 platform event per video processed via
Actor.charge() - Dataset storage: Standard Apify dataset storage rates apply
A typical run processing 50 videos costs well under 1 CU total.
Input Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
| video_urls | array | - | Yes | YouTube video URLs |
| languages | array | ["en"] | No | Preferred transcript languages (ISO codes) |
| chunk_strategy | string | "timestamp" | No | Chunking method: timestamp, fixed_size, sentence |
| chunk_duration_seconds | integer | 60 | No | Seconds per chunk (timestamp strategy) |
| chunk_token_limit | integer | 512 | No | Max tokens per chunk (fixed_size strategy) |
| include_raw_transcript | boolean | true | No | Include full raw transcript in output |
| max_videos | integer | 50 | No | Maximum videos to process (1-500) |
Output Example
Chunk record:
{"type": "chunk","chunk_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890","video_id": "dQw4w9WgXcQ","video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","video_title": "Rick Astley - Never Gonna Give You Up","channel_name": "Rick Astley","duration_seconds": 214,"language": "en","start_time": 0.0,"end_time": 60.5,"text": "This is an example transcript chunk.","source_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=0","content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","token_estimate": 150,"chunk_index": 0,"total_chunks": 4,"crawled_at": "2026-07-04T12:00:00+00:00"}
Transcript record:
{"type": "transcript","video_id": "dQw4w9WgXcQ","video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","video_title": "Rick Astley - Never Gonna Give You Up","channel_name": "Rick Astley","duration_seconds": 214,"language": "en","transcript_text": "This is an example transcript.","segments": [{"text": "This is an example transcript.", "start": 0.0, "duration": 2.5}],"word_count": 1500,"token_estimate": 375,"crawled_at": "2026-07-04T12:00:00+00:00"}
FAQ
Q: Does this require a YouTube API key? A: No. Transcripts are fetched via the youtube-transcript-api library and metadata comes from the oEmbed endpoint, both of which work without API keys.
Q: What languages are supported?
A: Any language that has subtitles/captions on the YouTube video. Set the languages parameter with ISO codes in order of preference.
Q: How are chunk IDs generated? A: Chunk IDs are deterministic UUID5 values based on the video ID, start time, and chunk index. Re-running the same video produces the same chunk IDs.
Q: Can I process playlists? A: No. This Actor accepts individual video URLs only. Playlist expansion requires the YouTube Data API which needs an API key.
Q: What happens if a video has no transcript? A: The Actor logs a warning and skips that video. Processing continues with the remaining URLs.
Disclaimer
This Actor relies on the youtube-transcript-api library and YouTube's oEmbed endpoint. YouTube may change access behavior or rate limit requests at any time. This Actor is not affiliated with YouTube or Google. Use responsibly and respect YouTube's Terms of Service.