# YouTube Channel Scraper - All Videos, Views & Subscribers (`eliai/youtube-channel-scraper`) Actor

Scrape any YouTube channel by @handle, URL or UC id: subscriber count, description, keywords, avatar and RSS, plus every uploaded video with title, URL, duration, views and publish age. No API key, no proxy. $0.0015 per video; channel row free.

- **URL**: https://apify.com/eliai/youtube-channel-scraper.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** Videos, Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 scraped videos

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Channel Scraper — All Videos, Views & Subscribers

Scrape any YouTube channel without an API key. Give it an **@handle, a channel URL or a UC channel
id** and get back the channel's profile — **subscriber count, total video count, description,
keywords, avatar, channel id and RSS feed** — plus **every uploaded video, newest first**, with
title, watch URL, duration in seconds, view count and publish age. One row per video, with the
channel's id, handle and subscriber count repeated on every row so a CSV export needs no join.

No YouTube Data API quota, no Google Cloud project, no login, no browser.

Use it for influencer research, competitor channel tracking, building a video list to feed a
transcript or comments scraper, content audits, and finding which of a creator's uploads took off.

### Input

```json
{
  "channels": ["@mkbhd", "https://www.youtube.com/@3blue1brown", "UCYO_jab_esuFRV4b17AJtAw"],
  "maxVideosPerChannel": 50,
  "maxChannels": 20
}
```

| Field | What it does |
|---|---|
| `channels` | @handles, channel URLs (`/@name`, `/channel/UC…`, `/c/…`, `/user/…`) or bare `UC…` ids. A bare name without `@` is treated as a handle. Duplicates removed. |
| `maxVideosPerChannel` | Newest-first cap per channel (default 50, up to 2,000). This is also your cost cap: each video row is one charged result. |
| `maxChannels` | Safety cap per run (default 20, up to 100). |

Run it with no input at all and it scrapes the 50 newest videos from @3blue1brown, so you can see
the output shape before you spend anything meaningful.

### Output

**One free channel row per channel:**

```json
{
  "type": "channel",
  "channelId": "UCBJycsmduvYEL83R_U4JriQ",
  "channelTitle": "Marques Brownlee",
  "channelHandle": "@mkbhd",
  "channelUrl": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ",
  "subscriberCountText": "21.3M subscribers",
  "subscriberCount": 21300000,
  "videoCountText": "1.8K videos",
  "videoCount": 1800,
  "description": "MKBHD: Quality Tech Videos | YouTuber | Geek | ...",
  "keywords": "...",
  "avatarUrl": "https://yt3.googleusercontent.com/...",
  "rssUrl": "https://www.youtube.com/feeds/videos.xml?channel_id=UCBJycsmduvYEL83R_U4JriQ",
  "videosReturned": 50,
  "moreVideosAvailable": true
}
```

**One charged row per video:**

```json
{
  "type": "video",
  "position": 1,
  "videoId": "pOX1l1edBME",
  "title": "The Apple Watch Has a Problem",
  "url": "https://www.youtube.com/watch?v=pOX1l1edBME",
  "durationText": "15:06",
  "durationSeconds": 906,
  "viewCountText": "3.8M views",
  "viewCount": 3800000,
  "publishedText": "2 days ago",
  "isLive": false,
  "thumbnail": "https://i.ytimg.com/vi/pOX1l1edBME/hqdefault.jpg",
  "channelId": "UCBJycsmduvYEL83R_U4JriQ",
  "channelTitle": "Marques Brownlee",
  "channelHandle": "@mkbhd",
  "channelSubscriberCount": 21300000
}
```

A channel that cannot be read (wrong handle, terminated channel) comes back as a `type: "error"`
row with a plain-English reason and is **not charged**.

### Pricing

**$0.0015 per video row** (pay per event, `video-scraped`). 1,000 videos = $1.50.

- The channel profile row is **free**.
- Channels that fail, do not exist, or have no public long-form videos are **free**.
- The run stops cleanly at your spending limit rather than billing past it.

### Limits

- **Long-form uploads only.** This reads the channel's *Videos* tab. Shorts and past livestreams live
  on other tabs and are not included, which is why `videoCount` (YouTube's all-tabs total) can be
  larger than the rows you get.
- **View counts and subscriber counts are YouTube's rounded display values** ("2.1M" → 2,100,000),
  not exact figures. Publish dates are relative ("6d ago") as YouTube shows them on the channel page.
- No likes, comments or full descriptions per video — pipe the URLs into our YouTube Comments
  Scraper or YouTube Transcript actor for that.
- Uses YouTube's public web pages, so a layout change on YouTube's side can break it until we ship a
  fix. Every row says `ok: true` or carries an `error` — never a silent empty list.

### FAQ

**How do I get all videos from a YouTube channel without the API?**
Put the channel's @handle or URL in `channels` and raise `maxVideosPerChannel` to cover the channel.
The channel row tells you `moreVideosAvailable: true` if you stopped short.

**How do I get a YouTube channel's subscriber count in bulk?**
List the channels, set `maxVideosPerChannel` to 1, and read the free `channel` rows — each channel
then costs one video row ($0.0015).

**Does it work with old /user/ and /c/ URLs?** Yes, along with `/@handle` and `/channel/UC…`.

**Can I find a channel's id from its handle?** Yes — `channelId` on the channel row is the `UC…` id,
and `rssUrl` is its public RSS feed.

**Do I need proxies?** No. It runs on plain Apify datacenter IPs with no proxy cost.

### Use from code or an AI agent

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

Agents: connect [Apify MCP](https://mcp.apify.com) and call `EliAI/youtube-channel-scraper`.

- **Capability:** list a YouTube channel's profile and uploaded videos without an API key
- **Required input:** `channels` (array of handles, URLs or UC ids)
- **Returns:** one `channel` row (free) and one `video` row per upload (charged)
- **Bounded:** `maxVideosPerChannel` ≤ 2,000, `maxChannels` ≤ 100
- **Side effects:** none — read-only

### Changelog

- **2026-09-24** — First release: channel profile + newest-first uploads, handle/URL/UC-id input,
  both of YouTube's view-count display formats parsed.

# Actor input Schema

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

YouTube channels: an @handle (@mkbhd), a channel URL (https://www.youtube.com/@3blue1brown, /channel/UC..., /c/..., /user/...), or a bare channel id starting with UC. Duplicates are removed.

## `maxVideosPerChannel` (type: `integer`):

Newest-first. Stop after this many videos per channel. Each video row is one charged result, so this is also your per-channel cost cap. The channel row reports moreVideosAvailable when you stopped short.

## `maxChannels` (type: `integer`):

Safety cap on how many channels one run will process.

## Actor input object example

```json
{
  "channels": [
    "https://www.youtube.com/@3blue1brown"
  ],
  "maxVideosPerChannel": 50,
  "maxChannels": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Every item this run produced, as JSON.

## `resultsCsv` (type: `string`):

The same items as a spreadsheet-ready CSV.

# 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": [
        "https://www.youtube.com/@3blue1brown"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("eliai/youtube-channel-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": [
    "https://www.youtube.com/@3blue1brown"
  ]
}' |
apify call eliai/youtube-channel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/youtube-channel-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iRX6id4uTLbqh5XTR/builds/0WQ7nN9gBm4qexfHD/openapi.json
