# YouTube Scraper: Channels, Videos, Transcripts & Comments (`privatebyte/youtube-scraper`) Actor

Extract public YouTube channels, paginated channel videos, video details with full transcripts, keyword search, and comments. Fast HTTP runs at 128 MB RAM. Per 1,000 saved results: $0.45 Free/Starter, $0.42 Scale, $0.40 Business/Enterprise.

- **URL**: https://apify.com/privatebyte/youtube-scraper.md
- **Developed by:** [PrivateByte](https://apify.com/privatebyte) (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.40 / 1,000 saved results

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 Scraper: Channels, Videos, Transcripts, Search & Comments

Extract public YouTube channels, paginated channel video lists, full video metadata with timestamped transcripts, keyword search results, and comments into JSON, CSV, or Excel—with **zero proxy configuration** and **all-in pay-per-result pricing starting at $0.45 per 1,000 results**. Built by PrivateByte.

#### Why use PrivateByte YouTube Scraper?

- **$0.45 per 1,000 saved results (all-in):** Platform usage is included—no separate proxy bills or compute overages. Scale ($0.42) and Business/Enterprise ($0.40) discounts apply automatically.
- **Full timestamped transcripts:** Pull clean plain-text transcripts and timestamped segments (`start_s`, `duration_s`, `text`) for RAG, AI summarization, and content research.
- **Fast HTTP runs at 128 MB RAM:** Uses YouTube's lightweight JSON APIs—ideal for Clay, n8n, Make, Zapier, and MCP/AI agents.
- **Forgiving inputs:** Paste `@handles`, `UC...` channel IDs, channel URLs, `youtube.com/watch?v=...`, `youtu.be/...`, `youtube.com/shorts/...`, or raw 11-character video IDs.

***

### Supported Operations

| Workflow | `operation` | Input field | What you get |
|---|---|---|---|
| Enrich creator / channel lists | `channel` *(default)* | `channels` | Channel ID, handle, name, subscribers, video count, description, keywords, avatar, URL |
| Crawl a channel's videos | `channel_videos` | `channels` | Paginated videos (~30/page) with title, views, duration, publish time, thumbnail, URL |
| Video details & transcripts | `video` | `videoUrls` | Title, description, views, likes, duration, publish date, category, keywords, full transcript & timestamped segments |
| YouTube keyword search | `search` | `queries` | Paginated search results (videos, Shorts, channels, playlists) with view counts and URLs |
| Collect video comments | `comments` | `videoUrls` | Paginated top comments (~20/page) with author, verified/creator badges, text, likes, reply counts |

***

### Quick-Start Examples

#### 1. Channel Info (`channel`)

```json
{
  "operation": "channel",
  "channels": ["@mkbhd", "https://www.youtube.com/@veritasium"],
  "maxItems": 100
}
```

#### 2. Video Details + Transcript (`video`)

```json
{
  "operation": "video",
  "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
  "includeTranscript": true,
  "transcriptLanguage": "en"
}
```

#### 3. Paginated Channel Videos (`channel_videos`)

```json
{
  "operation": "channel_videos",
  "channels": ["@mkbhd"],
  "maxItems": 60,
  "maxPages": 3
}
```

#### 4. Keyword Search (`search`)

```json
{
  "operation": "search",
  "queries": ["python tutorial", "ai agents"],
  "maxItems": 40,
  "maxPages": 2
}
```

#### 5. Video Comments (`comments`)

```json
{
  "operation": "comments",
  "videoUrls": ["dQw4w9WgXcQ"],
  "maxItems": 40,
  "maxPages": 2
}
```

***

### Pricing

| Apify Plan | Price / 1,000 saved results |
|---|---|
| Free / Starter | **$0.45** |
| Scale | **$0.42** |
| Business / Enterprise | **$0.40** |

Platform usage is included. Duplicate IDs within a run are skipped and never billed; unavailable targets incur no saved-result charge.

### More Scrapers by PrivateByte

Fast, zero-proxy scrapers with simple pay-per-event pricing:

| Scraper | What it extracts |
| --- | --- |
| [TikTok Scraper](https://apify.com/privatebyte/tiktok-scraper) | Profiles, videos, stats, hashtags & music metadata |
| [Instagram Scraper](https://apify.com/privatebyte/instagram-scraper) | Profiles, posts, reels, captions & engagement metrics |
| [Amazon Scraper](https://apify.com/privatebyte/amazon-scraper) | Search results, ASIN details & Best Sellers across 8 marketplaces |
| [LinkedIn Jobs Scraper](https://apify.com/privatebyte/linkedin-jobs-scraper) | Job search & full job descriptions with location/time filters |
| [Google News Scraper](https://apify.com/privatebyte/google-news-scraper) | Keyword search, topics & top headlines by country/language |
| [Apple App Store Scraper](https://apify.com/privatebyte/app-store-scraper) | iOS app search, full metadata & paginated customer reviews |
| [Shopify Store Scraper](https://apify.com/privatebyte/shopify-scraper) | Storefront product catalogs, pricing, variants & collections |
| [Steam Games & Reviews Scraper](https://apify.com/privatebyte/steam-scraper) | Game search, regional pricing, metadata & cursor-paginated reviews |

# Actor input Schema

## `operation` (type: `string`):

Choose channel info, paginated channel videos, video details (with optional transcripts), keyword search, or video comments.

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

Used for channel and channel_videos operations. Enter 1–100 @handles, channel IDs (UC...), or YouTube channel URLs.

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

Used for video and comments operations. Accepts youtube.com/watch?v=..., youtu.be/..., youtube.com/shorts/..., or 11-character video IDs.

## `queries` (type: `array`):

Used for search operation. Enter 1–100 keyword search queries.

## `includeTranscript` (type: `boolean`):

When enabled on the video operation, extracts full timestamped captions/transcript when available.

## `transcriptLanguage` (type: `string`):

ISO language code (e.g. en, es, de, fr, ja). Falls back to English or first available track if not found.

## `maxItems` (type: `integer`):

Maximum number of result rows saved across the run.

## `maxPages` (type: `integer`):

Maximum continuation pages per target for paginated operations (channel_videos, search, comments).

## Actor input object example

```json
{
  "operation": "channel",
  "channels": [
    "@mkbhd"
  ],
  "includeTranscript": true,
  "transcriptLanguage": "en",
  "maxItems": 100,
  "maxPages": 5
}
```

# Actor output Schema

## `dataset` (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 = {
    "channels": [
        "@mkbhd"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("privatebyte/youtube-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": ["@mkbhd"] }

# Run the Actor and wait for it to finish
run = client.actor("privatebyte/youtube-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": [
    "@mkbhd"
  ]
}' |
apify call privatebyte/youtube-scraper --silent --output-dataset

```

## MCP server setup

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