# Youtube Transcript Scraper (`scrapesmith/youtube-transcript-scraper`) Actor

Extract timestamped transcripts and captions from any YouTube video in 20+ languages. Bulk scrape thousands of videos with full metadata — title, views, duration, channel, and publish date included.

- **URL**: https://apify.com/scrapesmith/youtube-transcript-scraper.md
- **Developed by:** [Scrape Smith](https://apify.com/scrapesmith) (community)
- **Categories:** Social media, AI, Automation
- **Stats:** 42 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Transcript Scraper — Extract Captions, Subtitles & Full Video Text

The fastest way to extract YouTube transcripts, captions, and subtitles at scale. Get the complete spoken text from any YouTube video as structured, timestamped data — with full video metadata included in every result.

***

### Why Use This YouTube Transcript Scraper?

- **3,000+ videos per minute** — the fastest YouTube transcript extractor on Apify
- **No browser, no API key, no login required** — fully anonymous, zero setup
- **Bulk processing** — feed 1, 100, or 10,000+ video URLs in a single run
- **Rich metadata** — title, author, channel, views, duration, publish date, category, description, and keywords on every result
- **Timestamped segments** — each caption segment includes start time and duration for subtitle generation
- **Full transcript text** — all segments joined into one searchable plain text block
- **20+ languages** — request transcripts in English, Spanish, German, French, Japanese, Korean, Chinese, Portuguese, and more
- **Smart language fallback** — always returns something, even if your preferred language isn't available
- **Auto-generated captions supported** — works with both manual and YouTube's auto-generated subtitles
- **YouTube Shorts supported** — extract transcripts from Shorts the same way as regular videos
- **Migration-safe** — if Apify moves the container mid-run, it resumes exactly where it left off

***

### What Data Do You Get?

Every result includes two layers of data — the transcript itself and the video metadata — so you never need a separate scraper for context.

#### Transcript Data

| Field | Description |
|---|---|
| **transcript\_text** | The entire spoken content joined into one plain text string — ready for NLP, indexing, or content repurposing |
| **segments** | Array of timestamped caption segments, each with `start` (seconds), `dur` (duration), and `text` |
| **segment\_count** | Total number of caption segments in the transcript |
| **status** | Result status: `ok`, `no_captions`, `unplayable`, or `error` |

#### Video Metadata

| Field | Description |
|---|---|
| **title** | Video title |
| **author** | Channel name |
| **channel\_url** | Direct link to the channel |
| **view\_count** | Total views at time of scraping |
| **duration\_seconds** | Video length in seconds |
| **publish\_date** | Original upload date (ISO 8601) |
| **category** | YouTube category (Music, Education, Entertainment, etc.) |
| **description** | Full video description text |
| **keywords** | SEO keywords/tags set by the uploader |
| **is\_family\_safe** | Whether the video is marked as family-friendly |

***

### Input

```json
{
  "videoIds": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "dQw4w9WgXcQ",
    "https://youtu.be/9bZkp7q19f0"
  ],
  "maxVideos": 1000
}
```

| Parameter | Type | Required | Description |
|---|---|---|---|
| `videoIds` | string\[] | Yes | YouTube video URLs or bare 11-character IDs. Accepts watch URLs, youtu.be short links, and Shorts URLs. |
| `maxVideos` | integer | No | Maximum videos to process in this run. Default: unlimited for paid plans. |

#### Accepted URL Formats

All of these work — paste whatever you have:

```
https://www.youtube.com/watch?v=jNQXAC9IVRw
https://youtu.be/jNQXAC9IVRw
https://www.youtube.com/shorts/jNQXAC9IVRw
jNQXAC9IVRw
```

***

### Sample Output

```json
{
  "video_id": "jNQXAC9IVRw",
  "video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "author": "jawed",
  "channel_id": "UC4QobU6STFB0P71PMvOGN5A",
  "channel_url": "https://www.youtube.com/@jaboreda",
  "view_count": 386567321,
  "duration_seconds": 19,
  "publish_date": "2005-04-23T20:31:52-07:00",
  "category": "Film & Animation",
  "description": "The first video on YouTube.",
  "keywords": ["me at the zoo", "jawed karim"],
  "is_family_safe": true,
  "is_private": false,
  "transcript_text": "All right so here we are in front of the elephants the cool thing about these guys is that they have really really really long trunks and that's cool and that's pretty much all there is to say",
  "segment_count": 3,
  "segments": [
    { "start": 1.0, "dur": 5.0, "text": "All right so here we are in front of the elephants" },
    { "start": 6.0, "dur": 8.0, "text": "the cool thing about these guys is that they have really really really long trunks" },
    { "start": 14.0, "dur": 5.0, "text": "and that's cool and that's pretty much all there is to say" }
  ],
  "status": "ok"
}
```

***

### How Fast Is It?

| Scenario | Videos | Time |
|---|---|---|
| Single video | 1 | ~2 seconds |
| Small batch (10 videos) | 10 | ~5 seconds |
| Medium batch (100 videos) | 100 | ~15 seconds |
| Large batch (1,000 videos) | 1,000 | ~30 seconds |
| Bulk run (5,000 videos) | 5,000 | ~3 minutes |

Processing is fully parallel — five videos are fetched simultaneously, each with independent metadata and transcript retrieval. A 1,000-video run with all transcripts available completes in under 30 seconds.

***

### Use Cases

#### AI Training Data & Machine Learning

YouTube is the largest source of spoken language on the internet. This scraper turns that into structured text you can feed directly into ML pipelines:

- **Build speech-to-text training datasets** from millions of hours of captioned video
- **Create question-answering datasets** from educational and tutorial content
- **Extract text corpora for NLP model training** — sentiment analysis, topic modeling, summarization
- **Build domain-specific knowledge bases** from lecture series, conference talks, and expert interviews
- **Fine-tune large language models** on YouTube content in any language or domain
- **Generate training pairs** by combining transcript text with video metadata (title, category, keywords)

#### Content Marketing & SEO

Turn competitor videos into actionable content intelligence:

- **Analyze competitor video scripts** — see exactly what they say and how they structure their content
- **Extract keywords and topics** from top-ranking YouTube videos in your niche
- **Repurpose video content** into blog posts, articles, social media threads, and email newsletters
- **Identify content gaps** by analyzing what topics your competitors cover that you don't
- **Build searchable video archives** — index transcript text for internal content libraries
- **Monitor brand mentions** — search transcripts for your brand, product, or competitor names

#### Academic Research & Journalism

- **Track public statements** from politicians, executives, and public figures across thousands of videos
- **Analyze media narratives** by extracting and comparing transcripts from news channels
- **Study language patterns** — accent analysis, vocabulary usage, discourse structures
- **Build longitudinal datasets** — track how messaging changes over time across channels
- **Archive spoken content** — create permanent text records of video content that may be deleted

#### Accessibility & Localization

- **Generate subtitle files** for videos that lack them — use the timestamped segments to create SRT or VTT files
- **Build translation pipelines** — extract source language transcripts, translate, and sync back to video timing
- **Create searchable archives** for hearing-impaired audiences
- **Audit caption quality** — compare auto-generated captions against manual transcriptions

#### Business Intelligence & Competitive Analysis

- **Monitor earnings calls and investor presentations** uploaded to YouTube
- **Track product launch announcements** from competitors
- **Analyze conference talks and keynotes** for industry trends
- **Extract customer testimonial data** from review and unboxing videos
- **Monitor thought leadership content** across your industry

#### Podcast & Video Production

- **Generate show notes** from podcast episodes hosted on YouTube
- **Create searchable episode archives** for podcast back-catalogs
- **Extract quotes and highlights** for social media promotion
- **Build episode summaries** by feeding transcripts into AI summarization tools
- **Cross-reference content** across episodes to find recurring topics

***

### Supported Languages

The scraper supports any language that YouTube provides captions for. These are the most commonly available:

| Code | Language | Code | Language |
|---|---|---|---|
| `en` | English | `ja` | Japanese |
| `en-US` | English (US) | `ko` | Korean |
| `en-GB` | English (UK) | `hi` | Hindi |
| `es` | Spanish | `id` | Indonesian |
| `es-ES` | Spanish (Spain) | `fil` | Filipino |
| `de` | German | `vi` | Vietnamese |
| `fr` | French | `tr` | Turkish |
| `it` | Italian | `ru` | Russian |
| `pt` | Portuguese | `zh` | Chinese (Simplified) |
| `pt-BR` | Portuguese (Brazil) | `zh-Hant` | Chinese (Traditional) |

If the video has captions in a language not listed above, enter the language code manually — the scraper will attempt to find and return it.

***

### Status Values Explained

Every result includes a `status` field so you know exactly what happened:

| Status | What It Means |
|---|---|
| `ok` | Transcript extracted successfully |
| `no_captions` | Video exists but has no caption tracks — common for music videos, very old uploads, and some regional content |
| `unplayable` | Video is private, deleted, age-restricted, or region-locked |
| `error` | Unexpected failure — the video ID was processed but something went wrong. Will be retried if you re-run with the same input. |

***

### How to Get Video IDs in Bulk

This scraper needs video IDs or URLs as input. Here are the best ways to collect them:

1. **YouTube Search Scraper** — search for keywords and collect all matching video IDs
2. **YouTube Channel Scraper** — get every video ID from a specific channel
3. **YouTube Playlist URLs** — extract IDs from playlist pages
4. **Google Sheets** — paste a column of YouTube URLs and export as a list
5. **Manual collection** — copy-paste video URLs directly from your browser

Feed the collected IDs into this scraper and get transcripts for all of them in one run.

***

### Output Formats

Results are available in all Apify-supported formats directly from the dataset:

- **JSON** — structured data, best for programmatic use and API integration
- **CSV** — flat table format, opens directly in Excel and Google Sheets
- **Excel (.xlsx)** — native spreadsheet format with proper column headers
- **XML** — structured markup for enterprise integrations
- **RSS** — feed format for monitoring and alerting workflows

***

### Integration & Automation

#### Connect to Your Workflow

Apify integrations let you automatically send transcript data to:

- **Google Sheets** — append new transcripts to a spreadsheet in real-time
- **Slack / Discord** — get notified when transcripts are ready
- **Webhooks** — trigger your own API when a run completes
- **Zapier / Make** — connect to 5,000+ apps without code
- **Amazon S3 / Google Cloud Storage** — store transcript archives in the cloud
- **BigQuery / Snowflake** — load transcripts into your data warehouse

#### API Access

Start runs programmatically via the Apify API:

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs" \
  -H "Content-Type: application/json" \
  -d '{"videoIds": ["dQw4w9WgXcQ", "jNQXAC9IVRw"]}'
```

#### Scheduling

Set up recurring runs to monitor new video transcripts daily, weekly, or at any custom interval using Apify's built-in scheduler.

***

### Frequently Asked Questions

**Can I extract transcripts from any YouTube video?**
Only from videos that have captions enabled. Most videos uploaded after 2020 have auto-generated English captions. Older videos, music-only videos, and some regional content may have no captions — these are returned with `status: no_captions` so you can filter them.

**Does this work with YouTube's auto-generated captions?**
Yes. Auto-generated captions are returned identically to manually uploaded ones. The text may be less accurate for auto-generated captions (especially for technical jargon, names, or accented speech) but is still highly usable for NLP, indexing, and content analysis.

**What happens if my requested language isn't available?**
The scraper never returns empty just because one language is missing. It falls back automatically — first to English, then to whatever language track is available. The response always tells you exactly which language was used via the `lang` and `lang_fallback` fields.

**Can I process thousands of videos in one run?**
Yes. There is no hard limit on input size. The scraper processes videos in parallel batches of 5 with automatic rate limiting. A 1,000-video run takes about 30 seconds. A 10,000-video run takes about 5 minutes.

**How do I convert the output to SRT subtitle files?**
The `segments` array contains `start` (seconds) and `dur` (duration) for each text block. Use any SRT converter library to transform these into standard subtitle format. The timing data is already in the right structure.

**What is `transcript_text` vs `segments`?**
`transcript_text` is the entire transcript joined into one plain text string — use this for NLP processing, keyword extraction, search indexing, or feeding into AI models. `segments` is the array of individual timestamped caption blocks — use this for subtitle generation, time-aligned analysis, or building video navigation.

**Does this scraper work on private or age-restricted videos?**
Private and deleted videos return `status: unplayable`. Age-restricted videos also return `unplayable` since they require authentication.

**Does the scraper handle Apify container migrations?**
Yes. Every completed video ID is saved to persistent storage every 60 seconds and on every migration event. When the run resumes on a new container, it skips already-completed videos and continues from exactly where it stopped. Zero data is lost or duplicated.

**Can I use this for AI and LLM training data?**
Yes. The output is designed for downstream AI use. `transcript_text` gives you clean text for training. `segments` gives you time-aligned data for speech models. Combine with metadata fields (title, category, keywords, description) to build richly labeled datasets.

**Is a proxy required?**
No. This scraper works without any proxy on Apify's standard infrastructure. For extremely high volumes (50,000+ videos per day), you can optionally enable residential proxy rotation in the input settings — but it is not required for normal use.

**Can I extract transcripts from YouTube Shorts?**
Yes. YouTube Shorts URLs (`youtube.com/shorts/VIDEO_ID`) are fully supported and processed identically to regular videos.

**How does this compare to the YouTube Transcript API?**
YouTube does not offer a public transcript API. The official YouTube Data API provides video metadata but not caption text. This scraper extracts the actual transcript content that YouTube displays in its transcript panel — the same text you see when you click "Show transcript" under a video.

**What if a video has captions in multiple languages?**
The scraper returns the transcript in your requested language. If you need transcripts in multiple languages for the same video, run the scraper once per language with the same video IDs and different `lang` settings.

**Can I scrape live stream transcripts?**
Live streams that have been archived and processed by YouTube (with auto-generated captions) can be scraped like any other video. Active live streams cannot be scraped.

**Why do some music videos return `no_captions`?**
Many music videos — especially official music videos from major labels — do not have caption tracks enabled on YouTube. The video contains music but YouTube's auto-caption system either doesn't generate captions for music-only content or the uploader has disabled them.

**How accurate are auto-generated captions?**
YouTube's auto-generated captions are typically 85-95% accurate for clear English speech. Accuracy drops for heavy accents, technical terminology, multiple speakers talking simultaneously, and background noise. For research requiring high accuracy, look for videos with manually uploaded captions.

**Can I filter results to only include videos that have transcripts?**
Yes. After the run completes, filter the dataset by `status: ok` to get only videos with successfully extracted transcripts. Videos without captions are still included in the output (with `status: no_captions`) so you have a complete audit trail of every video processed.

**What is the maximum number of videos I can process?**
There is no technical limit. The scraper has been tested with 10,000+ videos in a single run. For very large runs, the Apify platform handles memory management and container migration automatically.

**Does this scraper support playlists?**
Not directly. Extract video IDs from a playlist using the YouTube Channel Scraper or a playlist extractor first, then feed those IDs into this scraper.

# Actor input Schema

## `videoIds` (type: `array`):

YouTube video URLs or IDs. Accepts watch URLs, youtu.be links, shorts URLs, or plain 11-character video IDs.

## `lang` (type: `string`):

Preferred caption language. Falls back to English then first available if not found on the video.

## Actor input object example

```json
{
  "videoIds": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "lang": "en"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoIds": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesmith/youtube-transcript-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "videoIds": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapesmith/youtube-transcript-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoIds": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ]
}' |
apify call scrapesmith/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapesmith/youtube-transcript-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9cIFBbkrBCmlvXHht/builds/LfJRy0Uu0txEzeOUt/openapi.json
