# YouTube Transcript Export (`scraptivo/youtube-transcript-export`) Actor

Collects transcripts and subtitles from YouTube video URLs. Returns timed segments, full text, language, and video metadata, including auto-generated captions.

- **URL**: https://apify.com/scraptivo/youtube-transcript-export.md
- **Developed by:** [Scraptivo](https://apify.com/scraptivo) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.70 / 1,000 transcripts

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/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 Export** collects transcripts and subtitles from YouTube videos and turns them into structured text for research, SEO, translation, and AI workflows. Provide YouTube video URLs, choose languages and caption type, run the Actor, and export timed segments, full text, language, and video metadata to JSON, CSV, Excel, or your preferred integration. Use it to index what creators say, audit caption coverage, and automate recurring transcript collection. Pricing starts at **$10.00 per 1,000 transcripts**.

### What can you automate with YouTube Transcript Export?

- **Export transcripts at scale** — Feed one or many YouTube video URLs and receive one record per video-language pair.
- **Choose languages** — Request `en`, a comma-separated list such as `en,es,fr`, or `all` available languages.
- **Include auto-generated captions** — Collect YouTube's automatic captions as well as manually uploaded subtitles.
- **Keep timestamps** — Each record includes segments with `text`, `startTime`, and `duration`.
- **Get a readable full text** — Use `fullText` when you need a single concatenated transcript for search or LLM input.
- **Attach video metadata** — Export title, channel, duration, publish date, and view count with the transcript.

### Who is this scraper for?

| Team | Workflow |
|---|---|
| Content researchers | Reading what creators say without watching every video. |
| SEO and editorial teams | Mining transcripts for topics and keywords. |
| Localization teams | Exporting subtitles in several languages for translation. |
| Data and AI teams | Building text datasets from YouTube captions. |

### What data can you collect from YouTube?

| Data group | Example fields | How it helps |
|---|---|---|
| Video identity | `videoId`, `videoUrl`, `videoTitle`, `channelName`, `channelId` | Tie the transcript back to the source video. |
| Video stats | `videoDuration`, `videoPublishedAt`, `videoViewCount` | Filter by length, date, or popularity. |
| Language | `language`, `languageName`, `transcriptType` | Know whether the caption is manual or automatic. |
| Transcript | `segments`, `fullText`, `segmentCount` | Use timed segments or a single text block. |

A transcript is available only when YouTube has manual subtitles or auto-generated captions for that video and language.

### How to use YouTube Transcript Export

1. Open the [YouTube Transcript Export](https://apify.com/scraptivo/youtube-transcript-export) on Apify.
2. Add YouTube video URLs to `videoUrls`.
3. Set `language` (`en`, `en,es`, or `all`), caption preferences, and an optional `maxItems` limit.
4. Run the Actor and wait for transcript records to appear in the dataset.
5. Export JSON, CSV, or Excel, or connect the dataset to your workflow.

```json
{
    "videoUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "maxItems": 5,
    "language": "en",
    "includeAutoGenerated": true,
    "preferAutoGenerated": false,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

### Example workflow

#### Export English transcripts for a research list

1. Put the video URLs in `videoUrls` and set `language` = `en`.
2. Keep `includeAutoGenerated` on so videos without manual captions still return text.
3. Send `fullText` into a spreadsheet or search index through a webhook.
4. Deduplicate later runs on `videoId` + `language`.

### Automate and integrate your results

- **Schedules** — Run **weekly** for a fixed research list, or trigger on demand when a new video URL is added.
- **Webhooks** — Push completed transcripts into a database, translation pipeline, or Slack channel.
- **Exports and API** — Download from the Apify Console or start a run from the API:

```shell
curl "https://api.apify.com/v2/acts/scraptivo~youtube-transcript-export/runs?token=YOUR-APIFY-TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "videoUrls": [
      "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "maxItems": 5,
    "language": "en",
    "includeAutoGenerated": true,
    "preferAutoGenerated": false,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
  }'
```

- **Deduplication** — The Actor appends results on every run. Use `videoId` + `language` as the stable key. One transcript equals one video plus one language.

### Input reference

| Field | Type | Required | Default | What it controls |
|---|---|---:|---|---|
| `videoUrls` | Array of strings | Yes | — | YouTube video URLs to export transcripts from. |
| `maxItems` | Integer | No | `10` | Maximum transcripts across all videos (`0` = unlimited). One transcript = one video + one language. |
| `language` | String | No | `en` | Comma-separated language codes, or `all` for every available language. |
| `includeAutoGenerated` | Boolean | No | `true` | Include YouTube's automatically generated captions. |
| `preferAutoGenerated` | Boolean | No | `false` | When both manual and auto captions exist for a language, prefer the auto-generated one. |
| `proxyConfiguration` | Proxy object | No | Apify proxy, RESIDENTIAL | Proxy settings. Enable residential proxies if a run is throttled. |

#### What language codes are accepted?

Use ISO language codes such as `en`, `es`, `fr`, or `zh-Hans`. Separate several codes with commas. Set `language` to `all` to export every caption track YouTube exposes for those videos.

### Output example

Each dataset item is one transcript:

```json
{
    "videoId": "jNQXAC9IVRw",
    "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "videoTitle": "Me at the zoo",
    "channelName": "jawed",
    "channelId": "UC4QobU6STFB0P71PMvOGN5A",
    "videoDuration": 19,
    "videoPublishedAt": "2005-04-24",
    "videoViewCount": 403264098,
    "language": "en",
    "languageName": "English",
    "transcriptType": "manual",
    "segments": [
        {
            "text": "All right, so here we are, in front of the elephants",
            "startTime": 1.2,
            "duration": 2.16
        }
    ],
    "fullText": "All right, so here we are, in front of the elephants ...",
    "segmentCount": 6
}
```

### How much does it cost to scrape YouTube transcripts?

The Actor uses pay-per-event pricing plus a small Actor-start event ($0.00005 per start, scaled by memory):

- **$10.00 / 1,000 transcripts** — one `dataset-item` event per transcript saved to the default dataset.

A 10-transcript run costs about **$0.10**; 100 transcripts cost **$1.00**; 1,000 transcripts cost **$10.00**. Volume discounts on Apify paid plans reduce the per-1,000 rate (for example **$9.70 per 1,000** at the Gold plan). Requesting two languages for one video counts as two transcripts. Compute units consumed are deducted from your Apify plan.

### Reliability and responsible use

- **Proxy recommendation** — The default input uses Apify residential proxies. If a run returns empty results, enable or confirm residential proxies; some videos are also region-restricted or have no captions.
- **Missing transcripts** — YouTube only provides text when manual subtitles or auto captions exist. Very new videos may have neither.
- **Public captions** — The Actor collects publicly available transcript and subtitle tracks from the video URLs you provide.
- **Responsible use** — Only use the data in ways that comply with YouTube's terms and applicable law.

### Frequently asked questions

#### Can I export a YouTube transcript from a video URL?

Yes. `videoUrls` is required. Paste standard watch URLs such as `https://www.youtube.com/watch?v=jNQXAC9IVRw`.

#### Can I schedule YouTube Transcript Export to run automatically?

Yes. Use the **Scheduler** tab in Apify Console, or start runs from the API when a new video URL is added.

#### What counts as one result?

One transcript is one video plus one language. English and Spanish from the same video count as two results. Manual and auto captions for the same language are not both returned as two records; the Actor keeps one track per language based on your caption preferences.

#### Why did a video return no transcript?

The creator may have no captions, auto-generation may not have finished, or the video may be restricted. Enable `includeAutoGenerated` and confirm the proxy if other videos in the same run succeed.

#### How do I avoid duplicate records?

The Actor does not deduplicate across runs. Merge on `videoId` + `language`. Use `maxItems` to cap a run.

#### Do I need a proxy?

Residential proxies are the default and are recommended when YouTube throttles requests. Some videos also require a matching region.

### Related Scraptivo automations

- [YouTube Channel Scraper](https://apify.com/scraptivo/youtube-channel-scraper) — channel and video metadata from YouTube.
- [YouTube Comment Scraper](https://apify.com/scraptivo/youtube-comment-scraper) — comments from YouTube videos.
- [TikTok Profile Scraper](https://apify.com/scraptivo/tiktok-profile-scraper) — profile and video metadata from TikTok.

### Support and custom workflows

Need a different field, source, or delivery workflow? Contact Scraptivo at scraptivo@gmail.com. Include the Actor name, sample URL, required fields, and expected volume so we can assess the request.

# Actor input Schema

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

YouTube video URLs to extract transcripts from

## `maxItems` (type: `integer`):

Maximum number of transcripts to extract across all videos (0 = unlimited, one transcript = one video + one language)

## `language` (type: `string`):

Language codes for subtitles, comma-separated (e.g., 'en,es,fr'). Use 'all' for all available languages.

## `includeAutoGenerated` (type: `boolean`):

Include YouTube's automatically generated captions in addition to manually uploaded subtitles

## `preferAutoGenerated` (type: `boolean`):

If both manual and auto-generated subtitles exist for the same language, prefer the auto-generated ones

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

Proxy settings for anti-bot protection

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "maxItems": 5,
  "language": "en",
  "includeAutoGenerated": true,
  "preferAutoGenerated": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `transcripts` (type: `string`):

Dataset containing exported YouTube transcripts

## `runStats` (type: `string`):

Aggregate statistics for the export run

# 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"
    ],
    "maxItems": 5,
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraptivo/youtube-transcript-export").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"],
    "maxItems": 5,
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scraptivo/youtube-transcript-export").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"
  ],
  "maxItems": 5,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scraptivo/youtube-transcript-export --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scraptivo/youtube-transcript-export"
        }
    }
}

```

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/gLczHzcBSGjDxbITk/builds/mNCczZaBH79Ut3u9N/openapi.json
