# YouTube Transcripts & Captions Scraper (Subtitles at Scale) (`thirdwatch/youtube-transcripts-scraper`) Actor

Extract transcripts and captions from YouTube videos at scale. Returns full text, per-segment timing, and all available languages (manual + auto-generated). For RAG, sentiment analysis, video summarization, and agent workflows. No API key.

- **URL**: https://apify.com/thirdwatch/youtube-transcripts-scraper.md
- **Developed by:** [Thirdwatch](https://apify.com/thirdwatch) (community)
- **Categories:** AI, Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Transcripts & Captions Scraper (Subtitles at Scale)

> Pull transcripts from any YouTube video — full text plus timestamps, every language track, no API key.

Pull **transcripts and closed captions** from any YouTube video, at scale, with no API key. Returns the full transcript text plus timestamped segments, all available caption languages, and whether the captions are **human-written or auto-generated**.

Built for **RAG pipelines over video libraries**, **sentiment analysis**, **video summarization**, **accessibility workflows**, and **agentic tools** that read video content.

### What you get

A clean, structured transcript record per video. Choose a preferred language or let the actor fall back to whatever's available. Returns both the full joined `transcript_text` (ideal for vector stores) and a `segments` array with per-line timestamps (ideal for subtitle overlays and chapter generation).

### Output fields

| Field | Description |
|-------|-------------|
| `video_id` | 11-character YouTube video ID |
| `video_url` | Canonical watch URL |
| `language_code` | Actual caption language returned (ISO 639-1) |
| `language_name` | Human-readable language name |
| `is_auto_generated` | `true` if auto-captions, `false` if human-written |
| `auto_translated` | `true` if auto-translated into the requested language |
| `available_languages` | Array of `{code, name, is_auto_generated}` for every track on the video |
| `transcript_text` | Full transcript joined into one string |
| `segments` | Array of `{text, start, duration}` per caption line |
| `segment_count` | Number of caption lines |
| `total_duration_seconds` | Total covered duration |
| `data_source` | Origin tag |
| `error` | Error code if captions were not retrievable (see below) |

Possible `error` values: `no_captions_available`, `private_video`, `region_locked`, `age_restricted_or_login_required`, `video_unavailable`, `watch_page_unreachable`, `no_player_response`, `transcript_fetch_failed`, `empty_transcript`.

### Example output

```json
{
    "video_id": "dQw4w9WgXcQ",
    "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "language_code": "en",
    "language_name": "English",
    "is_auto_generated": false,
    "auto_translated": false,
    "available_languages": [
        {"code": "en", "name": "English", "is_auto_generated": false},
        {"code": "es", "name": "Spanish", "is_auto_generated": false},
        {"code": "en", "name": "English (auto-generated)", "is_auto_generated": true}
    ],
    "transcript_text": "We're no strangers to love You know the rules and so do I ...",
    "segment_count": 58,
    "total_duration_seconds": 212.48,
    "segments": [
        {"text": "We're no strangers to love", "start": 18.8, "duration": 7.0},
        {"text": "You know the rules and so do I", "start": 25.8, "duration": 3.5},
        {"text": "A full commitment's what I'm thinking of", "start": 29.3, "duration": 3.7}
    ],
    "data_source": "youtube_timedtext"
}
````

#### Example error record (no captions published)

```json
{
    "video_id": "abc123XYZ_0",
    "video_url": "https://www.youtube.com/watch?v=abc123XYZ_0",
    "error": "no_captions_available",
    "available_languages": [],
    "data_source": "youtube_timedtext"
}
```

### Input parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `videoUrls` | One of | YouTube URLs. Supports `watch?v=`, `youtu.be/`, `shorts/`, `embed/`. |
| `videoIds` | One of | Raw 11-character video IDs. Either `videoUrls` or `videoIds` must be provided. |
| `languageCode` | No | Preferred caption language. Default `en`. |
| `preferManual` | No | Prefer human-written captions over auto-generated. Default `true`. |
| `includeTimestamps` | No | Include the `segments` array. Default `true`. Turn off for smaller RAG payloads. |
| `includeAutoTranslate` | No | Fall back to YouTube auto-translate if the requested language isn't available. Default `false`. |
| `useResidentialProxy` | No | Route through a residential proxy for more reliable access. Default `true`. |
| `maxResults` | No | Cap on transcripts returned. Default 5, max 10000. |

### Use cases

- **AI engineers (RAG)**: index thousands of talks, lectures, tutorials for semantic search. `transcript_text` drops straight into your vector store.
- **Content marketers**: generate written blog posts, newsletters, and social clips from podcast and YouTube content at scale.
- **Product & research teams**: run sentiment analysis across competitor channels and track topic drift over time.
- **Accessibility & compliance**: build closed-caption corpora in bulk for ADA / WCAG compliance.
- **Agent builders**: plug into Claude / GPT / MCP workflows so an agent can "read" a YouTube URL.
- **Language learners & translators**: grab multilingual caption tracks side-by-side for study material.
- **Video summarization tools**: feed full transcripts into an LLM to generate chapter markers, key takeaways, and tl;drs.

### Limitations

- **Not all videos have transcripts** — some uploaders disable captions entirely. You'll get a `no_captions_available` error for these (comedy clips, silent videos, very new uploads).
- **Auto-generated transcripts are lower quality** — especially for music, accents, and technical content. Set `preferManual: true` (default) to pick human-written tracks whenever available.
- **Age-restricted and private videos are blocked** — they return structured `error` records (`age_restricted_or_login_required`, `private_video`) rather than transcripts. Region-locked videos behave the same way.
- YouTube occasionally throttles heavy uninterrupted runs; the actor backs off automatically on rate limits.

### Compared to alternatives

- **Apify's pintostudio/youtube-transcript-scraper** — similar scope, slightly higher per-result price on BRONZE, no structured error codes for failed videos.
- **youtube-transcript-api (Python library)** — free to run yourself, but you handle the proxy, consent cookie, and retry logic. This actor is a hosted drop-in with built-in reliability.
- **Official YouTube Data API** — captions endpoint requires OAuth and channel ownership; not usable for third-party videos.

### Pairs well with

- [YouTube Scraper](https://apify.com/thirdwatch/youtube-scraper) — pull video metadata (title, description, views, likes, channel) first, then feed the IDs here for transcripts.
- [Google News Scraper](https://apify.com/thirdwatch/google-news-scraper) — enrich news-video transcripts with source articles.
- [Reddit Scraper](https://apify.com/thirdwatch/reddit-scraper) — cross-reference discussion threads with the video's transcript.

### FAQ

**Does this work on YouTube Shorts?**
Yes — `youtube.com/shorts/{id}` URLs work identically to regular videos.

**Do I need an API key?**
No. The actor uses YouTube's public caption endpoints — no OAuth, no Google Cloud project.

**Can I get transcripts for private videos?**
No. Private videos return a `private_video` error. Only publicly published videos are supported.

**Which languages are supported?**
Every language a video has published captions for. Use `languageCode` to pick your preferred track, or enable `includeAutoTranslate` to cross-translate.

**What happens if captions are disabled?**
You get a structured `error: "no_captions_available"` record with the video ID. Your pipeline can filter, retry, or skip cleanly.

**Can I feed this straight into a vector DB?**
Yes — the `transcript_text` field is a single joined string designed for RAG ingestion. Turn off `includeTimestamps` to drop the `segments` array and shrink payloads further.

***

Built by [Thirdwatch](https://thirdwatch.dev). Questions? Open an issue or reach out on the Apify Store listing.

Last verified: 2026-05

# Actor input Schema

## `videoUrls` (type: `array`):

List of YouTube video URLs. Supports youtube.com/watch?v=..., youtu.be/..., youtube.com/shorts/..., and youtube.com/embed/... formats.

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

Alternative: pass raw 11-character YouTube video IDs directly. Either videoUrls or videoIds must be provided.

## `languageCode` (type: `string`):

Preferred caption language (ISO 639-1, e.g. 'en', 'es', 'fr', 'de', 'ja'). Falls back to the first available track if this language is not published for the video.

## `preferManual` (type: `boolean`):

Prefer human-written captions over auto-generated captions when both exist. Manual captions are more accurate.

## `includeTimestamps` (type: `boolean`):

Include the segments array with per-line text, start time, and duration. Turn off to return only the joined transcript text (smaller output, ideal for RAG ingestion).

## `includeAutoTranslate` (type: `boolean`):

If the preferred language is not directly available, try YouTube's auto-translate from another available track. May reduce accuracy.

## `useResidentialProxy` (type: `boolean`):

Route requests through a residential proxy. Recommended on — improves reliability for region-locked and login-required videos.

## `maxResults` (type: `integer`):

Maximum number of transcripts to return. Start small; raise once you've verified the output.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "videoIds": [],
  "languageCode": "en",
  "preferManual": true,
  "includeTimestamps": true,
  "includeAutoTranslate": false,
  "useResidentialProxy": true,
  "maxResults": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("thirdwatch/youtube-transcripts-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 = {
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxResults": 5,
}

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

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

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

```

## CLI example

```bash
echo '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxResults": 5
}' |
apify call thirdwatch/youtube-transcripts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=thirdwatch/youtube-transcripts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcripts & Captions Scraper (Subtitles at Scale)",
        "description": "Extract transcripts and captions from YouTube videos at scale. Returns full text, per-segment timing, and all available languages (manual + auto-generated). For RAG, sentiment analysis, video summarization, and agent workflows. No API key.",
        "version": "0.1",
        "x-build-id": "2A7pdhZ57SiO8kB5K"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/thirdwatch~youtube-transcripts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-thirdwatch-youtube-transcripts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/thirdwatch~youtube-transcripts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-thirdwatch-youtube-transcripts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/thirdwatch~youtube-transcripts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-thirdwatch-youtube-transcripts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "List of YouTube video URLs. Supports youtube.com/watch?v=..., youtu.be/..., youtube.com/shorts/..., and youtube.com/embed/... formats.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoIds": {
                        "title": "Video IDs",
                        "type": "array",
                        "description": "Alternative: pass raw 11-character YouTube video IDs directly. Either videoUrls or videoIds must be provided.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "languageCode": {
                        "title": "Preferred Language Code",
                        "type": "string",
                        "description": "Preferred caption language (ISO 639-1, e.g. 'en', 'es', 'fr', 'de', 'ja'). Falls back to the first available track if this language is not published for the video.",
                        "default": "en"
                    },
                    "preferManual": {
                        "title": "Prefer Manual Captions",
                        "type": "boolean",
                        "description": "Prefer human-written captions over auto-generated captions when both exist. Manual captions are more accurate.",
                        "default": true
                    },
                    "includeTimestamps": {
                        "title": "Include Timestamped Segments",
                        "type": "boolean",
                        "description": "Include the segments array with per-line text, start time, and duration. Turn off to return only the joined transcript text (smaller output, ideal for RAG ingestion).",
                        "default": true
                    },
                    "includeAutoTranslate": {
                        "title": "Include Auto-Translate Fallback",
                        "type": "boolean",
                        "description": "If the preferred language is not directly available, try YouTube's auto-translate from another available track. May reduce accuracy.",
                        "default": false
                    },
                    "useResidentialProxy": {
                        "title": "Use Residential Proxy",
                        "type": "boolean",
                        "description": "Route requests through a residential proxy. Recommended on — improves reliability for region-locked and login-required videos.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of transcripts to return. Start small; raise once you've verified the output.",
                        "default": 5
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
