# Youtube Channel Statistics Scraper (`automation-lab/youtube-channel-stats-scraper`) Actor

Extract public YouTube channel profiles, subscriber counts, total views, video counts, joined dates, links, and observation timestamps.

- **URL**: https://apify.com/automation-lab/youtube-channel-stats-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media, Videos
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 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 Statistics Scraper

Collect public **YouTube channel statistics** from channel URLs, handles, or IDs.
The Actor returns one typed profile per channel with subscriber count, total views,
video count, joined date when displayed, profile links, and an `observedAt`
timestamp.

Use it for one-time creator research or schedule repeated Apify runs to build a
channel-monitoring history in your own spreadsheet, warehouse, or automation.
No YouTube API key, login, or browser is required.

### What does YouTube Channel Statistics Scraper do?

The Actor resolves these public channel identifiers:

- handles such as `@YouTube`;
- canonical channel URLs;
- channel IDs such as `UC_x5XG1OV2P6uZZ5FSM9Ttw`;
- legacy `/user/...` and `/c/...` channel URLs;
- Apify request-list URL objects in `startUrls`.

It normalizes each input to the channel's public About page, reads structured
channel data, deduplicates repeated inputs, and saves one record per channel.
It does not scrape individual videos, comments, or private YouTube Studio data.

### Who is this YouTube channel statistics tool for?

- **Creator partnership teams** comparing public channel reach.
- **Influencer researchers** enriching a known list of YouTube channels.
- **Marketing analysts** exporting channel snapshots for reporting.
- **Developers** adding public channel metadata to an application or data flow.
- **Operations teams** scheduling repeated snapshots to observe changes.

The Actor is intentionally channel-focused. It avoids the larger and more
expensive video-level output produced by all-in-one YouTube scrapers.

### Why use this Actor?

- Accept several common channel identifier formats.
- Get normalized numbers and the exact source text together.
- Keep the original input for traceability.
- Receive a timestamp suitable for scheduled comparisons.
- Export through the Apify dataset API as JSON, CSV, Excel, XML, or RSS.
- Run without managing a YouTube Data API key or quota.
- Fail clearly on malformed or unavailable channels instead of saving fake rows.

### What data can you extract?

| Field | Meaning |
| --- | --- |
| `channelId` | Stable YouTube channel identifier. |
| `channelName` | Public channel name. |
| `handle` | Public `@handle`, when available. |
| `channelUrl` | Canonical public channel URL. |
| `input` | Original handle, ID, or URL supplied by the user. |
| `description` | Public channel description, when displayed. |
| `country` | Public channel country, when displayed. |
| `subscriberCount` | Normalized subscriber count; abbreviated values are estimates. |
| `subscriberCountText` | Exact subscriber text shown by YouTube. |
| `totalViewCount` | Normalized total public view count. |
| `totalViewCountText` | Exact total-view text shown by YouTube. |
| `videoCount` | Normalized public video count. |
| `videoCountText` | Exact video-count text shown by YouTube. |
| `joinedDate` | ISO date when YouTube displays a joined date. |
| `joinedDateText` | Exact joined-date source text. |
| `links` | Public channel links with titles and resolved destinations. |
| `avatarUrl` | Public channel avatar URL. |
| `observedAt` | UTC time when the snapshot was collected. |

Nullable fields are returned as `null`, not guessed. Subscriber values such as
`46M subscribers` normalize to `46000000`, while the original text remains
available for auditability.

### How to run the Actor

1. Open the Actor in Apify Console.
2. Enter one or more channel URLs, `@handles`, or channel IDs in **Channels**.
3. Optionally add URL objects under **Channel URLs**.
4. Set **Maximum channels** to cap output.
5. Click **Start**.
6. Open the default dataset to preview or export the records.

A useful first input is:

```json
{
  "channels": [
    "@YouTube",
    "UC_x5XG1OV2P6uZZ5FSM9Ttw"
  ],
  "maxItems": 2
}
```

### Input parameters

#### `channels`

An array of strings. Every string may be a YouTube channel URL, a handle that
starts with `@`, or a canonical channel ID that starts with `UC`.

#### `startUrls`

Optional request-list sources for integrations that already produce URL
objects. Only public `youtube.com` channel URL shapes are accepted.

#### `maxItems`

Maximum unique channel records to save. The accepted range is 1–1,000 and the
default is 100. Duplicate strings are removed before this limit is applied.

### Output example

This abbreviated example reflects a real `@YouTube` local run. Counts naturally
change over time.

```json
{
  "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
  "channelName": "YouTube",
  "handle": "@YouTube",
  "channelUrl": "https://www.youtube.com/@YouTube",
  "input": "@YouTube",
  "description": "YouTube's official YouTube channel",
  "country": "United States",
  "subscriberCount": 46000000,
  "subscriberCountText": "46M subscribers",
  "totalViewCount": 1205926465,
  "totalViewCountText": "1,205,926,465 views",
  "videoCount": 1534,
  "videoCountText": "1,534 videos",
  "joinedDate": null,
  "joinedDateText": null,
  "links": [
    {
      "title": "Instagram",
      "url": "https://instagram.com/youtube"
    }
  ],
  "avatarUrl": "https://yt3.googleusercontent.com/...",
  "observedAt": "2026-08-04T02:54:06.532Z"
}
```

### How much does it cost to extract YouTube channel statistics?

This is a pay-per-event Actor. Each run has one `start` event and each saved
channel profile has one `item` event. Failed, rejected, duplicate, or empty
inputs do not produce an item charge.

The source-controlled price is a $0.014 start event plus tiered item pricing.
At the BRONZE tier, an item is $0.002256. For example:

- 1 channel: $0.016256;
- 10 channels: $0.03656;
- 100 channels: $0.2396.

Apify platform usage is included in PPE billing up to the applicable limits.
The Console pricing panel is the final source of truth for your subscription
tier and current prices.

### Schedule channel monitoring

A run is a point-in-time observation, not a hosted historical database. To
monitor channels:

1. Save a task with the stable channel list.
2. Schedule it daily, weekly, or monthly in Apify Console.
3. Send each dataset to Google Sheets, a webhook, or your warehouse.
4. Compare rows by `channelId` and sort snapshots by `observedAt`.
5. Calculate subscriber, view, or video-count deltas downstream.

This preserves transparent source observations without claiming to provide
YouTube's private historical analytics.

### Export to a spreadsheet or data pipeline

Use the dataset export menu for CSV or Excel, or connect a task run to an Apify
integration. Common workflows include:

- append snapshots to Google Sheets;
- trigger a webhook when a scheduled run finishes;
- load JSON into BigQuery, Snowflake, or PostgreSQL;
- enrich an existing creator CRM by stable `channelId`;
- compare a campaign shortlist before and after activation.

### Use the Apify API with cURL

Start a synchronous run and return dataset items:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~youtube-channel-stats-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels":["@YouTube"],"maxItems":1}'
```

Keep tokens in environment variables or a secret manager. Do not commit them to
source control.

### Use the Apify API with JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/youtube-channel-stats-scraper').call({
  channels: ['@YouTube', 'UC_x5XG1OV2P6uZZ5FSM9Ttw'],
  maxItems: 2,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Use the Apify API with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/youtube-channel-stats-scraper').call(
    run_input={'channels': ['@YouTube'], 'maxItems': 1}
)
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with MCP and AI agents

Add the Actor tool to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/youtube-channel-stats-scraper"
```

#### Claude Desktop setup

Add this server configuration to Claude Desktop:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/youtube-channel-stats-scraper"
    }
  }
}
```

#### Cursor setup

Open Cursor MCP settings and add the same `apify` server URL shown above.

#### VS Code setup

Add the same HTTP MCP server URL to your VS Code MCP configuration, then select
the YouTube Channel Statistics Scraper tool in agent mode.

Example prompts:

- “Get current public statistics for `@YouTube`.”
- “Collect snapshots for these channel IDs and return a comparison table.”
- “Export these creator channel profiles with subscribers and total views.”

### Reliability and retry behavior

The Actor uses the public channel About surface and structured page data. It
retries only transient network, HTTP 429, and temporary server failures with a
bounded delay. It does not repeatedly retry invalid URLs or missing channels.

A run fails if a requested channel cannot be resolved. This prevents a partial
success from silently hiding a malformed monitoring list. Split uncertain
inputs into separate tasks if independent failure handling is important.

### Limits and known caveats

- Only public channel-level data is supported.
- YouTube may abbreviate subscriber counts; normalized values are then estimates.
- Hidden country, joined date, description, links, or counts remain `null`.
- The Actor does not return private analytics, revenue, audience demographics,
  individual videos, comments, email addresses, or historical snapshots.
- YouTube can change its public page structure; recognizable missing data causes
  an explicit error rather than an empty record.
- A maximum of 1,000 unique channels is accepted per run.

### Responsible use and legality

This Actor collects information displayed publicly on YouTube channel pages.
You are responsible for your use case, local law, contractual obligations,
privacy rules, and YouTube's applicable terms. Do not use the output for spam,
harassment, discrimination, or attempts to infer private information.

Collect only what you need, secure exported datasets, set appropriate retention
periods, and honor valid deletion or access requests where applicable.

### Troubleshooting

#### Why did my channel input fail?

Confirm the input is a public `youtube.com` channel URL, an `@handle`, or a
canonical `UC...` channel ID. Video, playlist, Shorts, and search-result URLs
are intentionally rejected.

#### Why is `joinedDate` or `subscriberCount` null?

YouTube does not display every field for every channel. Check the paired source
text field. The Actor does not invent hidden values.

#### Why are two inputs producing one row?

Exact repeated input strings are deduplicated before collection. Use the stable
`channelId` in downstream systems to merge equivalent handle and URL forms.

#### Can it search for channels by keyword?

No. This Actor enriches channels you already know. Use
[YouTube Channel Search Scraper](https://apify.com/automation-lab/youtube-channel-search-scraper)
for keyword-based channel discovery, then pass its channel URLs here.

### FAQ

#### Does it require a YouTube API key?

No. It reads publicly displayed channel information.

#### Can I run it on a schedule?

Yes. Save an Apify Task, attach a schedule, and store or export each timestamped
snapshot for downstream comparison.

#### Does it download videos or images?

No. It returns metadata and the public avatar URL; it does not download media.

#### Can I process private or members-only analytics?

No. The Actor has no login input and does not access YouTube Studio.

#### What counts as one item?

One accepted, successfully parsed channel profile saved to the default dataset.
Duplicates and invalid inputs do not become dataset items.

### Related automation-lab Actors

- [YouTube Channel Search Scraper](https://apify.com/automation-lab/youtube-channel-search-scraper) — discover channels by keyword before enrichment.
- [YouTube Channel Scraper](https://apify.com/automation-lab/youtube-channel-scraper) — broader channel and video extraction.
- [YouTube Comments Scraper](https://apify.com/automation-lab/youtube-comments-scraper) — collect public video comments.
- [YouTube Transcript Enhanced](https://apify.com/automation-lab/youtube-transcript-enhanced) — retrieve video transcript text.

### Support

If a public channel that matches the documented input formats fails, open an
issue from the Actor page with the input shape, run ID, and non-sensitive error
message. Do not include API tokens or private customer data.

# Actor input Schema

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

YouTube channel URLs, @handles, or channel IDs. Add multiple channels for comparison or scheduled monitoring.

## `startUrls` (type: `array`):

Optional YouTube channel URLs supplied as request-list sources. Combined with Channels and deduplicated.

## `maxItems` (type: `integer`):

Maximum number of unique channel records to save.

## Actor input object example

```json
{
  "channels": [
    "@YouTube",
    "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw"
  ],
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Typed channel profiles and public statistics in the overview dataset view.

# 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",
        "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/youtube-channel-stats-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",
        "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/youtube-channel-stats-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",
    "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw"
  ],
  "maxItems": 10
}' |
apify call automation-lab/youtube-channel-stats-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/c36bUcxZCPHz56zzP/builds/NvwGVIQq4rCjtR832/openapi.json
