# YouTube Transcript Scraper: Captions & Subtitles in Bulk (`hirethomas/youtube-transcript-scraper`) Actor

YouTube transcript scraper at $0.70 per 1,000 videos: get transcripts, captions and auto-generated subtitles with timestamps and full text for many videos at once, in any available language. Clear status for videos without captions. JSON/CSV export, no login, no API key.

- **URL**: https://apify.com/hirethomas/youtube-transcript-scraper.md
- **Developed by:** [Brindlewave Data](https://apify.com/hirethomas) (community)
- **Categories:** Videos, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Transcript Scraper (Fast, Reliable, Timestamps)

Get the transcript of any public YouTube video: the captions or auto-generated subtitles that YouTube shows to every logged-out viewer. You get the full text plus timestamped segments, in the language you want, as clean JSON, CSV or Excel.

Paste video links (or IDs) and press Start. No YouTube account, no API key, no browser.

### What you get for each video

- **Full transcript text** and **timestamped segments** (`start`, `duration`, `end`, `text`)
- **Language** of the transcript, and whether it is **auto-generated** or written by a person
- **Every caption language available** on the video (`availableLanguages`)
- Video details: title, channel name, channel ID and URL, duration, view count
- Optional (slower): publish date, category, description and keywords
- Word count, character count, segment count
- A clear **status** for videos that have no transcript, instead of a silent empty result

### Why this scraper

- **Clear status for every video.** Every video is accounted for: one row with a status, or an entry in the STATUS record. Videos without captions, private videos, deleted videos and videos without your language are reported with a status and reason, so you know exactly what happened.
- **Retries that work.** YouTube sometimes refuses requests from a server IP ("confirm you're not a bot"). The scraper keeps the proxy sessions that work, drops the ones that are refused, and retries with backoff. It never logs in and never solves CAPTCHAs.
- **Validated output.** Every transcript row is checked before it is saved (IDs, URL, language, segment timing and order, non-empty text). Broken rows are never delivered as results.
- **Fails loudly.** If no transcript at all can be fetched, or more than 20% of videos fail with errors, the run is marked as failed with the reason, instead of "succeeding" with empty data.
- **Light and fast.** Plain HTTP requests, 256 MB memory.

### Input

| Field | What it does |
|---|---|
| `videos` | Video URLs or 11-character IDs. Accepts `watch?v=`, `youtu.be/`, `/shorts/`, `/embed/`, `/live/`, mobile and music links. Duplicates are removed. |
| `languages` | Preferred transcript languages in order, e.g. `["en"]` or `["de", "en"]`. Default `["en"]`. |
| `allowAutoGenerated` | Use YouTube's auto-generated subtitles when no human-written captions exist. Default on. |
| `fallbackToAnyLanguage` | If none of your languages exist, return the video's own transcript in whatever language it has. Default on. Turn off to get status `language_not_available` instead. |
| `translateTo` | Optional target language, e.g. `es`. If the video already has captions in that language, those are used. Otherwise YouTube's built-in caption translation is requested. Best effort: YouTube sometimes rate-limits translation; then you get the original transcript and the row says so in `translationNote`. |
| `includeFullText` / `includeSegments` | Turn off the parts you don't need to keep rows small. |
| `includeExtraMetadata` | Adds publish date, category, description and keywords from the video page. One extra request per video, best effort. |
| `maxConcurrency` | Videos processed in parallel (1 to 10, default 3). |
| `maxRetries` | Retries per video when YouTube refuses a request (default 8). |
| `proxyConfiguration` | Apify Proxy is used by default. |

Example input:

```json
{
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]
}
```

### Output

One row per video. Example row (from a real run of this actor with the example input above; text, segments and languages shortened here):

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
  "durationSeconds": 213,
  "viewCount": 1824329895,
  "publishDate": null,
  "category": null,
  "isLive": false,
  "status": "ok",
  "statusReason": null,
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "isTranslated": false,
  "translatedFrom": null,
  "translationNote": null,
  "availableLanguages": [
    {
      "languageCode": "en",
      "name": "English",
      "isAutoGenerated": false
    },
    {
      "languageCode": "en",
      "name": "English (auto-generated)",
      "isAutoGenerated": true
    },
    {
      "languageCode": "de-DE",
      "name": "German (Germany)",
      "isAutoGenerated": false
    }
  ],
  "segmentCount": 61,
  "wordCount": 487,
  "characterCount": 2089,
  "transcriptEndSeconds": 211.32,
  "text": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ♪ A full commitment's what I'm thinking of ♪ ♪ You wouldn't get this from any other guy  ...",
  "segments": [
    {
      "start": 1.36,
      "duration": 1.68,
      "end": 3.04,
      "text": "[♪♪♪]"
    },
    {
      "start": 18.64,
      "duration": 3.24,
      "end": 21.88,
      "text": "♪ We're no strangers to love ♪"
    },
    {
      "start": 22.64,
      "duration": 4.32,
      "end": 26.96,
      "text": "♪ You know the rules and so do I ♪"
    }
  ],
  "captionSource": "android_player",
  "scrapedAt": "2026-10-08T02:19:06.973Z"
}

```

`publishDate` and `category` are filled only when `includeExtraMetadata` is on.

#### Status values

| status | Meaning |
|---|---|
| `ok` | Transcript returned. |
| `no_captions` | The video has no captions and no auto-generated subtitles. |
| `language_not_available` | Captions exist, but not in your languages (and fallback is off). `availableLanguages` lists what exists. |
| `login_required` | Private or age-restricted video. Not scraped (we never log in). |
| `unavailable` | Deleted, blocked or nonexistent video. |
| `error` | YouTube kept refusing requests after all retries. The reason is in `statusReason`. |

A `STATUS` record in the run's key-value store summarizes counts, failed videos, invalid inputs, requests made and blocked responses.

### Use cases

- Feed video transcripts to LLMs, RAG pipelines and summarizers
- Content research, SEO and repurposing videos into articles or posts
- Subtitles in another language, accessibility work
- Analyzing what competitors, creators or educators say

### Limits

- Only transcripts YouTube shows publicly. Private, members-only and age-restricted videos are reported, not scraped.
- Live streams that are still running usually have no transcript yet.
- Machine translation depends on YouTube and is sometimes rate-limited (see `translateTo`).
- Very long videos (several hours) work but produce large rows; turn off `includeSegments` if you only need text.

### FAQ

**Do I need a YouTube API key or account?** No.

**Is it legal?** The actor reads only captions that YouTube shows to any visitor without logging in. You are responsible for how you use the content, including copyright and YouTube's terms.

**Something broke?** Open an issue on the Issues tab with the run ID and we will look at it.

#### More questions

##### How do I get the transcript of a YouTube video without the YouTube API?

Paste the video URL or ID into `videos` and run. You get the full text plus timestamped segments. No YouTube Data API key and no Google account are needed.

##### Why does youtube-transcript-api fail with RequestBlocked on my server?

YouTube blocks most cloud provider IPs, so the Python library often breaks once you deploy it. This Actor runs on Apify infrastructure and handles that for you, so you only send video IDs and read the dataset.

##### Can I download YouTube transcripts in bulk?

Yes. Put hundreds of video URLs in one run. Each video becomes one dataset row with a clear status, so a video without captions never breaks the batch.

##### Can I use the transcripts for ChatGPT, RAG or summaries?

Yes. The `text` field is plain full text ready for an LLM, and the segments keep start times if you need citations back to the video.

##### How much does it cost?

You pay $0.70 per 1,000 transcripts returned (plus $0.00005 per run start). Videos with no transcript are reported but not charged as transcripts.

# Actor input Schema

## `videos` (type: `array`):

Video URLs or 11-character video IDs. Supported: youtube.com/watch?v=..., youtu.be/..., /shorts/..., /embed/..., /live/... Duplicates are removed.

## `languages` (type: `array`):

Language codes in order of preference (e.g. en, es, pt-BR). For each language, human-made captions are used first, then auto-generated ones.

## `allowAutoGenerated` (type: `boolean`):

Use YouTube's automatic (speech recognition) captions when no human-made captions exist in your languages.

## `fallbackToAnyLanguage` (type: `boolean`):

If none of your preferred languages exists, return the video's own caption language instead of skipping the video.

## `translateTo` (type: `string`):

Language code to translate the transcript into using YouTube's built-in caption translation (e.g. en, es, de). Best effort: YouTube sometimes rate-limits translation; then the original-language transcript is returned and the row explains why in translationNote. Leave empty for the original language.

## `includeFullText` (type: `boolean`):

Add the whole transcript as one plain-text field (handy for LLMs and summaries).

## `includeSegments` (type: `boolean`):

Add the list of caption lines with start, duration and end in seconds.

## `maxConcurrency` (type: `integer`):

How many videos to process at the same time (1-10).

## `includeExtraMetadata` (type: `boolean`):

Also read the public watch page for publish date, category, description and keywords. Best effort: if YouTube does not return them, the transcript is still delivered and these fields stay empty.

## `proxyConfiguration` (type: `object`):

Apify Proxy is recommended. If YouTube rate-limits a proxy IP, the actor waits and retries through a new proxy session.

## `maxRetries` (type: `integer`):

Retries with backoff when YouTube rate-limits or returns an empty response.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "allowAutoGenerated": true,
  "fallbackToAnyLanguage": true,
  "includeFullText": true,
  "includeSegments": true,
  "maxConcurrency": 3,
  "includeExtraMetadata": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxRetries": 8
}
```

# Actor output Schema

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

No description

## `overview` (type: `string`):

No description

## `status` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("hirethomas/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 '{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}' |
apify call hirethomas/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hirethomas/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/oX8BtWM53pfhy1klH/builds/Lau3UeZCgUkQNZjQj/openapi.json
