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

Scrape all videos from a YouTube channel's Videos tab. Fast, lightweight, no browser needed.

- **URL**: https://apify.com/agentflow/youtube-channel-scraper.md
- **Developed by:** [Yunbin Huang](https://apify.com/agentflow) (community)
- **Categories:** Social media
- **Stats:** 59 total users, 10 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.30 / 1,000 short scrapeds

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

Scrape all videos from any YouTube channel's Videos tab. Fast, lightweight, no browser needed.

### What does YouTube Channel Scraper do?

Extract the full video list from any YouTube channel via pure HTTP — no browser, no Playwright, no Puppeteer.

- Scrape **all videos** from a channel's Videos tab with title, views, duration, and publish time
- Support **multiple channels** in one run
- Get **channel metadata** alongside video lists (channel ID, name)
- Handle all **channel URL formats** — @handle, /channel/UC..., /c/custom, /user/xxx
- **No browser needed** — runs in 128MB memory, extremely fast

### How to use YouTube channel data

- **Content analysis**: Audit a competitor's entire video catalog
- **Research**: Find all videos from a channel for transcript or comment scraping
- **Trend tracking**: Monitor new uploads from channels you follow
- **Influencer research**: Evaluate channel output volume and engagement patterns
- **Content strategy**: Analyze what topics a channel covers and how often

### What data can you extract?

| Field | Description |
|-------|-------------|
| Video ID | Unique YouTube video identifier |
| URL | Full video URL |
| Title | Video title |
| Published time | Relative publish time (e.g. "2 years ago") |
| View count | Number of views (parsed to integer) |
| Duration | Video length (e.g. "12:34") |
| Thumbnail URL | Highest-resolution thumbnail URL |
| Channel name | Name of the channel |
| Channel ID | YouTube channel ID (UCxxxxxxxxx) |

### How to scrape YouTube channel videos

1. Create a free Apify account
2. Open [YouTube Channel Scraper](https://apify.com/agentflow/youtube-channel-scraper)
3. Paste one or more YouTube channel URLs
4. Set the maximum number of videos to scrape
5. Click **Start** and download results in JSON, CSV, or Excel

### Input example

```json
{
    "urls": [
        "https://www.youtube.com/@mkbhd"
    ],
    "maxVideos": 50
}
```

### Output example

```json
{
    "channelUrl": "https://www.youtube.com/@mkbhd",
    "channelId": "UCBcRF18a7Qf58cCRy5xuWwQ",
    "channelName": "Marques Brownlee",
    "videoCount": 50,
    "videos": [
        {
            "videoId": "dQw4w9WgXcQ",
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
            "title": "The Best Smartphone of 2024",
            "publishedTime": "2 months ago",
            "viewCount": 3500000,
            "duration": "15:42",
            "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg"
        }
    ]
}
```

### Integrations — use YouTube channel data anywhere

Connect YouTube Channel Scraper to almost any app through the Apify platform. Pipe results straight into **Make**, **Zapier**, **n8n**, **Slack**, **Google Sheets**, **Google Drive**, or **Airbyte**. Trigger runs and receive results with **webhooks**, or drive everything from the **Apify API**. You can also plug this Actor into AI agents through an **MCP server** so an LLM can pull a channel's catalog on demand.

### Other YouTube scrapers you might like

Combine this Actor with the rest of the YouTube toolkit:

- ▶️ [YouTube Comments Scraper](https://apify.com/agentflow/youtube-comments-scraper) — extract comments and replies from any video
- 🎬 [YouTube Shorts Scraper](https://apify.com/agentflow/youtube-shorts-scraper) — pull every Short from a channel
- 📝 [YouTube Transcript Scraper](https://apify.com/agentflow/youtube-transcript-scraper) — grab subtitles and captions

### Error handling

When a channel cannot be scraped (invalid URL, no public videos, or a network issue), the Actor pushes an item with an `error` field instead of failing the whole run, so a single bad input never blocks the rest of your batch.

| Error | Meaning |
|-------|---------|
| `Invalid YouTube channel URL` | The input string is not a recognizable channel URL |
| `Channel not found` | The handle or channel ID does not resolve to a public channel |
| `No public videos` | The channel exists but has no videos on its Videos tab |

### FAQ

#### How many videos can I scrape?

Set `maxVideos` to 0 to scrape all videos from a channel. Channels with thousands of videos will take longer due to pagination.

#### What URL formats are supported?

All common YouTube channel URL formats work:

- `https://www.youtube.com/@mkbhd`
- `https://www.youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ`
- `https://www.youtube.com/c/mkbhd`
- `https://www.youtube.com/user/marquesbrownlee`

Tab suffixes like `/videos`, `/shorts`, `/playlists` are automatically stripped and `/videos` is appended.

#### How much does it cost?

Charged per video scraped at **$0.30 per 1,000 videos** — extremely affordable for large channel audits.

#### What if the channel has no public videos?

The result will include channel metadata but `videos` will be empty.

#### Is scraping YouTube channels legal?

Scraping publicly available data is generally legal. This Actor only accesses public channel pages that anyone can view without logging in, and does not collect private or personal data. You are responsible for how you use the extracted data — follow YouTube's Terms of Service and applicable laws such as GDPR.

#### Do I need proxies to scrape YouTube?

No. The Actor runs over plain HTTP and works out of the box without proxies for typical use. For very large jobs you can optionally attach Apify Proxy to spread requests across IPs.

#### Can I use YouTube Channel Scraper with the API?

Yes. Every Actor on Apify is fully controllable through the [Apify API](https://docs.apify.com/api/v2) — start runs, pass input, and fetch results as JSON, CSV, or Excel from your own code, with official clients for Python and JavaScript.

#### Can I use YouTube Channel Scraper through an MCP server?

Yes. You can expose this Actor to AI agents and LLMs (Claude, ChatGPT, and others) through the [Apify MCP server](https://mcp.apify.com), so an agent can fetch a channel's full video list as a tool call.

YouTube Channel Scraper · Youtube Channel Scraper · YouTube Channel Video Scraper · YouTube Channel Videos Extractor · Youtube Channel Scrapper · YouTube Channel API · Scrape YouTube Channel Videos · Export YouTube Channel Video List · YouTube Channel Crawler · YouTube Video List Scraper

# Actor input Schema

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

List of YouTube channel URLs to scrape. Supports @handle, /channel/UC..., /c/custom, and /user/xxx formats.

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

Maximum number of videos to extract per channel. Set to 0 for all videos.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/@mkbhd"
  ],
  "maxVideos": 50
}
```

# 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/@mkbhd"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agentflow/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 = { "urls": ["https://www.youtube.com/@mkbhd"] }

# Run the Actor and wait for it to finish
run = client.actor("agentflow/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 '{
  "urls": [
    "https://www.youtube.com/@mkbhd"
  ]
}' |
apify call agentflow/youtube-channel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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