# Youtube Video, Channel, Transcript (`scrappy-scraper/youtubescraper-apify`) Actor

The most efficient YouTube parser in terms of cost and performance

- **URL**: https://apify.com/scrappy-scraper/youtubescraper-apify.md
- **Developed by:** [Scrappy Scraper](https://apify.com/scrappy-scraper) (community)
- **Categories:** Videos
- **Stats:** 32 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.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/platform/actors/running/actors-in-store#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

### About this Actor

Supports urls for both `Videos` and `Channels`

Video data include transcript and video+audio urls.

Supports auto-saving results to your S3-compatible storage

The core parser code is available on [GitHub](https://github.com/Scrappy-Scraper/YoutubeScraper) and is free of any licensing restrictions.

### Input Data

```typescript
{
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "proxyUrls": [
        "http://my_user_name:my_password@proxy.provider.io:port"
    ],
    "channelConcurrency": 20,
    "videoConcurrency": 20,
    "transcriptLanguages": [ "en" ],
    "numTranscriptLanguages": 3,

    // S3 params (optional)
    "s3AccessKey": "", "s3SecretKey": "", "s3Bucket": "", "s3Region": "", "s3RootPath": ""
}
```

#### Fields

| name                   |    type    | required | description                                                         |
|------------------------|:----------:|:--------:|---------------------------------------------------------------------|
| urls                   |  string\[]  | **yes**  | YouTube urls. Can be Video or Channel                               |
| proxyUrls              |  string\[]  |    no    | Custom proxyUrls. If not provided, the actor will use Apify's proxy |
| videoConcurrency       |   number   |    no    | Max number of videos to parse at the same time                      |
| channelConcurrency     |   number   |    no    | Max number of channels to parse at the same time                    |
| transcriptLanguages    |  string\[]  |    no    | A list of language codes of preferred language                      |
| numTranscriptLanguages |   number   |    no    | Default: 3. Number of transcript languages to fetch                 |

#### S3 Fields

This actor can save the results to your S3-compatible storage. If you want to enable this feature, fill out the params below; if not, just leave all of them empty.

For security, please limit the access key so that it can only access the necessary S3 buckets; the access key should not have access to any other services.

| name               |  type   |      needed?       | description                                                                                               |
|--------------------|:-------:|:------------------:|-----------------------------------------------------------------------------------------------------------|
| s3AccessKey        | string  |        yes         | S3 Access Key Id                                                                                          |
| s3SecretKey        | string  |        yes         | S3 Secret Key                                                                                             |
| s3Bucket           | string  |        yes         | Bucket name                                                                                               |
| s3Region           | string  |        yes         | e.g: "us-east-1", "us-west-2"                                                                             |
| s3Endpoint         | string  | AWS=no; others=yes | The endpoint url. If you use AWS's S3, leave it empty                                                     |
| s3ForcePathStyle   | boolean |         no         | If you use `Min.io` S3, you might need to set this to true. If not, just leave it empty or set to `false` |
| s3RootPath         | string  |         no         | The basepath inside the bucket to store your data.                                                        |

#### proxyUrls

The format should be `http://username:password@host:port`

Variable session is supported by replacing session id with `:sessionId`.

For example:

```markdown
// Provided by Proxy provider:
http://my_user_name_sid-asdfasdf:my_password@proxy.provider.io:port
http://my_user_name_sid-qwerqwer:my_password@proxy.provider.io:port
http://my_user_name_sid-zxcvzxcv:my_password@proxy.provider.io:port

// What you put in:
http://my_user_name_sid-:sessionId:my_password@proxy.provider.io:port
```

### Output Data

#### Video

`id`, `title`, `description`, `thumbnail`,

`viewCount`, `length`(in seconds),

`transcripts`

#### Channel

`id`, `title`(channel name),

`description`, `thumbnail`,

`videos`

# Actor input Schema

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

Video or Channel URLs

## `proxyUrls` (type: `array`):

OPTIONAL. Custom Proxy Urls. Format: `http://username:password@host:port`. Look at the documentation for dynamic session id support.

## `videoConcurrency` (type: `integer`):

Number of videos to process at the same time

## `channelConcurrency` (type: `integer`):

Number of channels to process at the same time

## `transcriptLanguages` (type: `array`):

Your preferred languages for transcripts

## `numTranscriptLanguages` (type: `integer`):

How many languages to include

## `numChannelVideos` (type: `integer`):

How many video titles to include for each channel

## `s3AccessKey` (type: `string`):

S3 Access Key

## `s3SecretKey` (type: `string`):

S3 Secret Access Key

## `s3Bucket` (type: `string`):

Bucket name for the storage

## `s3Region` (type: `string`):

Example "us-east-1"

## `s3Endpoint` (type: `string`):

Please leave it empty if using AWS S3

## `s3ForcePathStyle` (type: `boolean`):

If using min.io, set this to true. Otherwise, leave it empty or set to false

## `s3RootPath` (type: `string`):

The base path in your bucket for storing files

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "videoConcurrency": 20,
  "channelConcurrency": 20,
  "transcriptLanguages": [
    "en"
  ],
  "numTranscriptLanguages": 3,
  "numChannelVideos": 10,
  "s3RootPath": ""
}
```

# 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"
    ],
    "videoConcurrency": 20,
    "channelConcurrency": 20,
    "transcriptLanguages": [
        "en"
    ],
    "numTranscriptLanguages": 3,
    "numChannelVideos": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrappy-scraper/youtubescraper-apify").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"],
    "videoConcurrency": 20,
    "channelConcurrency": 20,
    "transcriptLanguages": ["en"],
    "numTranscriptLanguages": 3,
    "numChannelVideos": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrappy-scraper/youtubescraper-apify").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"
  ],
  "videoConcurrency": 20,
  "channelConcurrency": 20,
  "transcriptLanguages": [
    "en"
  ],
  "numTranscriptLanguages": 3,
  "numChannelVideos": 10
}' |
apify call scrappy-scraper/youtubescraper-apify --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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