# YouTube Channel Scraper: Videos, Playlists, Views & Stats (`salmon_chaparral/youtube-channel-video-scraper`) Actor

YouTube Channel Scraper for channels, @handles, playlists & videos — no YouTube API key, login or browser. Extract subscriber counts, channel profiles, video titles, views, likes, durations, publish dates & thumbnails. Export JSON/CSV via API. $0 start, $0.50/1K videos.

- **URL**: https://apify.com/salmon_chaparral/youtube-channel-video-scraper.md
- **Developed by:** [Max Lee](https://apify.com/salmon_chaparral) (community)
- **Categories:** Social media, Videos, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 videos scraped

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/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, Playlist & Video Metadata Scraper

Fast pure-HTTP scraper for YouTube channels, playlists, and videos at 256 MB RAM — no headless browser, no YouTube Data API key, and datacenter-safe extraction using official YouTube Atom RSS feeds, Innertube, `ytInitialData`, and oEmbed fallback.

- **Pricing:** **$0 start fee** + **$0.0005 per scraped video** ($0.50 per 1,000 videos). Failed fetches or empty runs are never charged.
- **1-Click Zero-Config:** Run immediately with empty `{}` input to scrape the latest videos and channel profile from `@GoogleDevelopers` in seconds.
- **Channels, Playlists & Direct Videos:** Accepts `/@handle`, `/channel/UC...`, bare `UC...` IDs, `playlist?list=...`, `PL...`/`UU...` IDs, `feeds/videos.xml` RSS URLs, and `/watch?v=...` / `youtu.be` / Shorts / 11-char video IDs.
- **Flat Export-Ready Dataset:** Every row includes `videoId`, `url`, `title`, `description`, `publishedAt`, `durationSec`, `durationText`, `viewCount`, `likeCount`, `thumbnailUrl`, and full channel metadata (`channelId`, `channelName`, `channelHandle`, `channelSubscriberCount`, `channelVideoCountText`, `channelDescription`, `channelAvatarUrl`).

***

### Input Example

```json
{
  "channelUrls": [
    "https://www.youtube.com/@GoogleDevelopers"
  ],
  "playlistUrls": [
    "https://www.youtube.com/playlist?list=UU_x5XG1OV2P6uZZ5FSM9Ttw"
  ],
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerSource": 10,
  "enrichVideoDetails": false,
  "deduplicate": true
}
```

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `channelUrls` | `string[]` | `["https://www.youtube.com/@GoogleDevelopers"]` | Channel handles (`@handle`), `/@handle` URLs, `/channel/UC...`, `UC...` IDs, or `feeds/videos.xml?channel_id=...` RSS URLs. |
| `playlistUrls` | `string[]` | `[]` | Playlist URLs (`playlist?list=...`), playlist IDs (`PL...`, `UU...`), or playlist RSS URLs. |
| `videoUrls` | `string[]` | `[]` | Direct watch, `youtu.be`, Shorts, live, embed URLs, or 11-character video IDs. |
| `maxVideosPerSource` | `integer` | `15` | Max videos per channel or playlist (1–50). Up to 15 come directly from YouTube RSS; higher counts expand via `ytInitialData`/Innertube. |
| `enrichVideoDetails` | `boolean` | `false` | Optional per-video Innertube player lookup to add `durationSec`, `keywords`, and `isLive` when not already present. |
| `deduplicate` | `boolean` | `true` | Deduplicate overlapping video IDs across channels, playlists, and direct video inputs. |
| `concurrency` | `integer` | `5` | Concurrent pure-HTTP workers (1–15). |
| `requestTimeoutMs` | `integer` | `15000` | Per-request HTTP timeout in milliseconds (3000–45000). |

***

### Output Example (Dataset Item)

```json
{
  "videoId": "GaPpzKrdoLk",
  "url": "https://www.youtube.com/watch?v=GaPpzKrdoLk",
  "title": "How doctors and developers are using MedGemma",
  "description": "Healthcare workers in hospitals and remote clinics around the world...",
  "publishedAt": "2026-12-03T20:00:32.000Z",
  "updatedAt": "2026-12-04T09:24:20.000Z",
  "publishedTimeText": "2d ago",
  "durationSec": 88,
  "durationText": "1:28",
  "viewCount": 11055,
  "likeCount": 119,
  "thumbnailUrl": "https://i4.ytimg.com/vi/GaPpzKrdoLk/hqdefault.jpg",
  "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "channelName": "Google for Developers",
  "channelHandle": "@GoogleDevelopers",
  "channelUrl": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "channelSubscriberCount": 2690000,
  "channelSubscriberText": "2.69M subscribers",
  "channelVideoCountText": "6.1K videos",
  "channelDescription": "Welcome to Google for Developers!...",
  "channelAvatarUrl": "https://yt3.googleusercontent.com/...",
  "sourceType": "channel",
  "sourceInput": "https://www.youtube.com/@GoogleDevelopers",
  "playlistId": null,
  "playlistTitle": null,
  "playlistPosition": null,
  "isShort": false,
  "isLive": false,
  "keywords": [],
  "dataSources": ["rss", "ytInitialData"],
  "scrapedAt": "2026-12-06T02:35:00.000Z"
}
```

A structured run rollup (counts, resolved channel profiles, billing events, and any skipped sources) is saved to the Key-Value Store under `OUTPUT`.

***

### How It Works

1. **Handle & Target Resolution:** Classifies channels, playlists, and videos. Resolves `/@handle` URLs via YouTube Innertube `navigation/resolve_url` with public channel HTML fallback (`channelMetadataRenderer.externalId` / `rssUrl`).
2. **Datacenter-Safe Feed Ingestion:** Fetches official YouTube Atom RSS feeds (`/feeds/videos.xml?channel_id=...` and `?playlist_id=...`) for exact ISO-8601 publish dates, descriptions, view counts, like counts, and thumbnails.
3. **Channel & Extended Listing Enrichment:** Parses public `ytInitialData` (`channelMetadataRenderer`, header metadata, `lockupViewModel`, `videoRenderer`, `playlistVideoRenderer`) and Innertube `browse` to attach subscriber counts, handles, durations, and video listings beyond the 15-item RSS window.
4. **Direct Video Fallback Chain:** Uses Innertube `player` (Android + iOS clients), watch HTML `ytInitialPlayerResponse`, and YouTube oEmbed so every video resolves reliably over pure HTTP.

# Changelog

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

# Actor input Schema

## `channelUrls` (type: `array`):

List of YouTube channels: @handle, /@handle URL, /channel/UC... URL, UC... channel ID, or feeds/videos.xml?channel_id=... RSS URL. Playlist or video URLs placed here are routed automatically.

## `playlistUrls` (type: `array`):

Optional list of YouTube playlist URLs (youtube.com/playlist?list=...), playlist IDs (PL..., UU..., OLAK...), or playlist RSS URLs (feeds/videos.xml?playlist_id=...).

## `videoUrls` (type: `array`):

Optional list of direct YouTube watch, youtu.be, Shorts, live, or embed URLs, or bare 11-character video IDs.

## `maxVideosPerSource` (type: `integer`):

Maximum number of videos to return per channel or playlist (1 to 50). Up to 15 latest videos come directly from YouTube Atom RSS with exact ISO timestamps, views, and likes; larger counts expand via ytInitialData/Innertube.

## `enrichVideoDetails` (type: `boolean`):

When enabled, performs an extra Innertube player lookup for videos missing duration or keywords so every row includes durationSec, keywords, and isLive.

## `deduplicate` (type: `boolean`):

Remove duplicate video IDs when overlapping channels, playlists, and video URLs are supplied in one run.

## `concurrency` (type: `integer`):

Number of concurrent pure-HTTP workers for source fetches and optional video enrichment.

## `requestTimeoutMs` (type: `integer`):

HTTP timeout in milliseconds for each YouTube RSS, oEmbed, HTML, or Innertube request.

## Actor input object example

```json
{
  "channelUrls": [
    "https://www.youtube.com/@GoogleDevelopers"
  ],
  "maxVideosPerSource": 10,
  "enrichVideoDetails": false,
  "deduplicate": true,
  "concurrency": 5,
  "requestTimeoutMs": 15000
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "channelUrls": [
        "https://www.youtube.com/@GoogleDevelopers"
    ],
    "maxVideosPerSource": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("salmon_chaparral/youtube-channel-video-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 = {
    "channelUrls": ["https://www.youtube.com/@GoogleDevelopers"],
    "maxVideosPerSource": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("salmon_chaparral/youtube-channel-video-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 '{
  "channelUrls": [
    "https://www.youtube.com/@GoogleDevelopers"
  ],
  "maxVideosPerSource": 10
}' |
apify call salmon_chaparral/youtube-channel-video-scraper --silent --output-dataset

```

## MCP server setup

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