# YouTube Channel Scraper (`goat255/youtube-channel-scraper`) Actor

Scrape a YouTube channel's videos with metadata without a login. Give it channel handles, URLs, or ids and get back each video's title, view count, publish time, duration, and thumbnail, plus an optional channel header row. Walks pagination up to your chosen limit.

- **URL**: https://apify.com/goat255/youtube-channel-scraper.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 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/platform/actors/running/actors-in-store#pay-per-usage

## 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 Channel Scraper

Scrape all videos from any YouTube channel and export each video's title, view count, publish time, duration, and thumbnail as clean structured data. No login, no password, and no API key required. Give it a channel handle, URL, or id and it walks pagination automatically up to the limit you set.

### What it does

- **Scrapes every video from a YouTube channel** in listing order, with title, view count (number and text), publish time, duration (seconds and label), thumbnail, and a members-only flag for each.
- **Extracts channel details** (optional). One header row per channel with name, handle, subscriber count, video count, description, and avatar.
- **Accepts any channel reference**: a handle (`@example_channel`), a channel URL, a custom URL, or a raw channel id (`UC...`). Mix and match many channels in a single run.
- **Walks pagination automatically** across as many pages as needed to reach your target video count, on channels with thousands of uploads.
- **Bulk mode**: pass dozens of channels at once and process them in parallel.
- **Clean normalized output**: counts parsed to real numbers, durations parsed to seconds, every field present on every row, ready for Sheets, Excel, JSON, or CSV.

### Use cases

- **Lead generation and creator outreach**: build lists of channels with subscriber and view metrics to find and qualify creators for sponsorships or partnerships.
- **Competitor and market research**: track a set of channels in your niche, see which videos perform, and benchmark publishing cadence and view counts.
- **Content monitoring**: watch a channel's newest uploads, durations, and view growth over time for trend and topic analysis.
- **Dataset building**: collect large structured video catalogues for analytics, machine learning, or reporting.
- **SEO and topic discovery**: mine titles and view counts across channels to find high-performing topics and formats.

### Input

| Field | Type | Description |
|---|---|---|
| `channels` | array | Channels to pull videos from. Each entry is a handle, a channel URL, a custom URL, or a raw channel id (`UC...`). Required. |
| `maxVideos` | integer | Maximum videos returned per channel. Pagination walks multiple pages until this is reached or the channel is exhausted. Default 100. |
| `includeChannelInfo` | boolean | Emit one channel header row (name, handle, subscriber count, video count, description, avatar) before each channel's videos. Default true. |
| `concurrency` | integer | How many channels to process in parallel. Default 5. |
| `proxyConfig` | object | Proxy configuration. Residential is the default and recommended option for the most reliable results. |

#### Example input

```json
{
  "channels": [
    "@example_channel",
    "https://www.youtube.com/@another_example",
    "UCexampleexampleexampl"
  ],
  "maxVideos": 200,
  "includeChannelInfo": true,
  "concurrency": 5
}
````

### Output

Each result is one row in the dataset. Video rows carry `type: "video"`; the optional channel header carries `type: "channel"`.

Sample video row:

```json
{
  "type": "video",
  "videoId": "abc123XYZ45",
  "url": "https://www.youtube.com/watch?v=abc123XYZ45",
  "channelName": "Example Channel",
  "channelId": "UCexampleexampleexampl",
  "viewCount": 459000,
  "viewCountText": "459K views",
  "durationSeconds": 414,
  "duration": "6:54",
  "title": "An example video title",
  "thumbnail": "https://example.com/thumbnail.jpg",
  "publishedText": "6 days ago",
  "membersOnly": false
}
```

Sample channel row (when `includeChannelInfo` is on):

```json
{
  "type": "channel",
  "channelId": "UCexampleexampleexampl",
  "name": "Example Channel",
  "handle": "@example_channel",
  "url": "https://www.youtube.com/@example_channel",
  "subscriberCount": 21000000,
  "subscriberCountText": "21M subscribers",
  "videoCount": 1800,
  "videoCountText": "1.8K videos",
  "description": "Example channel description.",
  "avatar": "https://example.com/avatar.jpg"
}
```

#### Key fields

- `viewCount`, `subscriberCount`, `videoCount` are parsed to real numbers from the displayed text. The original text is kept alongside in the matching `*Text` field.
- `durationSeconds` is the duration in seconds; `duration` is the human label (for example `6:54`).
- `membersOnly` is `true` for members-only videos. For these, the public view count is not shown by the source, so `viewCount` and `viewCountText` are `null`. This flag explains that null.
- Counts reflect the values at the time of scraping.

### FAQ

**Is it free? How is it priced?**
The actor runs on the standard pay-per-result model. You only pay for the rows you receive. See the pricing tab on the actor page for the current rate.

**Do I need a YouTube account, login, or API key?**
No. There is no login, no password, and no API key. Just provide channels and run.

**How many videos can I get per channel?**
Set `maxVideos` to any number up to 20000 per channel. The scraper walks pagination across multiple pages to reach your target, so you are not limited to a single page of results.

**Can I scrape multiple channels in one run?**
Yes. Put as many channels as you like in the `channels` array. Use the `concurrency` setting to control how many run in parallel.

**What input formats are accepted for a channel?**
A handle (`@example_channel`), a full channel URL, a custom URL, or a raw channel id starting with `UC`. You can mix formats freely in the same run.

**How fast is it?**
A typical channel of a few hundred videos returns in seconds. Larger requests and higher channel counts scale with `maxVideos` and `concurrency`.

**Why is `viewCount` empty for some videos?**
Those are members-only videos, where the public view count is withheld at the source. The `membersOnly` flag is set to `true` on exactly those rows so the empty value is fully explained.

### Related actors

Part of the scraper suite by goat255:

- [YouTube Comments Scraper](https://apify.com/goat255/youtube-comments-scraper) - comments from any video.
- [YouTube Transcript Scraper](https://apify.com/goat255/youtube-transcript-scraper) - transcripts and captions.

# Actor input Schema

## `channels` (type: `array`):

Channels to pull videos from. Each entry can be a handle (@example\_channel), a channel URL (https://www.youtube.com/@example\_channel), a custom URL, or a raw channel id (UC...).

## `maxVideos` (type: `integer`):

Cap on videos returned per channel. Pagination is walked across multiple pages until this is reached or the channel is exhausted.

## `includeChannelInfo` (type: `boolean`):

When on, one channel row (name, handle, subscriber and video counts, description) is emitted before each channel's videos.

## `concurrency` (type: `integer`):

How many channels to process in parallel. Higher is faster but puts more load on proxies.

## `proxyConfig` (type: `object`):

Apify proxy. RESIDENTIAL is the default and recommended option for the most reliable results.

## Actor input object example

```json
{
  "channels": [
    "@YouTube"
  ],
  "maxVideos": 100,
  "includeChannelInfo": true,
  "concurrency": 5,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "channels": [
        "@YouTube"
    ],
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("goat255/youtube-channel-scraper").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 = {
    "channels": ["@YouTube"],
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("goat255/youtube-channel-scraper").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 '{
  "channels": [
    "@YouTube"
  ],
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call goat255/youtube-channel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Channel Scraper",
        "description": "Scrape a YouTube channel's videos with metadata without a login. Give it channel handles, URLs, or ids and get back each video's title, view count, publish time, duration, and thumbnail, plus an optional channel header row. Walks pagination up to your chosen limit.",
        "version": "0.1",
        "x-build-id": "fFlWY8dZii0Lw8hrB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/goat255~youtube-channel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-goat255-youtube-channel-scraper",
                "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/goat255~youtube-channel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-goat255-youtube-channel-scraper",
                "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/goat255~youtube-channel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-goat255-youtube-channel-scraper",
                "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": [
                    "channels"
                ],
                "properties": {
                    "channels": {
                        "title": "Channels",
                        "type": "array",
                        "description": "Channels to pull videos from. Each entry can be a handle (@example_channel), a channel URL (https://www.youtube.com/@example_channel), a custom URL, or a raw channel id (UC...).",
                        "default": [
                            "@YouTube"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxVideos": {
                        "title": "Max videos per channel",
                        "minimum": 1,
                        "maximum": 20000,
                        "type": "integer",
                        "description": "Cap on videos returned per channel. Pagination is walked across multiple pages until this is reached or the channel is exhausted.",
                        "default": 100
                    },
                    "includeChannelInfo": {
                        "title": "Include channel header row",
                        "type": "boolean",
                        "description": "When on, one channel row (name, handle, subscriber and video counts, description) is emitted before each channel's videos.",
                        "default": true
                    },
                    "concurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "How many channels to process in parallel. Higher is faster but puts more load on proxies.",
                        "default": 5
                    },
                    "proxyConfig": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy. RESIDENTIAL is the default and recommended option for the most reliable results.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
