# YouTube Channel Scraper - Videos, Shorts, Lives & Channel Stats (`mochiboo/youtube-channel-shorts-scraper`) Actor

Paste channel links or @handles and get subscribers, total views, video count, join date, country and links, plus the channel's videos, Shorts and live streams - latest, most popular or oldest first. Public pages only: no login, no cookies, no emails.

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

## Pricing

from $0.80 / 1,000 results

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/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 - every video, Short and live stream plus channel stats

Paste YouTube channel links or @handles and get one row with the channel's public stats, followed by its videos, Shorts and past live streams.

- **Channel stats in the same run.** Subscribers, total views, video count, join date, country, description, keywords, avatar and the external links the channel lists.
- **Videos, Shorts and lives, in YouTube's own order.** Set a limit per tab and choose Latest, Most popular or Oldest for the Videos and Shorts tabs. The Live tab is always newest first. A tab limit of 0 skips that tab.
- **One flat price per row.** Pay per result, at the rate shown in the pricing panel of this page, plus a very small per-run start fee. You are charged only for the results delivered. Channel rows and Shorts cost the same as video rows.

### What you get

Every row has `recordType` = `channel` (one per channel, written first) or `video`. Video rows carry `type` = `video`, `short` or `stream`.

Channel row (shortened):

```json
{"recordType":"channel","channelId":"UCBJycsmduvYEL83R_U4JriQ","channelName":"Marques Brownlee","handle":"@mkbhd","channelUrl":"https://www.youtube.com/@mkbhd","subscriberCountText":"21.4M subscribers","subscriberCountApprox":21400000,"totalViews":5796591204,"videoCount":1859,"joinedDate":"2008-03-21","country":"United States","links":[{"title":"Twitter","url":"https://twitter.com/MKBHD"}],"scrapedAt":"2026-10-19T08:19:50.534Z"}
```

Short row:

```json
{"recordType":"video","type":"short","videoId":"R6yNUnRXZ64","url":"https://www.youtube.com/shorts/R6yNUnRXZ64","title":"iPhone Duo is here","viewCountText":"8.3M views","viewCountApprox":8300000,"publishedText":null,"durationText":null,"durationSeconds":null,"thumbnailUrl":"https://i.ytimg.com/vi/R6yNUnRXZ64/hqdefault.jpg","position":1,"sortBy":"latest","channelId":"UCBJycsmduvYEL83R_U4JriQ","channelName":"Marques Brownlee","handle":"@mkbhd","scrapedAt":"2026-10-19T08:19:53.541Z"}
```

- `viewCountText` is the text YouTube shows (`5.3M views`); `viewCountApprox` is that text as a number, so it is rounded the way YouTube rounds it. It is `null` when YouTube shows no view count. A stream that is live right now has no view count, publish date or duration yet, so those three are `null` until it ends.
- `publishedText` is YouTube's relative date (`15 hours ago`, `Streamed 8 years ago`), not a calendar date. It and `durationText` / `durationSeconds` are empty for Shorts, because the Shorts tab does not show them.
- `position` counts rows in the order you asked for; `sortBy` says the order that was really applied (`latest` if the channel has too few videos for YouTube to offer a sort).
- Not included: exact view counts, publish dates, descriptions and tags of individual videos, and channel business emails (YouTube shows those only to signed-in users).

### Input

| Field | Default | What it does |
|---|---|---|
| `channels` | none (prefilled with one example) | Channel URLs (`@handle`, `/channel/UC...`, `/c/...`, `/user/...`), bare `@handles` or channel IDs. |
| `maxVideos` | `30` (max `10000`) | Videos per channel. `0` skips the Videos tab. |
| `maxShorts` | `0` (max `10000`) | Shorts per channel. `0` skips the Shorts tab. |
| `maxStreams` | `0` (max `10000`) | Past live streams per channel. `0` skips the Live tab. |
| `sortBy` | `latest` | `latest`, `popular` or `oldest` for videos and Shorts. |
| `proxyConfiguration` | Apify datacenter proxy | Proxy used for all requests. |

At least one channel is required, otherwise the run fails with a message. Inputs that are not YouTube channels, or that do not resolve, are listed in the `FAILURES` record of the run's key-value store and are not charged. A channel with no Shorts or Live tab simply returns no rows for that tab. The same channel given twice is scraped once, and a video that appears on two tabs is written once.

### Measured behaviour

Platform runs on 2026-10-19 with the default datacenter proxy and 512 MB of memory:

- `@mkbhd` + `@RickAstleyYT`, 40 videos + 20 Shorts + 5 streams each: 128 rows (2 channel rows, 80 videos, 40 Shorts, 6 streams; Rick Astley has 1 stream) in 7 seconds. `title` and `url` were filled in 100% of video rows, `viewCountApprox` in 99.2%, `durationSeconds` in 100% of regular videos.
- `@mkbhd`, `sortBy` `popular`, 5 videos: the five rows came back in descending order of views (40M, 28M, 28M, 23M, 22M).
- No request was blocked on the default proxy in any of the four test runs (0 of 4 runs).
- Peak memory was 69 MB on the small run and 93 MB on a 2,678-row run.

### Stopping early, blocks and the run summary

- The run keeps a time budget. If it is close to the run timeout (for example a very large list of channels with 10,000-row limits), it starts no new request, pushes what it has collected and ends as succeeded. The `RUN_SUMMARY` record (`complete`, `terminationReason`, `rowsPushed`) says whether the run finished or stopped early. `terminationReason` is one of `finished`, `max_results`, `charge_limit`, `time_budget`, `blocked` or `request_failed`. Checked with a 45-second timeout on four large channels: the run ended as succeeded after 36 seconds with 2,678 rows and `time_budget`.
- If YouTube answers with HTTP 403, a consent page or a sign-in page, the actor stops at once with the message `YouTube blocked the request (HTTP <status>); stopping.` and keeps the rows already written. It never retries a block and never changes proxy or headers. Run again later.
- Temporary errors (HTTP 429 and 5xx, network errors) are retried three times with 2, 4 and 8 second waits.

### Privacy

Only public, logged-out YouTube pages are read: no login, no cookies. Email addresses and phone numbers in channel descriptions, keywords, link titles, channel names and video titles are replaced with `[email redacted]` and `[phone redacted]` (best effort on the formats it recognises).

### Keywords

youtube channel scraper, youtube shorts scraper, youtube video list, channel videos, youtube statistics, subscriber count, youtube analytics, most popular videos

# Actor input Schema

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

Channel URLs (@handle, /channel/UC..., /c/, /user/), bare @handles or channel IDs.

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

How many videos to take from each channel's Videos tab. 0 skips the tab.

## `maxShorts` (type: `integer`):

How many Shorts to take from each channel's Shorts tab. 0 skips the tab.

## `maxStreams` (type: `integer`):

How many past live streams to take from each channel's Live tab (always newest first). 0 skips the tab.

## `sortBy` (type: `string`):

YouTube's own sort order for the Videos and Shorts tabs. Applies to videos and Shorts only.

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

Apify Proxy settings. The default (Apify datacenter proxy) is what this Actor was tested with.

## Actor input object example

```json
{
  "channels": [
    "https://www.youtube.com/@mkbhd"
  ],
  "maxVideos": 30,
  "maxShorts": 0,
  "maxStreams": 0,
  "sortBy": "latest",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One channel row per channel (subscribers, total views, video count, join date, country, links) followed by its video, Short and live-stream rows.

## `runSummary` (type: `string`):

What the run wrote and how it ended (the RUN_SUMMARY record in the default key-value store).

# 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/@mkbhd"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mochiboo/youtube-channel-shorts-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/@mkbhd"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mochiboo/youtube-channel-shorts-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/R74pqp6Y93DvZJdO8/builds/QTitU5HT6K6xHCkBj/openapi.json
