# 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:** 16 total users, 5 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

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

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.

### Related YouTube actors

Part of a complete YouTube toolkit - explore the rest of the suite:

- [YouTube Channel Videos Scraper](https://apify.com/seemuapps/youtube-channel-videos-scraper) - List every video on a channel with metadata
- [YouTube Video Metadata Scraper](https://apify.com/seemuapps/youtube-video-metadata-scraper) - Bulk video metadata - views, tags, chapters, more
- [YouTube Comment Insights](https://apify.com/seemuapps/youtube-comment-insights) - Sentiment, keywords, and topics from comments
- [YouTube Channel Growth Analyzer](https://apify.com/seemuapps/youtube-channel-growth-analyzer) - Growth metrics, cadence, and best posting time
- [YouTube Similar Channels Finder](https://apify.com/seemuapps/youtube-similar-channels-finder) - Find similar and competitor channels
- [YouTube Sponsorship & Brand Deal Tracker](https://apify.com/seemuapps/youtube-sponsorship-tracker) - Extract sponsors, brand deals, and promo codes
- [YouTube Creator Contact Finder](https://apify.com/seemuapps/youtube-creator-contact-finder) - Find a creator's email and social links
- [YouTube Email Scraper](https://apify.com/seemuapps/youtube-email-scraper) - Bulk-extract contact emails from channels
- [YouTube Thumbnail Downloader](https://apify.com/seemuapps/youtube-thumbnail-downloader) - Download video thumbnails in every size
- [YouTube Video Downloader](https://apify.com/seemuapps/youtube-video-downloader) - Download videos as MP4 up to 1440p
- [YouTube to MP3 Converter](https://apify.com/seemuapps/youtube-to-mp3) - Convert videos to MP3 audio (128-320 kbps)
- [YouTube MCP Server](https://apify.com/seemuapps/youtube-mcp) - All YouTube tools for AI agents via MCP

# 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,seemuapps/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/wzz7fjSMKTZCczsvs/builds/csqc2NYW9tIMk2CRp/openapi.json
