# YouTube Transcript (Transcripts + Comments) (`intelscrape/youtube-intelligence-swarm`) Actor

YouTube transcript API, YouTube transcript scraper, get YouTube transcripts, download YouTube captions, extract subtitles, YouTube comments scraper, YouTube video text extractor, YouTube API alternative, LLM training data, NLP datasets, Whisper AI transcription, scrape YouTube transcripts, captions

- **URL**: https://apify.com/intelscrape/youtube-intelligence-swarm.md
- **Developed by:** [IntelScrape](https://apify.com/intelscrape) (community)
- **Categories:** Videos, Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 video base extractions

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 & Comment API Banner](https://files.catbox.moe/gpcyqc.png)

## 🚀 YouTube Transcript & Comment API

**The Ultimate 3-in-1 YouTube Scraper Built for AI, LLM Training, & Data Engineering.**

![Status](https://img.shields.io/badge/Status-100%25%20Operational-success?style=for-the-badge) ![Speed](https://img.shields.io/badge/Concurrency-Max_Velocity-blue?style=for-the-badge) ![Pricing](https://img.shields.io/badge/Pricing-Disruptive-red?style=for-the-badge)

---

#### 🛑 Stop wasting your money on three different Apify scrapers! 

The Apify Store is currently fragmented. Competitors charge you massive premiums for an Actor that pulls Transcripts, a second Actor that pulls Comments, and a third Actor that pulls Video Metadata. On top of that, they use outdated scraping techniques that crash or rate-limit when YouTube rotates their WAF.

**We fixed all of it, and we are 10x cheaper.**

The **YouTube Transcript & Comment API** is the ultimate AI-ready data extractor. In a single run, it pulls:
1. 📝 **Full Transcript Extraction:** Instantly pulls native transcripts in any language. 
2. 🤖 **Whisper AI Fallback:** If a video lacks captions, the bot spins up a high-speed Groq Whisper AI cluster to transcribe the audio flawlessly. (Bring your own Groq API Key).
3. 💬 **Infinite Scroll Comments:** Extracts tens of thousands of comments rapidly. 
4. 📊 **Deep Video Metadata:** Extracts Views, Likes, Dislikes, Author, Channel ID, and Publish Dates.

---

### 🤯 Why is this the Ultimate YouTube Scraper?

- ⚡ **Lightning-Fast Concurrent Engine**: Processes URLs in massive batches. No browser overhead. Pure speed.
- 🛡️ **Anti-Ban Architecture**: Every request is mathematically mapped through Residential Proxies to bypass Google's datacenter blocks and 429 rate-limits.
- 💰 **Disruptive Pricing**: We charge **$0.01** for the base extraction, and fraction of a penny for the segments and comments. We are mathematically 10x cheaper than the top competitors.
- 🦾 **Indestructible Batch Processing**: If a video in your list is deleted or private, the bot gracefully logs the failure and instantly moves to the next video without charging you.

---

### 🎯 How to Experience the Magic

1. **Paste your URLs**: Drop a massive list of YouTube Video or Shorts URLs into the input array. 
2. **Set your Comment Limit**: Choose how many comments to pull (e.g., `100`, `1000`, or `0` for unlimited).
3. **(Optional) Add a Groq API Key**: If you want the scraper to use AI to transcribe uncaptioned videos, paste your free Groq API key into the input. If left blank, the scraper will just skip uncaptioned videos.
4. **Hit Start**: Sit back and watch the scraper process them concurrently. 
5. **Download**: Click the **Dataset** tab to download your flawlessly formatted JSON, CSV, or Excel file. (We formatted the comments to export cleanly into a single Excel column!)

---

### 📦 What Your Pristine JSON Output Looks Like

```json
{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "videoId": "dQw4w9WgXcQ",
  "success": true,
  "title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
  "author": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7zatY05pDIcg",
  "views": "1500000000",
  "likes": "18000000",
  "publishDate": "2009-10-25",
  "durationMinutes": 4,
  "transcriptLength": 105,
  "fullText": "We're no strangers to love. You know the rules and so do I...",
  "commentsText": "[User123] (Likes: 450): This song never gets old!\n\n[MusicLover] (Likes: 200): A true masterpiece."
}
````

***

> ⭐ **Rated 5.0★ by daily power users.** If this YouTube API saves you time and money, please take 10 seconds to [leave a 5-star review](https://console.apify.com/actors/ndwnjRvtMP1u3U8M0) — it helps other developers find it and keeps us maintaining the scraper. Thank you! 🙏

***

<div align="center">
  <h2>Ready to build a massive dataset?</h2>
  <p>Stop paying $0.42 per video. Hit <b>Start</b> and extract 1,000 complete YouTube profiles right now! 🚀</p>
</div>

# Actor input Schema

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

Paste the URLs of the YouTube videos or Shorts you want to transcribe.

## `groqApiKey` (type: `string`):

If provided, the bot will download the audio of caption-less videos and transcribe them using Groq Whisper AI. Billed directly to your Groq account.

## `maxComments` (type: `integer`):

Select maximum number of comments to extract per video (e.g., 50, 100, 200). 0 = unlimited.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 100
}
```

# Actor output Schema

## `url` (type: `string`):

Video URL

## `title` (type: `string`):

Video Title

## `transcript` (type: `string`):

Transcripts text

## `comments` (type: `string`):

Comments list

# 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("intelscrape/youtube-intelligence-swarm").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("intelscrape/youtube-intelligence-swarm").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 intelscrape/youtube-intelligence-swarm --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcript (Transcripts + Comments)",
        "description": "YouTube transcript API, YouTube transcript scraper, get YouTube transcripts, download YouTube captions, extract subtitles, YouTube comments scraper, YouTube video text extractor, YouTube API alternative, LLM training data, NLP datasets, Whisper AI transcription, scrape YouTube transcripts, captions",
        "version": "1.0",
        "x-build-id": "5RvGNqEeatZWHPrQB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/intelscrape~youtube-intelligence-swarm/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-intelscrape-youtube-intelligence-swarm",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/intelscrape~youtube-intelligence-swarm/runs": {
            "post": {
                "operationId": "runs-sync-intelscrape-youtube-intelligence-swarm",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/intelscrape~youtube-intelligence-swarm/run-sync": {
            "post": {
                "operationId": "run-sync-intelscrape-youtube-intelligence-swarm",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "YouTube Video URLs",
                        "type": "array",
                        "description": "Paste the URLs of the YouTube videos or Shorts you want to transcribe.",
                        "default": [
                            "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "groqApiKey": {
                        "title": "Groq API Key (Optional Whisper Fallback)",
                        "type": "string",
                        "description": "If provided, the bot will download the audio of caption-less videos and transcribe them using Groq Whisper AI. Billed directly to your Groq account."
                    },
                    "maxComments": {
                        "title": "Max Comments per Video",
                        "type": "integer",
                        "description": "Select maximum number of comments to extract per video (e.g., 50, 100, 200). 0 = unlimited.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
