YouTube Transcript Scraper avatar

YouTube Transcript Scraper

Pricing

from $5.00 / 1,000 transcript extracteds

Go to Apify Store
YouTube Transcript Scraper

YouTube Transcript Scraper

Extract YouTube transcripts at scale from videos, Shorts, playlists, and channels. Get timestamped captions in structured JSON with multi-language support, automatic fallback, and translation — ideal for AI, RAG pipelines, search, research, and content analysis.

Pricing

from $5.00 / 1,000 transcript extracteds

Rating

5.0

(1)

Developer

Upadhyay Labs

Upadhyay Labs

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Features

Limited permissions

Share

YouTube Transcript Scraper

Extract transcripts and captions from YouTube videos, Shorts, playlists, and channels in bulk. Returns clean, timestamped text in structured JSON — ready for AI, RAG, search indexing, and content analysis. Pay only for successfully extracted transcripts.

Why use this Actor?

  • Bulk extraction — process hundreds of videos in a single run from videos, playlists, and channels
  • Multi-language — request transcripts in any language YouTube supports, with automatic fallback and translation
  • Manual or auto-generated captions — choose human-made captions for accuracy, or include auto-generated (ASR) captions
  • AI/RAG-ready — optional pre-chunked output with timestamp anchors, sized for embeddings pipelines
  • Timestamped segments — every caption segment includes start, duration, end, and text
  • Rich metadata — title, channel, duration, publish date, view count, and caption provenance per video
  • Structured errors — failed videos report a clear error code and message, never a blank row
  • Pay only for results — charged per successful transcript; failed videos cost nothing
  • Fast and lightweight — no browser overhead

Use cases

  • RAG pipelines — feed transcript chunks into vector databases for retrieval-augmented generation
  • AI training data — build datasets of video content for LLM fine-tuning
  • Content analysis — analyze topics, sentiment, and messaging at scale
  • Search indexing — make video content searchable by indexing transcript text
  • Content repurposing — turn video content into blog posts, summaries, or study materials
  • Market research — extract and compare competitor video content
  • Accessibility — generate text versions of video content

Input parameters

FieldTypeDescriptionDefault
startUrlsarrayYouTube URLs to extract transcripts fromrequired
languagestringPreferred transcript language code (e.g. en, es, hi, ja)en
languageFallbackbooleanFall back to another available language if preferred is not foundtrue
preferManualCaptionsbooleanPrefer human-made captions over auto-generated when both existtrue
includeAutoGeneratedbooleanInclude auto-generated (ASR) captionstrue
includeTimestampedSegmentsbooleanInclude timestamped caption segments in outputtrue
includeRagChunksbooleanInclude AI/RAG-ready chunks with timestamp anchorsfalse
chunkSizeCharsintegerTarget character length per RAG chunk (200–8000)2000
chunkOverlapCharsintegerCharacter overlap between consecutive chunks (0–2000)200
maxVideosPerChannelintegerMax videos to expand from a single channel50
maxVideosPerPlaylistintegerMax videos to expand from a single playlist200
maxTotalVideosintegerHard cap across all sources in one run500
maxConcurrencyintegerVideos processed in parallel (1–50)20
proxyConfigurationobjectApify Proxy settingsApify Proxy enabled

Supported URL formats

  • https://www.youtube.com/watch?v=VIDEO_ID
  • https://youtu.be/VIDEO_ID
  • https://www.youtube.com/shorts/VIDEO_ID
  • https://www.youtube.com/playlist?list=PLAYLIST_ID
  • https://www.youtube.com/@handle
  • https://www.youtube.com/channel/UC...

Example input

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"language": "en",
"includeAutoGenerated": true,
"includeRagChunks": false
}

Output

Each video produces one JSON object in the dataset.

Output fields

FieldTypeDescription
statusstringSUCCESS or FAILED
videoIdstringYouTube video ID
urlstringFull YouTube URL
titlestringVideo title
channelNamestringChannel name
channelIdstringChannel ID
durationSecondsnumberVideo duration in seconds
publishedAtstringPublish date
viewCountnumberView count
isShortbooleanWhether the video is a YouTube Short
languagestringLanguage code of the returned transcript
isAutoGeneratedbooleanWhether the caption track is auto-generated (ASR)
isTranslatedbooleanWhether the transcript was auto-translated
wordCountnumberTotal word count
characterCountnumberTotal character count
transcriptstringFull concatenated transcript text
segmentsarrayTimestamped caption segments (start, duration, end, text)
chunksarrayRAG chunks with timestamp anchors (when enabled)
errorCodestringError code for failed videos
errorMessagestringError description for failed videos

Example output

{
"status": "SUCCESS",
"videoId": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"channelName": "Rick Astley",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"durationSeconds": 212,
"publishedAt": "2009-10-25",
"viewCount": 1700000000,
"isShort": false,
"language": "en",
"isAutoGenerated": false,
"isTranslated": false,
"languageSelectionReason": "exact_match",
"availableLanguages": [
{ "languageCode": "en", "kind": "manual", "name": "English" }
],
"transcriptDurationSeconds": 210.5,
"wordCount": 412,
"characterCount": 2150,
"transcript": "We're no strangers to love. You know the rules and so do I...",
"segments": [
{ "start": 0.0, "duration": 2.3, "end": 2.3, "text": "We're no strangers to love" },
{ "start": 2.3, "duration": 3.1, "end": 5.4, "text": "You know the rules and so do I" }
],
"chunks": [],
"sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sourceType": "video",
"errorCode": null,
"errorMessage": null,
"fetchedAt": "2026-11-05T10:00:00.000Z"
}

Error codes

CodeMeaning
VIDEO_UNAVAILABLEVideo was deleted or does not exist
PRIVATE_VIDEOVideo is private or requires sign-in
AGE_RESTRICTEDVideo is age-restricted
LIVE_STREAM_NO_TRANSCRIPTLive stream has not ended or been processed yet
TRANSCRIPTS_DISABLEDCaptions are disabled on this video
NO_CAPTIONS_FOUNDCaption track had no usable text
LANGUAGE_NOT_AVAILABLERequested language unavailable and fallback disabled
TRANSCRIPT_FETCH_BLOCKEDYouTube blocked the caption fetch — try using proxy
PLAYLIST_UNAVAILABLEPlaylist is private, deleted, or empty
CHANNEL_UNAVAILABLEChannel is private, deleted, or empty

Pricing

YouTube Transcript Scraper uses Pay-Per-Event pricing and Failed videos are never charged.

Integrations

Connect YouTube Transcript Scraper with other tools through the Apify platform:

  • Apify API — run programmatically and retrieve results via REST API
  • Webhooks — trigger your pipeline when a run finishes
  • Scheduled runs — set up recurring transcript extraction
  • Google Sheets, Slack, Zapier, Make — connect output through Apify integrations
  • Dataset export — download results as JSON, CSV, Excel, or XML

Using JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('upadhyay.labs/youtube-transcript-scraper').call({
startUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],
language: 'en',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Using Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('upadhyay.labs/youtube-transcript-scraper').call(run_input={
'startUrls': [{'url': 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'}],
'language': 'en',
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

FAQ

This Actor accesses publicly available caption data. It does not bypass authentication or access private content. Users are responsible for ensuring their use complies with YouTube's Terms of Service and applicable laws.

What languages are supported?

Any language that YouTube captions are available in. Set the language input to a language code like en, es, fr, de, ja, hi, pt, ko, or zh. If the preferred language is unavailable, the Actor can fall back to another language or translate the transcript automatically.

Why did a video return TRANSCRIPT_FETCH_BLOCKED?

YouTube may block caption requests from certain IP addresses. Enable Apify Proxy in the input settings. If blocks persist, lower maxConcurrency or try residential proxies.

Can I extract transcripts from playlists or channels?

Yes. Add a playlist or channel URL and the Actor expands it into individual videos automatically. Use maxVideosPerPlaylist and maxVideosPerChannel to control how many videos are extracted per source.

What is RAG chunking?

RAG chunking splits the transcript into overlapping text segments with timestamp anchors, sized for embeddings pipelines. Enable it with includeRagChunks: true. Default chunk size is 2000 characters with 200-character overlap.

Can I get only human-made captions?

Yes. Set includeAutoGenerated: false to skip auto-generated (ASR) captions. Only videos with human-made captions will return transcripts.