# Youtube Channel Video Scraper (`vistics/youtube-channel-video-scraper`) Actor

YouTube Channels Video Scraper is a powerful and user-friendly tool designed to extract valuable data from YouTube channels. This actor allows you to effortlessly collect detailed information about YouTube Videos from a Channel, including video IDs, titles, URLs, views, likes, published times, etc

- **URL**: https://apify.com/vistics/youtube-channel-video-scraper.md
- **Developed by:** [Ilong Mamman](https://apify.com/vistics) (community)
- **Categories:** Automation, Social media, Videos
- **Features:** Full permissions
- **Stats:** 54 total users, 2 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 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 Video Scraper - Extract Video Data & Analytics

[![Apify](https://img.shields.io/badge/Apify-Actor-blue.svg)](https://apify.com)
[![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

### 🎯 What is YouTube Channel Video Scraper?

The **YouTube Channel Video Scraper** is a powerful, automated tool designed to extract comprehensive video data from YouTube channels. Built with Apify's Actor platform, it provides detailed analytics including view counts, engagement metrics, channel information, and more.

This scraper is perfect for:

- **Content Creators** analyzing channel video performance
- **Digital Marketers** researching trending content
- **Data Analysts** studying social media trends
- **Researchers** analyzing YouTube Shorts engagement patterns
- **SEO Specialists** understanding viral content factors

### 🚀 Key Features

#### 📊 Comprehensive Data Extraction

- **Video Details**: Title, ID, URL, published time, duration, description, thumbnail
- **Engagement Metrics**: View count, like count, comment count
- **Channel Information**: Name, URL, subscriber count
- **Performance Analytics**: Real-time data from YouTube

#### 🔄 Flexible Scraping Options

- **Channel Handles/URLs**: Provide one or more channel handles/URLs
- **Fetch All or Limit**: Scrape entire uploads or limit to N videos
- **Batch Processing**: Handle multiple channels simultaneously
- **Configurable Limits**: Set maximum videos to scrape and per-request batch size

#### ⚡ High Performance

- **Parallel Processing**: Configurable concurrency for faster scraping
- **Error Handling**: Robust retry mechanism with configurable attempts
- **Rate Limiting**: Respectful scraping with built-in delays
- **Scalable**: Built on Apify's infrastructure for enterprise use

### 📈 Why Use YouTube Shorts Scraper?

#### Content Analysis & Research

- Analyze trending Shorts patterns and viral content
- Study engagement metrics across different niches
- Research competitor content strategies
- Identify high-performing video characteristics

#### Marketing Intelligence

- Track Shorts performance in your niche
- Monitor competitor channel growth
- Analyze viral content factors
- Generate content strategy insights

#### Data-Driven Decisions

- Identify trending topics and hashtags
- Understand audience engagement patterns
- Optimize content based on successful Shorts
- Track channel growth and subscriber metrics

### 🛠️ How to Use YouTube Channel Video Scraper

#### Method 1: Scrape by Channel Handle(s) or URL(s)

1. **Prepare Channels**: Collect YouTube channel handles or URLs
2. **Configure Settings**: Choose fetch all or limit number of videos
3. **Run Scraper**: Execute the actor with your input
4. **Download Results**: Get structured JSON data with all metrics

**Example Input:**

```json
{
  "channelHandle": [
    "https://www.youtube.com/@20VC",
    "https://www.youtube.com/@ycombinator"
  ],
  "fetchAll": false,
  "maxVideos": 10,
  "maxRequest": 50,
  "maxRequestRetries": 3
}
```

#### Method 2: Fetch All Channel Uploads

1. **Enable All Videos**: Set `fetchAll` to `true`
2. **Provide Channel Handles/URLs**: Use format `https://www.youtube.com/@channel`
3. **Tune Batching**: Configure `maxRequest` (1-50) and retries
4. **Run**: Scrapes all available uploads for each channel

### 📋 Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `channelHandle` | Array | Yes | `["https://www.youtube.com/@20VC"]` | Channel handles or URLs |
| `fetchAll` | Boolean | No | `false` | If true, fetch all uploads |
| `maxVideos` | Integer | No | `10` | Max videos when `fetchAll` is false |
| `maxRequest` | Integer | No | `50` | Per-request page size (1-50) |
| `maxRequestRetries` | Integer | No | `3` | Retry attempts for failed requests |

### 📊 Output Data Structure

Each scraped video returns comprehensive data:

```json
{
  "videoId": "kZ5AZ6bt_r8",
  "videoUrl": "https://www.youtube.com/watch?v=kZ5AZ6bt_r8",
  "videoTitle": "Databricks at $100BN...",
  "thumbnailUrl": "https://i.ytimg.com/vi/kZ5AZ6bt_r8/hqdefault.jpg",
  "viewCount": "7813",
  "likeCount": "158",
  "commentCount": "63",
  "publishedTime": "2025-08-21T13:57:35Z",
  "videoDuration": "1:34:59",
  "description": "...",
  "channelInfo": {
    "channelId": "UCf0PBRjhf0rF8fWBIxTuoWA",
    "channelUrl": "https://www.youtube.com/channel/UCf0PBRjhf0rF8fWBIxTuoWA",
    "channelName": "20VC with Harry Stebbings",
    "subscriberCount": "166000",
    "channelDescription": "..."
  }
}
```

#### Data Fields Explained

- **`videoUrl`**: YouTube watch URL
- **`videoId`**: Unique YouTube video identifier
- **`videoTitle`**: Video title
- **`thumbnailUrl`**: High-res thumbnail URL
- **`viewCount`**: Number of views
- **`likeCount`**: Number of likes
- **`commentCount`**: Number of comments
- **`publishedTime`**: ISO publish timestamp
- **`videoDuration`**: Human-readable duration (e.g., 1:34:59)
- **`description`**: Video description text
- **`channelInfo`**: Nested object with channel metadata

### 🔧 Technical Details

#### Built With

- **Node.js**: Modern JavaScript runtime
- **Apify SDK**: Professional web scraping framework
- **Crawlee**: Advanced web scraping library
- **Axios**: HTTP client for reliable requests

#### Architecture

- **Modular Design**: Clean, maintainable code structure
- **Error Handling**: Comprehensive error management
- **Rate Limiting**: Respectful scraping practices
- **Data Validation**: Ensures data quality and consistency

#### Performance Features

- **Parallel Processing**: Configurable concurrency for speed
- **Retry Logic**: Automatic retry for failed requests
- **Memory Efficient**: Optimized for large-scale scraping
- **Scalable**: Built for enterprise-level operations

### 📈 Use Cases & Applications

#### Content Creator Analytics

- Track your Shorts performance over time
- Analyze which content types perform best
- Monitor engagement trends and patterns
- Optimize posting times and content strategy

#### Competitive Analysis

- Research competitor Shorts strategies
- Identify trending content in your niche
- Analyze viral content characteristics
- Track competitor channel growth

#### Market Research

- Identify trending topics and hashtags
- Analyze audience engagement patterns
- Study content performance across niches
- Generate insights for content strategy

#### Data Science Projects

- Build machine learning models for content prediction
- Analyze social media trends and patterns
- Create engagement prediction algorithms
- Generate content optimization recommendations

### 🚀 Getting Started

#### Prerequisites

- Apify account (free tier available)
- Node.js 18+ (for local development)
- Basic understanding of JSON data

#### Quick Start

1. **Deploy Actor**: Upload to Apify platform
2. **Configure Input**: Set your scraping parameters
3. **Run Scraper**: Execute the actor
4. **Download Results**: Get structured data in JSON format

### 📞 Support

- **Documentation**: Check this README for usage instructions
- **Issues**: Report bugs or feature requests issues tab

### 🔗 Related Projects

- [YouTube Transcript Scraper PPR](https://apify.com/vistics/youtube-transcript-scraper-6-1k-results)
- [YouTube Transcript Scraper RENTAL](https://apify.com/vistics/youtube-transcript-scraper-rental)
- [YouTube Comments Scraper](https://apify.com/vistics/youtube-comments-scraper)

***

### 🔐 Environment setup

Create a `.env` file in the project root for local development:

```bash
YT_API_KEY=your_youtube_data_api_key
```

Notes:

- The app loads env vars via `dotenv` at startup.
- When deploying as an Apify Actor, set `YT_API_KEY` as an actor secret/environment variable in the platform UI instead of using `.env`.

# Actor input Schema

## `channelHandle` (type: `array`):

List of YouTube channel handles or URLs (e.g., https://www.youtube.com/@20VC).

## `fetchAll` (type: `boolean`):

Extract all videos from the channel If ON.

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

Maximum number of videos to enqueue when Fetch all videos is OFF.

## `maxRequest` (type: `integer`):

Batch size for playlistItems API (1-50).

## `maxRequestRetries` (type: `integer`):

Number of retries for failed requests.

## Actor input object example

```json
{
  "channelHandle": [
    "https://www.youtube.com/@20VC"
  ],
  "fetchAll": false,
  "maxVideos": 10,
  "maxRequest": 50,
  "maxRequestRetries": 3
}
```

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

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

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

```

## MCP server setup

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