# YouTube Channel Scraper (`vakitek/youtube-channel-videos`) Actor

Get every video, Short and stream of any YouTube channel, plus channel stats: subscribers, total views, links, country. 0.80 USD per 1,000 videos, no minimum charge per run.

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

## Pricing

from $0.80 / 1,000 video 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

Give it YouTube channels, get back their videos with views, durations and publish dates, plus the channel's own stats: subscribers, total views, video count, country, links. You get one row per video, with the channel info attached to each row.

Need only the channel stats? Set the video count to 0 and you get one row per channel.

### What people use it for

- **Competitor and creator tracking.** Pull the latest videos of 50 channels every week and see what's getting views.
- **Influencer research.** Compare subscriber counts, posting frequency and average views before you pick who to work with.
- **Content analysis.** Get a channel's full back catalogue, sorted by most popular, to see which topics work.
- **Building a channel database.** Run thousands of channels with `0` videos and get one clean row of stats each.

### How to use it

1. Add channels in **Channel URLs / handles / ids**, one per line: `@mkbhd`, `https://www.youtube.com/@veritasium` or a `UC...` id.
2. Set how many items you want per channel: **Max videos** (default 50), **Max Shorts** and **Max streams** (both off by default).
3. Optional: **Sort videos by** newest, most popular or oldest, and an **Oldest post date** to stop at a date (`2026-01-01` or `30 days`).
4. Click **Start**. Export as JSON, CSV or Excel, or pull the results through the API.

```json
{
  "startUrls": ["@mkbhd", "https://www.youtube.com/@veritasium"],
  "maxResults": 50,
  "sortVideosBy": "POPULAR"
}
```

### What you get

```json
{
  "id": "DkUuOr21v4s",
  "title": "Xiaomi 18 Pro Max: They've Done It Again!",
  "url": "https://www.youtube.com/watch?v=DkUuOr21v4s",
  "viewCount": 4400000,
  "duration": "11:56",
  "durationSeconds": 716,
  "publishedAt": "2026-09-23T09:00:00.000Z",
  "type": "video",
  "thumbnailUrl": "https://i.ytimg.com/vi/DkUuOr21v4s/hq720.jpg",
  "channelName": "Marques Brownlee",
  "aboutChannelInfo": {
    "numberOfSubscribers": 21300000,
    "channelTotalViews": 5690904427,
    "channelTotalVideos": 1853,
    "channelLocation": "United States",
    "channelJoinedDate": "2008-03-21T00:00:00.000Z",
    "channelDescriptionLinks": [{ "text": "Twitter", "url": "https://twitter.com/MKBHD" }],
    "isChannelVerified": true
  }
}
```

- Every video, Short or stream comes with views, duration, thumbnail and publish date.
- `aboutChannelInfo` carries the channel's stats, description, links, avatar and banner, so you don't need a second actor for them.
- Turn on **Include video details** to also get likes, comment count, full description and the exact publish date of each video. Same price per video.
- Without video details, YouTube's channel page only gives relative dates ("3 weeks ago"). We convert them to an ISO date and flag them with `dateIsApproximate: true`.

### Pricing

**0.80 USD per 1,000 videos.** Shorts and streams cost the same, and so does a channel-stats row when you set videos to 0. Likes and comment counts are included at no extra cost when you turn them on.

There is no minimum charge per run: one channel with 10 videos costs 0.008 USD. Error rows are free, and there's no monthly fee or Apify platform usage on top.

Example: the last 50 videos of 20 channels (1,000 videos) costs 0.80 USD.

### Good to know

- Shorts get their duration and exact publish date from the Short's own page, same as videos and streams. If you only need Shorts, our [YouTube Shorts Scraper](https://apify.com/vakitek/youtube-shorts-scraper) also gives you likes and comment count.
- This actor does not download videos or captions. For captions, use our [YouTube Transcript Scraper](https://apify.com/vakitek/youtube-transcript).
- Set **Language** to the channel's own language if you want the original titles: when a creator translated their titles, YouTube shows the translation matching your language.
- You don't need a proxy, a YouTube account or a YouTube API key.

### Use it from n8n, Make or an API

- **Small inputs**: call `run-sync-get-dataset-items` and read the items back directly. Set **Time budget (seconds)** (default 240) to how long you are willing to wait: the actor stops picking up new channels/tabs before that point and returns what it already has, so you never hit Apify's 300 second run-sync limit and lose the whole run. Any channel left unfinished comes back as a `TIME_BUDGET_EXCEEDED` row instead of being silently dropped.
- **Big inputs**: start the run with `POST /v2/acts/vakitek~youtube-channel-videos/runs`, poll `GET /v2/actor-runs/<runId>` (or add `waitForFinish=60`) until the status is `SUCCEEDED`, then read `GET /v2/datasets/<datasetId>/items`. Set **Time budget (seconds)** to `0` (no limit) for this pattern.

### Errors

A bad input never crashes the run. It becomes a row with an `error` code, and you are not charged for it.

| `error` | What happened | Retry? |
| --- | --- | --- |
| `NOT_FOUND` | The handle, URL or id doesn't match a real channel | No |
| `NO_RESULTS` | The channel exists but has nothing in the tabs you asked for | No |
| `INVALID_INPUT` | An option value (for example a date) is invalid | No |
| `PARSE_ERROR` | YouTube changed its page and we could not read it; we fix these fast, open an issue | No |
| `BLOCKED` | YouTube refused us for now, usually an age-restricted channel, even after trying every proxy tier | Yes |
| `UPSTREAM_ERROR` | Something went wrong on YouTube's side or ours | Yes |
| `UPSTREAM_UNAVAILABLE` | Our API was unreachable | Yes |
| `TIME_BUDGET_EXCEEDED` | The time budget ran out before this channel finished | Yes |

Some rows also carry a `legacyError` field with the old, pre-unification code name (for example `CHANNEL_NOT_FOUND` or `LOGIN_REQUIRED`) so a pipeline still matching on it keeps working while it migrates to `error`.

### Reliability

Success rate, last 30 days: 99.8 % of 1041 results across 32 runs (updated 2026-10-10). Failures counted: blocks, errors on our side, and runs that failed or timed out. Not counted: videos with no captions, private or deleted videos, bad links.

### FAQ

**How many videos can I get per channel?**
All of them. Set **Max videos** as high as you need and the actor goes through the whole channel.

**I already use another YouTube channel actor. Do I have to change my code?**
Probably not. The input `startUrls` and the output field names (`aboutChannelInfo`, `viewCount`, `channelName`...) follow the most used channel scraper on the Store.

**Can I call it from my code or from an AI agent?**
Yes, like any Apify actor: REST API, the Python and JavaScript clients, or the Apify MCP server. The examples are in the API tab.

**Something broke or a field is missing?**
Open an issue on this page. We read every one and usually answer within a day.

# Changelog

This Actor's version history is a separate document: https://apify.com/vakitek/youtube-channel-videos/changelog.md

# Actor input Schema

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

YouTube channel URLs (e.g. https://www.youtube.com/@mkbhd), bare handles (@mkbhd) or channel ids (UC...).

## `maxResults` (type: `integer`):

Maximum number of regular videos to scrape per channel. Set to 0 to only scrape channel info (no videos).

## `maxResultsShorts` (type: `integer`):

Maximum number of Shorts to scrape per channel.

## `maxResultStreams` (type: `integer`):

Maximum number of live/past streams to scrape per channel.

## `sortVideosBy` (type: `string`):

Order in which regular videos, Shorts and streams are scraped.

## `oldestPostDate` (type: `string`):

Stop scraping a channel's tab once its videos are older than this date. ISO date (e.g. 2026-01-01) or a relative number of days (e.g. "30 days"). Leave empty to only limit by count. Uses the exact publish date when includeVideoDetails is on, the approximate one otherwise. An unparseable value is a free INVALID_INPUT error item, not silently ignored.

## `includeVideoDetails` (type: `boolean`):

Adds likes and comment count to each video via one extra request per video (two when the comment count needs a second request). Comment count is null with commentsTurnedOff set to true when the creator disabled comments.

## `language` (type: `string`):

Interface language (hl) requested from YouTube, as an ISO 639-1 code (e.g. fr, de, ja). Controls which language translated titles/descriptions come back in. It does NOT change the transcript or video content language, only YouTube's own UI strings.

## `country` (type: `string`):

Geolocation (gl) requested from YouTube, as an ISO 3166-1 alpha-2 code (e.g. FR, DE, JP).

## `timeBudgetSecs` (type: `integer`):

Stop and return what is ready after this many seconds, so n8n/Make run-sync calls never time out. 0 = no limit.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/@mkbhd"
  ],
  "maxResults": 50,
  "maxResultsShorts": 0,
  "maxResultStreams": 0,
  "sortVideosBy": "NEWEST",
  "includeVideoDetails": false,
  "language": "en",
  "country": "US",
  "timeBudgetSecs": 240
}
```

# Actor output Schema

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

Videos, Shorts and streams of the channel (or one channel-info item when maxResults is 0), with views, likes, comment count and publish date. Error items carry an `error` code and the `input` that failed.

# 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 = {
    "startUrls": [
        "https://www.youtube.com/@mkbhd"
    ]
};

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

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

```

## MCP server setup

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

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/FfNZlRw77fFDmvGoe/builds/8xFvzzHbh7X5hIhrO/openapi.json
