# YouTube Transcript Extractor (`optimus-fulcria/youtube-transcript-extractor`) Actor

Extract transcripts from YouTube videos in bulk. Supports channels, playlists, multiple languages. AI/RAG optimized.

- **URL**: https://apify.com/optimus-fulcria/youtube-transcript-extractor.md
- **Developed by:** [Fulcria Labs](https://apify.com/optimus-fulcria) (community)
- **Categories:** AI
- **Features:** Limited permissions
- **Stats:** 201 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

Extracts transcripts and captions from YouTube videos in bulk. Outputs clean, structured text optimized for AI/RAG pipelines, content analysis, translation, and research.

### What it does

Takes YouTube video URLs (or channel/playlist URLs), extracts available transcripts and captions, and outputs structured text with timestamps. Supports multiple languages and automatic/manual caption types.

### Key Features

- **Bulk extraction** - Process hundreds of videos in one run
- **Multi-language support** - Extract transcripts in any available language
- **Channel/Playlist support** - Automatically discover videos from channels and playlists
- **AI-ready output** - Clean text format optimized for RAG, embeddings, and LLMs
- **Timestamp preservation** - Keep or remove timestamps based on your needs
- **Chunking options** - Split transcripts into configurable chunks for embedding pipelines

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `urls` | string\[] | *required* | YouTube video, channel, or playlist URLs |
| `languages` | string\[] | `["en"]` | Preferred transcript languages (ISO 639-1 codes) |
| `includeAutoGenerated` | boolean | `true` | Include auto-generated captions |
| `includeTimestamps` | boolean | `true` | Include start/duration timestamps |
| `chunkSize` | integer | `0` | Split transcript into chunks of N characters (0 = no chunking) |
| `chunkOverlap` | integer | `200` | Overlap between chunks in characters |
| `outputFormat` | string | `"structured"` | Output format: "structured", "plain_text", "srt", "vtt" |
| `maxVideosPerChannel` | integer | `50` | Max videos to process per channel/playlist |
| `proxyConfiguration` | object | `{}` | Apify proxy settings |

### Output

Each video produces a dataset item:

```json
{
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Video Title",
  "channelName": "Channel Name",
  "language": "en",
  "isAutoGenerated": false,
  "availableLanguages": ["en", "es", "fr"],
  "transcript": [
    {
      "text": "Hello and welcome",
      "start": 0.0,
      "duration": 2.5
    }
  ],
  "fullText": "Hello and welcome to this video...",
  "wordCount": 1523,
  "duration": 612.5,
  "chunks": [
    {
      "index": 0,
      "text": "Hello and welcome to this video...",
      "startTime": 0.0,
      "endTime": 45.2
    }
  ],
  "extractedAt": "2026-02-23T07:00:00Z"
}
```

### Use Cases

- **RAG Knowledge Bases** - Build searchable knowledge bases from educational YouTube channels
- **Content Research** - Analyze competitor content, extract key topics
- **Translation** - Extract source text for translation workflows
- **SEO Analysis** - Analyze video content for keyword research
- **Podcast Transcription** - Many podcasts are uploaded to YouTube with captions
- **Training Data** - Collect text data for fine-tuning language models
- **Accessibility** - Generate text versions of video content

### Pricing

Pay per result:

- **$0.15 per 1,000 videos** processed
- Free tier: 100 videos/month

### Example Usage

#### Extract transcripts from specific videos

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=VIDEO_ID_1",
    "https://www.youtube.com/watch?v=VIDEO_ID_2"
  ],
  "languages": ["en"],
  "outputFormat": "structured"
}
```

#### Extract from a channel with chunking for RAG

```json
{
  "urls": ["https://www.youtube.com/@ChannelName"],
  "languages": ["en"],
  "chunkSize": 1000,
  "chunkOverlap": 200,
  "maxVideosPerChannel": 100,
  "outputFormat": "structured"
}
```

#### Get plain text transcripts in multiple languages

```json
{
  "urls": ["https://www.youtube.com/playlist?list=PLAYLIST_ID"],
  "languages": ["en", "es", "fr"],
  "includeTimestamps": false,
  "outputFormat": "plain_text"
}
```

# Actor input Schema

## `urls` (type: `array`):

List of YouTube video, channel, or playlist URLs to extract transcripts from.

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

Preferred transcript languages in order of priority (ISO 639-1 codes). Falls back to any available language.

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

Include YouTube's auto-generated captions when manual transcripts aren't available.

## `includeTimestamps` (type: `boolean`):

Include start time and duration for each transcript segment.

## `chunkSize` (type: `integer`):

Split transcripts into chunks of this size for embedding/RAG pipelines. Set to 0 to disable chunking.

## `chunkOverlap` (type: `integer`):

Number of overlapping characters between consecutive chunks.

## `outputFormat` (type: `string`):

Format for transcript output.

## `maxVideosPerChannel` (type: `integer`):

Maximum number of videos to process from a single channel or playlist.

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

Apify proxy configuration for avoiding rate limits.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "includeAutoGenerated": true,
  "includeTimestamps": true,
  "chunkSize": 0,
  "chunkOverlap": 200,
  "outputFormat": "structured",
  "maxVideosPerChannel": 50
}
```

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

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

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

```

## MCP server setup

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

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/qFdm8PZJQnmBl87CK/builds/n1sOLm0NUSqZmmn1w/openapi.json
