# YouTube Transcript Scraper (`seemuapps/youtube-transcript-scraper`) Actor

Extract full transcripts and timestamped captions from any YouTube video in your chosen language and export them as JSON or CSV.

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

## Pricing

from $0.10 / 1,000 transcript extracteds

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/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 Transcript Scraper

Pull the full transcript and timestamped captions from any YouTube video — pick your language, get clean text plus segment-level timing, and export to JSON or CSV.

### What you get

- **Full plain-text transcript** of each video as a single field, ready for search, summarisation, or LLM input
- **Timestamped segments** array with `startMs`, `durationMs`, and `text` per caption line — perfect for jumping to a moment in the video or building chapter markers
- **Language metadata** showing the language code returned and whether captions were human-written or auto-generated
- **Available languages list** so you can see every caption track the video offers, even when you only kept one
- **Per-video metadata**: `videoId`, `title`, `durationSeconds`, `uploader`
- **Multi-language preference order** — list `["en", "es", "fr"]` and the actor picks the first one that exists for each video
- **Residential proxy by default** so the request reliably returns captions; switch to Auto cascade to save proxy bandwidth

### Use cases

- **Content repurposing** — turn long videos into blog posts, newsletters, or tweet threads with timestamped quotes
- **SEO research** — analyse competitor video scripts and topics for keyword and topic gaps
- **Accessibility** — generate searchable text archives of training videos, lectures, and webinars
- **Language learning** — pull dual-language transcripts for the same video to build study material
- **Podcast and interview notes** — feed transcripts into summarisers to produce show notes and chapter markers

### How to use

1. Paste one or more YouTube URLs into **YouTube Video URLs** (`youtube.com/watch?v=...`, `youtu.be/...`, or `youtube.com/shorts/...`)
2. Set **Languages** in preference order — e.g. `en` for English-only, or `en, es, fr` to fall back through Spanish then French
3. Leave **Prefer Human-Written Captions** on to favour manual subtitles over auto-generated ones when both exist
4. Leave **Proxy Mode** on **Residential** (default) — switch to **Auto** if you want to try cheaper paths first
5. Run the actor — one transcript record per video appears in the **Dataset** tab

### Output format

Each dataset record:

```json
{
  "inputUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "videoId": "jNQXAC9IVRw",
  "title": "Me at the zoo",
  "durationSeconds": 19,
  "uploader": "jawed",
  "language": "en",
  "isAutoGenerated": false,
  "transcript": "All right, so here we are in front of the elephants...",
  "segments": [
    { "startMs": 0, "durationMs": 2400, "text": "All right, so here we are" },
    { "startMs": 2400, "durationMs": 3100, "text": "in front of the elephants" }
  ],
  "availableLanguages": ["en", "en-US", "es", "fr"],
  "proxyUsed": "residential",
  "status": "success",
  "error": null
}
````

When no caption track matches the requested languages, `status` is `"error"` and `error` is `"No captions available in requested languages"` — `availableLanguages` still lists everything the video does have so you can retry with the right code.

### Notes & limits

- **Up to 10 videos per run.** Schedule multiple runs for larger jobs.
- **Captions must exist on the video.** Some music videos and shorts have no captions at all — those return `status: "error"`.
- **Auto-generated captions** are word-level transcribed by YouTube and may include noise or incorrect punctuation. The `isAutoGenerated` flag tells you which kind you got.
- **Region-locked or private videos** will fail; try `Residential` proxy mode if Auto can't fetch them.
- **Language codes** are BCP-47, e.g. `en`, `en-US`, `es`, `fr`, `pt-BR`. If you specify `en` and only `en-US` exists, the actor will use `en-US` automatically.
- Only scrape content you have the right to use. Respect copyright and YouTube's Terms of Service.

# Actor input Schema

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

One or more YouTube video URLs (youtube.com/watch?v=..., youtu.be/..., or youtube.com/shorts/...). Up to 10 per run.

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

BCP-47 language codes in preference order, e.g. en, es, fr. The first language with available captions for a video will be used for the transcript and segments fields.

## `preferManualCaptions` (type: `boolean`):

When both manual and auto-generated captions exist for a language, use the human-written ones. Turn off to always pick whichever is available.

## `proxyMode` (type: `string`):

Residential is the default and works for most YouTube content. Auto tries no proxy first, then datacenter, then residential — useful if you want to save proxy bandwidth on videos that happen to fetch without one.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ],
  "preferManualCaptions": true,
  "proxyMode": "residential"
}
```

# Actor output Schema

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

One record per video: inputUrl, videoId, title, durationSeconds, uploader, language, isAutoGenerated, transcript, segments, availableLanguages, proxyUsed, status (success|error), error.

# 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=jNQXAC9IVRw"
    ],
    "languages": [
        "en"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("seemuapps/youtube-transcript-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=jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ]
}' |
apify call seemuapps/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcript Scraper",
        "description": "Extract full transcripts and timestamped captions from any YouTube video in your chosen language and export them as JSON or CSV.",
        "version": "1.0",
        "x-build-id": "L7CQpqFMOEgy19DLr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/seemuapps~youtube-transcript-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-seemuapps-youtube-transcript-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/seemuapps~youtube-transcript-scraper/runs": {
            "post": {
                "operationId": "runs-sync-seemuapps-youtube-transcript-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/seemuapps~youtube-transcript-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-seemuapps-youtube-transcript-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",
                "required": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "YouTube Video URLs",
                        "type": "array",
                        "description": "One or more YouTube video URLs (youtube.com/watch?v=..., youtu.be/..., or youtube.com/shorts/...). Up to 10 per run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "languages": {
                        "title": "Languages (preference order)",
                        "type": "array",
                        "description": "BCP-47 language codes in preference order, e.g. en, es, fr. The first language with available captions for a video will be used for the transcript and segments fields.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "en"
                        ]
                    },
                    "preferManualCaptions": {
                        "title": "Prefer Human-Written Captions",
                        "type": "boolean",
                        "description": "When both manual and auto-generated captions exist for a language, use the human-written ones. Turn off to always pick whichever is available.",
                        "default": true
                    },
                    "proxyMode": {
                        "title": "Proxy Mode",
                        "enum": [
                            "residential",
                            "auto",
                            "none",
                            "datacenter"
                        ],
                        "type": "string",
                        "description": "Residential is the default and works for most YouTube content. Auto tries no proxy first, then datacenter, then residential — useful if you want to save proxy bandwidth on videos that happen to fetch without one.",
                        "default": "residential"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
