YouTube Transcript API
Pricing
Pay per usage
YouTube Transcript API
Extract transcripts, captions, and subtitles from YouTube videos. Supports 100+ languages, auto-generated captions, SRT/VTT export, playlists, and channels.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Glass Ventures
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Extract transcripts, captions, and subtitles from any YouTube video. Supports 100+ languages, auto-generated captions, timestamps, SRT/VTT export, playlists, channels, and search queries.
What does YouTube Transcript API do?
YouTube Transcript API extracts the full transcript (captions/subtitles) from YouTube videos and returns them as structured data with timestamps, video metadata, and multiple export formats.
Unlike other transcript tools, this actor doesn't require any API keys, browser extensions, or YouTube Data API quotas. It works directly with YouTube's public caption system, supporting both manually created and auto-generated (speech-to-text) captions.
You can input individual video URLs, video IDs, entire playlists, channel pages, or even search queries — the actor will discover all videos and extract their transcripts automatically.
Use Cases
- Content creators — Repurpose video content into blog posts, social media, or newsletters
- Researchers — Analyze spoken content at scale for academic studies or market research
- SEO professionals — Extract video transcripts to create text-based content for search engines
- AI/ML engineers — Build training datasets from YouTube content for language models
- Accessibility teams — Generate text versions of video content for deaf/hard-of-hearing users
- Journalists — Quickly get searchable text from interviews and press conferences
- Language learners — Extract bilingual transcripts for study materials
Features
- Extract transcripts from any YouTube video with captions
- Support for 100+ languages with automatic language detection
- Auto-generated (speech-to-text) and manual caption support
- Translate transcripts to any language using YouTube's built-in translation
- Multiple output formats: JSON with timestamps, plain text, SRT, VTT
- Batch processing: playlists, channels, and search results
- Full video metadata: title, channel, views, publish date, description, thumbnail
- Direct video ID input for maximum speed
- Shows all available caption languages per video
- Handles private/unavailable videos gracefully with clear error messages
- Proxy support for reliable scraping at scale
How much will it cost?
YouTube Transcript API is extremely efficient — it uses only HTTP requests (no browser), making it very fast and cheap.
| Videos | Estimated Cost | Time |
|---|---|---|
| 10 | < $0.01 | ~10 sec |
| 100 | ~$0.02 | ~1 min |
| 1,000 | ~$0.15 | ~5 min |
| 10,000 | ~$1.50 | ~45 min |
| Cost Component | Per 1,000 Videos |
|---|---|
| Platform compute (256 MB) | ~$0.05 |
| Datacenter proxy | ~$0.10 |
| Total | ~$0.15 |
YouTube has generous rate limits, so datacenter proxies work well — no expensive residential proxies needed.
How to use
- Go to the YouTube Transcript API page on Apify Store
- Click "Start" or "Try for free"
- Enter YouTube URLs, video IDs, or search terms
- Choose your preferred language and output format
- Click "Start" and download the results
Input parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
| startUrls | array | YouTube video, playlist, or channel URLs | - |
| videoIds | array | Direct video IDs (11 characters) | - |
| searchTerms | array | Search YouTube and extract from results | - |
| language | string | Preferred transcript language (ISO code) | en |
| includeAutoGenerated | boolean | Use auto-generated captions when manual ones are unavailable | true |
| translationLanguage | string | Translate transcript to this language | - |
| outputFormat | string | json, plaintext, srt, or vtt | json |
| includeTimestamps | boolean | Include start/duration per segment | true |
| includeVideoMetadata | boolean | Include title, channel, views, etc. | true |
| maxItems | number | Maximum videos to process | 50 |
| proxyConfig | object | Proxy configuration | Apify Proxy |
Output
The actor produces a dataset with the following fields:
{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","videoId": "dQw4w9WgXcQ","title": "Rick Astley - Never Gonna Give You Up (Official Music Video)","channelName": "Rick Astley","channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw","description": "The official video for "Never Gonna Give You Up" by Rick Astley...","viewCount": 1500000000,"publishDate": "2009-10-25","duration": "3:33","thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg","language": "en","languageName": "English","isAutoGenerated": true,"isTranslated": false,"availableLanguages": ["en (auto)"],"transcript": [{ "text": "We're no strangers to love", "start": 18.0, "duration": 3.5 },{ "text": "You know the rules and so do I", "start": 22.0, "duration": 3.2 }],"fullText": "We're no strangers to love You know the rules and so do I...","formattedTranscript": null,"segmentCount": 68,"totalDurationSecs": 213,"scrapedAt": "2024-01-15T10:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
| url | string | YouTube video URL |
| videoId | string | 11-character video ID |
| title | string | Video title |
| channelName | string | Channel name |
| channelUrl | string | Channel URL |
| description | string | Video description |
| viewCount | number | Total view count |
| publishDate | string | Upload date (YYYY-MM-DD) |
| duration | string | Video duration (M:SS or H:MM:SS) |
| thumbnailUrl | string | Highest resolution thumbnail |
| language | string | Transcript language code |
| languageName | string | Language display name |
| isAutoGenerated | boolean | Whether captions are auto-generated |
| isTranslated | boolean | Whether the transcript was translated |
| availableLanguages | array | All available caption languages |
| transcript | array | Array of segments with text, start time, and duration |
| fullText | string | Complete transcript as a single string |
| formattedTranscript | string | SRT or VTT formatted transcript (when format is srt/vtt) |
| segmentCount | number | Number of transcript segments |
| totalDurationSecs | number | Total transcript duration in seconds |
| scrapedAt | string | ISO 8601 scrape timestamp |
Output formats
JSON (default)
Returns structured data with timestamps per segment. Best for programmatic access and analysis.
Plain Text
The fullText field contains the entire transcript as a single string. Best for content repurposing and text analysis.
SRT
Industry-standard subtitle format. The formattedTranscript field contains:
100:00:18,000 --> 00:00:21,500We're no strangers to love200:00:22,000 --> 00:00:25,200You know the rules and so do I
VTT
Web-native subtitle format. The formattedTranscript field contains:
WEBVTT00:00:18.000 --> 00:00:21.500We're no strangers to love00:00:22.000 --> 00:00:25.200You know the rules and so do I
Integrations
Connect YouTube Transcript API with other tools:
- Apify API — REST API for programmatic access
- Webhooks — Get notified when extraction finishes
- Zapier / Make — Connect to 5,000+ apps
- Google Sheets — Export transcripts directly to spreadsheets
API Example (Node.js)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_TOKEN' });const run = await client.actor('glassventures/youtube-transcript-api').call({videoIds: ['dQw4w9WgXcQ'],language: 'en',outputFormat: 'json',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items[0].fullText);
API Example (Python)
from apify_client import ApifyClientclient = ApifyClient('YOUR_TOKEN')run = client.actor('glassventures/youtube-transcript-api').call(run_input={'videoIds': ['dQw4w9WgXcQ'],'language': 'en','outputFormat': 'json',})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(items[0]['fullText'])
API Example (cURL)
curl "https://api.apify.com/v2/acts/glassventures~youtube-transcript-api/runs" \-X POST \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_TOKEN" \-d '{"videoIds": ["dQw4w9WgXcQ"], "language": "en"}'
Tips and tricks
- Use video IDs for fastest processing — skip URL parsing overhead
- Batch by playlist — paste a playlist URL to extract all video transcripts at once
- Translation — set
translationLanguageto get transcripts in any language, even if the original isn't in that language - Cost optimization — set
includeVideoMetadata: falseif you only need the transcript text - SRT/VTT export — use these formats for direct import into video editors like Premiere Pro, Final Cut, or DaVinci Resolve
FAQ
Q: Does this actor require a YouTube API key? A: No. It works without any API keys or authentication. It uses YouTube's public caption system.
Q: How fast is the extraction? A: Approximately 100-500 videos per minute depending on concurrency settings. Each video requires only 2 HTTP requests.
Q: What if a video has no captions?
A: The actor returns the video with transcript: null and segmentCount: 0. The availableLanguages field will be empty.
Q: Can I get transcripts from private or age-restricted videos? A: No. Only publicly available videos with captions are supported. Private and age-restricted videos are reported with a clear error message.
Q: Does this work with YouTube Shorts? A: Yes. YouTube Shorts URLs are automatically detected and processed.
Q: Can I extract transcripts in multiple languages from the same video?
A: Run the actor multiple times with different language settings, or use the translationLanguage field to translate from the base language.
Q: What should I do if I get blocked? A: YouTube rarely blocks transcript extraction. If you experience issues, try using Apify Proxy with the default datacenter settings.
Is it legal to scrape YouTube transcripts?
Extracting publicly available captions from YouTube is generally considered legal for personal use, research, and analysis purposes. This actor only accesses publicly available caption data that YouTube makes available to all viewers. Always review YouTube's Terms of Service for your specific use case. For more information, see Apify's blog on web scraping legality.
Limitations
- Only works with videos that have captions (manual or auto-generated)
- Private, age-restricted, and deleted videos are not accessible
- YouTube auto-generated captions may contain inaccuracies (speech-to-text errors)
- Translation quality depends on YouTube's auto-translation engine
- Channel and playlist extraction is limited to the initially loaded videos (~30-100)
Changelog
- v0.1 — Initial release with full transcript extraction, multi-language support, SRT/VTT export, playlist/channel/search support