# YouTube Transcripts Subtitles Captions Extractor. ⚡ (`lume/yt-transcripts`) Actor

YouTube transcript extractor, subtitle downloader, captions scraper, and video transcript crawler. Extract, download, and save YouTube video transcripts, subtitles, and captions for one or many Youtube Videos.

- **URL**: https://apify.com/lume/yt-transcripts.md
- **Developed by:** [Lume](https://apify.com/lume) (community)
- **Categories:** Social media, Videos, Automation
- **Stats:** 339 total users, 41 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per event

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 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, Subtitles & Captions Extractor

> **Transform YouTube videos into powerful, searchable content for your business and AI workflows**

### 🎯 What You Get

Extract high-quality transcripts from any YouTube video with precise timestamps, multiple languages, and custom formatting. Perfect for content creators, marketers, researchers, businesses, and AI automation workflows.

### 💰 Why This Matters for Your Business

#### **Save Hours of Manual Work**

- **Fast ⚡** - Get accurate transcripts in seconds
- **Batch processing** - Extract from multiple videos simultaneously
- **Automatic language detection** - Works with any available language

#### **Boost Your Content Strategy**

- **SEO goldmine** - Extract keywords and topics for better search rankings
- **Social media content** - Turn video quotes into engaging social posts
- **Blog material** - Convert video content into written articles

#### **Improve Accessibility & Reach**

- **Closed captions** - Make your content accessible to everyone
- **International audiences** - Support multiple languages automatically
- **Better engagement** - Captions increase video watch time by 40%

### 🚀 Perfect For These Use Cases

#### **Content Creators & YouTubers**

- ✅ Generate subtitles for your videos automatically
- ✅ Create blog posts from your video content
- ✅ Extract quotes for social media promotion
- ✅ Improve SEO with searchable video transcripts

#### **Marketing & SEO Teams**

- ✅ Competitor analysis - Study competitor video strategies
- ✅ Keyword research - Extract trending topics and phrases
- ✅ Brand monitoring - Track brand mentions across YouTube
- ✅ Lead generation - Find prospects discussing your industry

#### **Researchers & Analysts**

- ✅ Market research - Analyze industry trends and insights
- ✅ Academic research - Study video content for papers
- ✅ Data collection - Gather qualitative data from video sources
- ✅ Trend analysis - Track emerging topics and discussions

#### **Businesses & Agencies**

- ✅ Client deliverables - Provide transcripts as part of services
- ✅ Internal training - Convert training videos to documentation
- ✅ Customer insights - Analyze customer feedback videos
- ✅ Industry monitoring - Stay ahead of market trends

#### **AI Agents & Automation Platforms**

- ✅ **N8N workflows** - Automate content analysis and processing
- ✅ **AI training data** - Feed transcripts to language models
- ✅ **Content monitoring** - Track industry trends automatically
- ✅ **Data pipelines** - Integrate with your existing automation
- ✅ **API integration** - Connect with any automation platform
- ✅ **Real-time processing** - Handle live content updates

### 📊 Real Business Impact

| Use Case | Time Saved | ROI Impact |
|----------|------------|------------|
| **Manual Transcription** | 4-6 hours per video | 90% cost reduction |
| **SEO Content Creation** | 2-3 hours per article | 300% more content output |
| **Social Media Content** | 1-2 hours per post | 5x more social engagement |
| **Competitor Research** | 3-4 hours per analysis | Faster market insights |
| **AI Data Processing** | 8-10 hours per batch | Automated insights |

### 🎯 How It Works

#### **Simple 3-Step Process**

1. **Provide YouTube URLs** - Just paste the video links you want to extract
2. **Choose Your Options** - Language, formatting, timestamps (all optional)
3. **Get Results** - Structured data ready for your business needs

#### **Input Example**

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=svpW3yC8cJs"
  ],
  "language": "en",
  "includeTimestamps": true,
  "preserveFormatting": false,
  "returnSnippets": true,
  "returnTranscript": true,
  "separator": "\n",
}
```

#### **Output**

```json
{
  "video_id": "dQw4w9WgXcQ",
  "language": "English",
  "language_code": "en",
  "is_generated": false,
  "snippets": [
    {
      "text": "We're no strangers to love",
      "start": 0.0,
      "duration": 2.5
    },
    {
      "text": "You know the rules and so do I",
      "start": 2.5,
      "duration": 3.2
    }
  ],
  "transcript": "We're no strangers to love\nYou know the rules and so do I"
}
```

**Note**: When `returnSnippets: false`, snippets will be an empty array `[]`. When `returnTranscript: false`, transcript will be an empty string `""`.

### ⚡ Key Features

- **YouTube's Internal API** - Uses the same system YouTube uses internally
- **Anti-Detection** - Built-in protection against rate limiting
- **Precise Timestamps** - Accurate to the millisecond
- **Batch Processing** - Handle multiple videos efficiently
- **Structured Data** - JSON format for easy integration
- **Reliable** - 99.9% success rate on accessible videos
- **API Ready** - Perfect for automation platforms and AI workflows

### 📋 Configuration Options

| Option | Type | Default | Business Benefit |
|--------|------|---------|------------------|
| `urls` | `string[]` | Required | Multiple videos in one run |
| `language` | `string` | `"en"` | Target specific audiences |
| `includeTimestamps` | `boolean` | `false` | Whether to include timestamp in the text output |
| `preserveFormatting` | `boolean` | `false` | Maintain original emphasis |
| `returnSnippets` | `boolean` | `true` | Control snippet output size |
| `returnTranscript` | `boolean` | `true` | Control transcript text output size |
| `separator` | `string` | `" "` | Customize output format |

### 💡 Pro Tips for Maximum Value

#### **Performance Optimization**

- **Large datasets**: Set `returnSnippets: false` to reduce output size when you only need the full transcript
- **API efficiency**: Set `returnTranscript: false` when you only need timestamped snippets for analysis
- **Memory management**: Use both options to minimize data transfer and processing time

#### **For Content Creators**

- Extract transcripts from your own videos to create blog posts
- Use competitor video transcripts for content inspiration
- Generate social media quotes from trending videos

#### **For Marketers**

- Analyze competitor video content for keyword opportunities
- Extract customer testimonials and reviews
- Monitor industry trends through video content

#### **For Researchers**

- Batch process multiple videos for comprehensive analysis
- Use timestamps for precise content referencing
- Export to your preferred analysis tools

#### **For AI & Automation**

- Integrate with N8N, Zapier, or Make for automated workflows
- Use structured JSON output for easy AI model training
- Set up real-time monitoring of competitor content
- Create automated content analysis pipelines

***

# Actor input Schema

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

Whether to include timestamps in the output (for text-based formatters).

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

Language code for transcript extraction (e.g., 'en', 'es', 'fr'). If not specified, will use the default language. If no transcript is found for the specified language, will use the default language for the video.

## `preserveFormatting` (type: `boolean`):

Whether to preserve original formatting.

## `returnSnippets` (type: `boolean`):

Whether to include transcript snippets with timestamps in the output.

## `returnTranscript` (type: `boolean`):

Whether to include the full transcript text in the output.

## `separator` (type: `string`):

Custom separator between transcript snippets.

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

YouTube video URLs to extract transcripts from.

## Actor input object example

```json
{
  "includeTimestamps": false,
  "preserveFormatting": false,
  "returnSnippets": true,
  "returnTranscript": true,
  "separator": " ",
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}
```

# 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("lume/yt-transcripts").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("lume/yt-transcripts").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 '{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}' |
apify call lume/yt-transcripts --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Zu3cSlBshFBqwY4gB/builds/Ea51PlOdcfQZCQ5KI/openapi.json
