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

Get YouTube channel metadata: subscriber count, video count, banner, avatar, description, tags, verified status. HTTP-only, no login.

- **URL**: https://apify.com/xtracto/youtube-channel-scraper.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.99 / 1,000 results

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

Extract public channel metadata from any YouTube channel in bulk — title, description, subscriber count, video count, banner, avatar, owner URLs, keywords, RSS feed, and canonical channel URL — in a clean structured JSON output.

### Why use this actor

- **No account / no login required** — just give it a YouTube handle, channel ID, or channel URL.
- **No API key needed** — no YouTube Data API quota; this actor returns the same data the YouTube site shows.
- **Flexible identifier** — handles (`@veritasium`), channel IDs (`UCHnyfMqiRRG1u-2MsSQLbXA`), full URLs (`https://www.youtube.com/@veritasium`), and legacy `/c/` / `/user/` paths all resolved automatically.
- **Rich detail** — title, description, avatar, banner, owner URLs, channel keywords, family-safe flag, country availability, vanity URL, and the RSS feed link in one clean record.
- **Bulk input** — pass hundreds of channels in one run; one dataset row per channel.
- **Automatic retries** — transient failures retry with exponential backoff; channels that genuinely don't exist surface as `_error: "not_found"` so you can triage failures.
- **Stable JSON output** suitable for pipelines, spreadsheets, and databases — every row carries `_input`, `_source`, `_scrapedAt` envelope fields so you can join results back to your input list.

### How it works

1. You provide a list of YouTube channels — handles, channel IDs, or URLs.
2. The actor resolves each input to its canonical channel and fetches the channel record the same way YouTube's web app does, then assembles a flat JSON record.
3. Results stream into your dataset, ready to download as JSON, CSV, or Excel.

You do not need to manage scrapers, browsers, or rotating IPs — all handled internally.

### Input

```json
{
  "channels": [
    "@veritasium",
    "@mkbhd"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["DATACENTER"]
  }
}
````

| Field | Type | Description |
|---|---|---|
| `channels` | array | List of YouTube channels to scrape. Accepts handles (`@veritasium`), channel IDs (`UCHnyfMqiRRG1u-2MsSQLbXA`), full URLs, and legacy `/c/` / `/user/` paths. |
| `proxyConfiguration` | object | Apify Proxy settings. Datacenter proxy works for most cases. |

### Output

Input: `@veritasium`

```json
{
  "_input": "@veritasium",
  "_source": "S1-primary",
  "_scrapedAt": "2026-05-18T10:43:06.849335+00:00",
  "channelId": "UCHnyfMqiRRG1u-2MsSQLbXA",
  "title": "Veritasium",
  "description": "An element of truth - videos about science, education, and anything else we find interesting.",
  "vanityChannelUrl": "http://www.youtube.com/@veritasium",
  "isFamilySafe": true,
  "availableCountryCodes": ["IQ", "TV", "ES", "PM", "CK", "MZ", "CL", "WF", "IL", "MP", "... 240 more"],
  "avatar": "https://yt3.googleusercontent.com/7vCbvtCqtjQ3YLgsJt7Y952MQV1sBvhllSCSxHP8_sVZdcPCBrITfhkN2RdyCuwPnsByq-1GoA=s900-c-k-c0x00ffffff-no-rj",
  "banner": null,
  "subscriberCountText": "",
  "videoCountText": "",
  "tags": "\"science videos\" science \"science education\" \"science literacy\" veritasium misconceptions physics education astronomy chemistry biology teaching learning math",
  "ownerUrls": [
    "http://www.youtube.com/@veritasium"
  ],
  "rssUrl": "https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA",
  "url": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA",
  "isVerified": false
}
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The channel identifier exactly as you supplied it. Use this to join results back to your input list. |
| `_source` | string | Internal tag for the path used to fetch the record. `S1-primary` means the fastest, richest path; values starting with `S2-` indicate a fallback was used. |
| `_scrapedAt` | string | ISO-8601 UTC timestamp when the record was scraped. |
| `channelId` | string | YouTube's canonical channel ID (`UC...`). Stable across handle and rename changes. |
| `title` | string | Channel display name (e.g. "Veritasium"). |
| `description` | string | Channel "About" text. Empty string if not set. |
| `vanityChannelUrl` | string | Public vanity URL (e.g. `http://www.youtube.com/@veritasium`). |
| `isFamilySafe` | boolean | `true` if the channel is marked family-safe by YouTube. |
| `availableCountryCodes` | array | ISO country codes where the channel is viewable. |
| `avatar` | string | URL of the channel profile picture (highest-res variant). |
| `banner` | string | URL of the channel banner image. `null` if no banner is set. The URL is resolution-suffixed; swap the `=w...` segment to request a different size. |
| `subscriberCountText` | string | Human-readable subscriber count (e.g. `"3.2M subscribers"`). Empty string when YouTube hides the count. |
| `videoCountText` | string | Human-readable video count (e.g. `"426 videos"`). Empty when not exposed. |
| `tags` | string | Channel keywords as a single string, as set by the channel owner. |
| `ownerUrls` | array | URLs the channel owner has linked from their page (vanity URL, external links). |
| `rssUrl` | string | RSS feed URL for the channel's uploads. |
| `url` | string | Canonical channel URL on youtube.com. |
| `isVerified` | boolean | `true` if YouTube displays the verified badge for this channel. |

#### Error envelope

Channels that don't exist or fail to fetch return a structured error instead of crashing the run:

```json
{
  "_input": "@this-channel-does-not-exist-xyz",
  "_error": "not_found",
  "_errorDetail": "channel not found",
  "_source": "S1-primary",
  "_scrapedAt": "2026-05-18T10:43:09.012345+00:00"
}
```

| `_error` value | Meaning |
|---|---|
| `not_found` | Channel was deactivated, terminated, or never existed. |
| `handle_resolve_failed` | A `@handle` could not be resolved to a channel ID. |
| `invalid_input` | The input string did not look like a handle, channel ID, or YouTube URL. |
| `fetch_failed` | Transient fetch failure after retries; safe to re-run that input. |

Filter on `_error` to triage failed rows.

### Pricing

This actor is billed per result: **$3.50 per 1,000 channels**. Each successful channel = 1 result. Errors (not-found, terminated) are not billed.

### Other Sosmed Actors

| Platform | Actor | Best for |
|---|---|---|
| YouTube | [YouTube Video Detail Scraper](https://apify.com/xtracto/youtube-video-detail-scraper) | Full metadata for any video URL or ID |
| YouTube | [YouTube Playlist Scraper](https://apify.com/xtracto/youtube-playlist-scraper) | Items + metadata for any playlist |
| Twitch | [Twitch Channel Scraper](https://apify.com/xtracto/twitch-channel) | Streamer profile, follower count, status |
| Instagram | [Instagram Account Scraper](https://apify.com/xtracto/instagram-account-scraper) | Bio, followers, post count |
| X / Twitter | [X Account Scraper](https://apify.com/xtracto/x-account-scraper) | Profile + tweet counts for any handle |
| Bluesky | [Bluesky Account Scraper](https://apify.com/xtracto/bluesky-account-scraper) | atproto profile + counters |
| Threads | [Threads Account Scraper](https://apify.com/xtracto/threads-account-scraper) | Profile data for a Threads handle |

Browse the full catalog at [apify.com/xtracto](https://apify.com/xtracto).

### Notes

- `subscriberCountText` is a **rounded** human-readable string (e.g. `"3.2M subscribers"`) — YouTube hides exact counts publicly. Parse the prefix if you need a numeric value. Channels under 1,000 subscribers, and channels that have opted to hide their counter, return an empty string.
- `videoCountText` is similarly text-based and may be empty for channels that hide their uploads tab.
- Banner URLs are resolution-suffixed; replace the `=w1060-...` segment to get the size you want. Channels with no banner return `banner: null`.
- The `channelId` (`UC...`) is the most reliable identifier — handles and vanity URLs can change, but `channelId` does not.
- Deactivated, terminated, or never-existed channels return `{"_error": "not_found", "_input": "..."}`. Handle changes are usually reflected within minutes.
- For large jobs (>500 channels), Apify Proxy is recommended to keep throughput stable.

# Actor input Schema

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

List of YouTube channels to scrape. Accepts handles (@veritasium), channel IDs (UCxxxxxxxxxxxxxxxxxxxxxxx), full channel URLs (https://www.youtube.com/@veritasium, https://www.youtube.com/channel/UC...), or legacy paths (/c/Name, /user/Name). Mix and match freely in one run.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. Datacenter proxy works for most cases; switch to Residential only if you hit rate limits on very large runs.

## Actor input object example

```json
{
  "channels": [
    "@mkbhd",
    "@veritasium"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "@mkbhd",
        "@veritasium"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/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": [
        "@mkbhd",
        "@veritasium",
    ] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Channel Scraper",
        "description": "Get YouTube channel metadata: subscriber count, video count, banner, avatar, description, tags, verified status. HTTP-only, no login.",
        "version": "1.0",
        "x-build-id": "zwluUmz3TBYGURmNp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~youtube-channel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-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/xtracto~youtube-channel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-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/xtracto~youtube-channel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-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": "YouTube channels",
                        "type": "array",
                        "description": "List of YouTube channels to scrape. Accepts handles (@veritasium), channel IDs (UCxxxxxxxxxxxxxxxxxxxxxxx), full channel URLs (https://www.youtube.com/@veritasium, https://www.youtube.com/channel/UC...), or legacy paths (/c/Name, /user/Name). Mix and match freely in one run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy settings. Datacenter proxy works for most cases; switch to Residential only if you hit rate limits on very large runs.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
