# 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:** [Seemu Scraping](https://apify.com/seemuapps) (community)
- **Categories:** Videos, Social media, Integrations
- **Features:** Limited permissions
- **Stats:** 398 total users, 273 monthly users, 99.9% 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?

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

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
- **Smart routing by default**: tries free routes first and only falls back to residential proxy when YouTube blocks them

### 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 **Auto** (default) - it picks the fastest route that works
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": "tunnel",
  "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`):

Auto is the default: it tries the free routes first and only falls back to residential proxy when YouTube blocks them. Pick a single route only if you need to force one.

## Actor input object example

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

# 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/9zJYSbdquyuOtXsSw/openapi.json
