# Youtube Transcript Generator (`quirky_neuron/youtube-transcript-generator`) Actor

Instantly extract transcripts and subtitles from any YouTube video. Supports full URLs and Video IDs. Returns structured JSON data via a fast API integration. Perfect for AI analysis, content summarization, and SEO.

- **URL**: https://apify.com/quirky\_neuron/youtube-transcript-generator.md
- **Developed by:** [Shadow Dev](https://apify.com/quirky_neuron) (community)
- **Categories:** AI, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

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

Extract transcripts (subtitles) from any YouTube video in seconds. Just provide a video ID or full URL — the Actor returns the complete transcript with timestamps, video metadata, and multilingual support.

### What does it do?

This Actor extracts the full transcript from any YouTube video. No configuration, no API keys — just pass a video link and get structured data back.

Supported input formats:

- Full YouTube URLs (`https://www.youtube.com/watch?v=dQw4w9WgXcQ`)
- Short URLs (`https://youtu.be/dQw4w9WgXcQ`)
- Embed URLs (`https://www.youtube.com/embed/dQw4w9WgXcQ`)
- Plain video IDs (`dQw4w9WgXcQ`)

### How to use

1. Open this Actor on Apify
2. Enter a YouTube video ID or URL
3. Click **Start**
4. Get the transcript in the **Dataset** tab

#### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `videoId` | string | Yes | YouTube video ID or full URL |

**Example input:**

```json
{
    "videoId": "dQw4w9WgXcQ"
}
```

#### Output

The Actor saves results to the default dataset. Each result contains rich video metadata and transcripts in multiple formats.

##### Response structure

| Field | Type | Description |
|-------|------|-------------|
| `videoId` | `string` | Cleaned 11-character YouTube video ID |
| `originalInput` | `string` | The original input you provided (URL or ID) |
| `videoInfo` | `object` | Video metadata — title, author, thumbnails, duration, embed URL, channel ID |
| `language_code` | `array` | List of available transcript languages (code + name) |
| `transcripts` | `object` | Transcripts grouped by language, each containing up to 3 formats |

##### Video info fields

| Field | Type | Description |
|-------|------|-------------|
| `videoInfo.name` | `string` | Video title |
| `videoInfo.author` | `string` | Channel / creator name |
| `videoInfo.channel_id` | `string` | YouTube channel ID |
| `videoInfo.duration` | `string` | Video duration in seconds |
| `videoInfo.embedUrl` | `string` | Embeddable video URL |
| `videoInfo.thumbnailUrl` | `object` | Thumbnail URLs (`hqdefault`, `maxresdefault`) |
| `videoInfo.description` | `string` | Video description |
| `videoInfo.upload_date` | `string` | Upload date |
| `videoInfo.genre` | `string` | Video genre / category |

##### Transcript formats

Each language contains up to **3 transcript formats**:

| Format | Description |
|--------|-------------|
| `default` | Line-by-line subtitles with precise timestamps (each line is a separate segment) |
| `auto` | Auto-generated subtitles — same structure as `default`, useful when manual subs are unavailable |
| `custom` | Merged paragraphs — longer text blocks grouped into larger time ranges, ideal for reading or AI processing |

Every transcript segment has:

| Field | Type | Example | Description |
|-------|------|---------|-------------|
| `start` | `string` | `"00:00:19"` | Segment start time (`HH:MM:SS`) |
| `end` | `string` | `"00:00:22"` | Segment end time (`HH:MM:SS`) |
| `text` | `string` | `"We're no strangers to love"` | Subtitle text |

##### Example output (shortened)

```json
{
    "videoId": "dQw4w9WgXcQ",
    "originalInput": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "videoInfo": {
        "name": "Rick Astley - Never Gonna Give You Up (Official Video)",
        "author": "Rick Astley",
        "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
        "duration": "213",
        "embedUrl": "https://www.youtube.com/embed/dQw4w9WgXcQ",
        "thumbnailUrl": {
            "hqdefault": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
            "maxresdefault": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg"
        },
        "description": "",
        "upload_date": "",
        "genre": ""
    },
    "language_code": [
        { "code": "en", "name": "English" }
    ],
    "transcripts": {
        "en": {
            "default": [
                { "start": "00:00:19", "end": "00:00:22", "text": "We're no strangers to love" },
                { "start": "00:00:23", "end": "00:00:27", "text": "You know the rules and so do I" },
                { "start": "00:00:27", "end": "00:00:31", "text": "A full commitment's what I'm thinking of" }
            ],
            "auto": [
                { "start": "00:00:19", "end": "00:00:22", "text": "We're no strangers to love" },
                { "start": "00:00:23", "end": "00:00:27", "text": "You know the rules and so do I" }
            ],
            "custom": [
                {
                    "start": "00:00:01",
                    "end": "00:00:49",
                    "text": "We're no strangers to love. You know the rules and so do I. A full commitment's what I'm thinking of..."
                }
            ]
        }
    }
}
```

### Use cases

- **AI & LLM pipelines** — feed video transcripts into GPT, Claude, or other models for summarization, Q\&A, or analysis
- **Content research** — quickly extract what's said in a video without watching it
- **SEO & marketing** — repurpose video content into blog posts, articles, or social media
- **Accessibility** — get text versions of video content
- **Data analysis** — analyze large volumes of video content at scale
- **Education** — extract lecture transcripts for study notes or translations

### Integrations

Connect this Actor with other tools and platforms:

- **Apify API** — call the Actor programmatically from any language
- **Zapier / Make** — trigger the Actor and send results to Google Sheets, Slack, email, etc.
- **Webhooks** — get notified when a run finishes

### API usage

Call this Actor via the Apify API:

```bash
curl "https://api.apify.com/v2/acts/YOUR_USERNAME~youtube-transcript-scraper/runs" \
    -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
    -d '{"videoId": "dQw4w9WgXcQ"}'
```

### Pricing

Your first run is free. After that, usage is based on the Apify platform subscription — see [Apify pricing](https://apify.com/pricing) for details. Each run uses minimal compute resources and typically completes in under 10 seconds.

### Limitations

- Transcripts are only available for videos that have subtitles (auto-generated or manual)
- Private or age-restricted videos may not be accessible

# Actor input Schema

## `videoId` (type: `string`):

Enter the YouTube Video ID (e.g., dQw4w9WgXcQ) or the full URL.

## Actor input object example

```json
{
  "videoId": "dQw4w9WgXcQ"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "videoId": "dQw4w9WgXcQ"
};

// Run the Actor and wait for it to finish
const run = await client.actor("quirky_neuron/youtube-transcript-generator").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 = { "videoId": "dQw4w9WgXcQ" }

# Run the Actor and wait for it to finish
run = client.actor("quirky_neuron/youtube-transcript-generator").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 '{
  "videoId": "dQw4w9WgXcQ"
}' |
apify call quirky_neuron/youtube-transcript-generator --silent --output-dataset

```

## MCP server setup

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

```

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/5esyNhSo5nEL0JnfZ/builds/I7h57c5edEQSmTgEd/openapi.json
