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

List every video, Short and live stream on YouTube channels with views, upload date, duration and thumbnails, plus channel subscribers. Use @handles, URLs or channel IDs. No API key.

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

## Pricing

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

Lists the videos, Shorts and live streams on YouTube channels, with view counts, upload times, durations and thumbnails. It also returns one channel record with subscriber and video counts. No YouTube API key or quota is needed.

### Input

| Field | Description |
|---|---|
| `channels` | `@handle`, channel URL (`/@name`, `/channel/UC…`, `/c/…`, `/user/…`) or channel ID. A tab in the URL (`/@name/shorts`, `/@name/streams`) is used instead of `tabs` for that channel. |
| `tabs` | Any of `videos`, `shorts`, `streams`. Default `["videos"]`. |
| `maxVideosPerChannel` | Per channel and per tab, newest first. Default 100. |
| `includeChannelInfo` | One record per channel. Default `true`. |

```json
{
  "channels": ["@veritasium", "https://www.youtube.com/@mkbhd"],
  "tabs": ["videos", "shorts"],
  "maxVideosPerChannel": 500
}
```

### Output

Video records use the same keys as the other YouTube Actors in this series; keys that a channel listing does not show (such as `likes`) are `null`. Examples from a real run:

**Video**

```json
{
  "type": "video",
  "tab": "videos",
  "input": "@veritasium",
  "videoId": "eyZEqSPeMwg",
  "url": "https://www.youtube.com/watch?v=eyZEqSPeMwg",
  "title": "No device could prove Einstein wrong... until now",
  "channel": "Veritasium",
  "channelId": "UCHnyfMqiRRG1u-2MsSQLbXA",
  "channelUrl": "https://www.youtube.com/@veritasium",
  "channelHandle": "@veritasium",
  "channelSubscribers": 21400000,
  "channelVerified": true,
  "collaborators": [],
  "views": 1000000,
  "concurrentViewers": null,
  "likes": null,
  "commentCount": null,
  "commentCountIsExact": null,
  "duration": "34:28",
  "durationSec": 2068,
  "publishDate": null,
  "publishedAt": null,
  "isShort": false,
  "isLive": false,
  "isAgeRestricted": null,
  "isMembersOnly": null,
  "commentsTurnedOff": null,
  "tags": null,
  "category": null,
  "thumbnail": "https://i.ytimg.com/vi/eyZEqSPeMwg/hq720_custom_1.jpg",
  "description": null,
  "hashtags": [],
  "viewsText": "1M",
  "publishedTimeText": "5 hours ago",
  "publishedAtApprox": "2026-10-23T19:40:03.567Z",
  "isUpcoming": false
}
```

**Channel**

```json
{
  "type": "channel",
  "input": "@veritasium",
  "channelId": "UCHnyfMqiRRG1u-2MsSQLbXA",
  "channel": "Veritasium",
  "channelUrl": "https://www.youtube.com/@veritasium",
  "channelHandle": "@veritasium",
  "description": "An element of truth - videos about science, education, and anything else we find interesting.",
  "channelSubscribers": 21400000,
  "channelVerified": true,
  "videoCount": 543,
  "keywords": "\"science videos\" science \"science education\" ...",
  "avatar": "https://yt3.googleusercontent.com/..."
}
```

Field notes:

- Channel pages show rounded view counts (for example "1M"), so `views` is rounded. For exact views, likes and comment counts, use the YouTube Scraper.
- YouTube lists only relative upload times ("5 hours ago"), so `publishedAtApprox` is an estimate.
- Streams that are live now have `isLive: true` and `concurrentViewers` instead of `views`. Scheduled streams and premieres have `isUpcoming: true`.
- Shorts listings do not include an upload time or duration.
- Channel listings do not include likes, comment counts, exact dates, tags or category, so these are `null` (unknown). Use the YouTube Scraper for those.

Errors: an input that is not a channel, a channel that does not exist, or a channel with nothing on the requested tabs gives one item with `type: "error"`, `input` and `error` (for example "This channel has no Shorts tab"). When some requested tabs have videos and others do not, each empty or missing tab gets its own error item with `tab` set. Error items are not charged. A channel given twice in different forms is scraped once.

### API usage

```bash
curl -X POST "https://api.apify.com/v2/acts/solarg~youtube-channel-videos/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["@veritasium"], "maxVideosPerChannel": 200}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("solarg/youtube-channel-videos").call(run_input={"channels": ["@veritasium"], "maxVideosPerChannel": 200})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### Pricing

- $0.50 per 1,000 videos
- $0.001 per channel record

Error items are free. Apify paid plans get lower prices: 10% off on Bronze, 20% on Silver and 30% on Gold and above. Platform usage is included in the price.

Report problems in the Issues tab.

# Actor input Schema

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

@handles, channel URLs (/@name, /channel/UC…, /c/…, /user/…) or channel IDs.

## `tabs` (type: `array`):

Which channel tabs to collect: regular videos, Shorts, and live or past streams. Each tab is listed separately.

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

Maximum items to return from each selected tab of each channel, newest first.

## `includeChannelInfo` (type: `boolean`):

Add one record per channel with title, description, subscribers, video count and keywords.

## Actor input object example

```json
{
  "channels": [
    "@veritasium"
  ],
  "tabs": [
    "videos"
  ],
  "maxVideosPerChannel": 30,
  "includeChannelInfo": true
}
```

# Actor output Schema

## `videos` (type: `string`):

Video, Short and stream records (the Videos view).

## `channels` (type: `string`):

Channel records (the Channels view).

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

Every item in the default dataset, including error items.

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solarg/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/5Xd67sR3uD4nzcJbZ/builds/87okl5cuJKB31hv4h/openapi.json
