# YouTube Video, Channel, Search & Comments Scraper (`gouda_studios/youtube-video-channel-scraper`) Actor

Full YouTube video data from video URLs, channels (videos, shorts, live), search queries and playlists in one actor: views, likes, comment count, duration, exact publish date, tags, category, chapters, channel subscribers. $0.30 per 1,000 videos, no API key, no proxy. Built for AI agents and n8n.

- **URL**: https://apify.com/gouda_studios/youtube-video-channel-scraper.md
- **Developed by:** [Gouda Studios](https://apify.com/gouda_studios) (community)
- **Categories:** Social media, Videos, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Video, Channel, Search & Comments Scraper

Get full YouTube video data from **video URLs, channels, search queries and playlists in one actor**, plus **video comments and replies**. Every row has the same clean schema: views, likes, comment count, duration, exact publish date, tags, category, chapters, description, thumbnail and the channel's subscriber count.

- **$0.30 per 1,000 videos** and **$0.30 per 1,000 comments** (plus a $0.00005 run start). No YouTube API key, no quota, no proxy needed.
- Errors (deleted, private or invalid videos) come back as free rows, so you never pay for a miss.
- Works well as a tool for AI agents, n8n, Make, Zapier and LangChain, and through Apify's MCP server.

### What you can scrape

| Input | What you get |
|---|---|
| Video URLs or ids (watch, youtu.be, shorts, live) | Full details for each video |
| Channels (@handle, channel URL or UC id) | Newest videos, Shorts and/or live streams, with full details |
| Search queries | Top results by relevance or view count, optionally only uploads from the last hour, day, week, month or year |
| Playlists | Every video in the playlist |
| Comments video URLs | Top comments with text, author name and channel id, likes, reply count, hearted and creator flags, comment link, and optional replies |

### Output fields

| Field | Example |
|---|---|
| `videoId`, `url` | `dQw4w9WgXcQ` |
| `title`, `description` | Full text |
| `viewCount`, `likeCount`, `commentCount` | `1835767273`, `19498596`, `2400000` |
| `durationSeconds` | `213` |
| `publishedAt`, `uploadedAt` | `2009-10-24T23:57:33-07:00` |
| `category`, `tags` | `Music`, `["rick astley", ...]` (when YouTube returns them) |
| `chapters` | `[{"title": "Intro", "startSeconds": 0}]` |
| `channelName`, `channelId`, `channelHandle`, `channelUrl`, `channelSubscribers` | `Rick Astley`, `4560000` |
| `thumbnailUrl`, `hasCaptions`, `isLive`, `isFamilySafe` | |
| `type` | `video`, `short` or `stream` |
| `source`, `sourceInput`, `rank`, `publishedText`, `scrapedAt` | Where the row came from and its position |

#### Example row

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelSubscribers": 4560000,
  "viewCount": 1835767273,
  "likeCount": 19498596,
  "commentCount": 2400000,
  "durationSeconds": 213,
  "publishedAt": "2009-10-24T23:57:33-07:00",
  "category": "Music",
  "source": "video"
}
```

### Example inputs

Track a competitor's channel:

```json
{ "channels": ["@mkbhd"], "channelTabs": ["videos", "shorts"], "maxVideosPerChannel": 50 }
```

Find what is trending for a keyword this week:

```json
{ "searchQueries": ["claude code", "n8n tutorial"], "uploadedWithin": "week", "maxResultsPerQuery": 50 }
```

Pull the top 500 comments and up to 5 replies each:

```json
{ "commentVideoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"], "maxCommentsPerVideo": 500, "maxRepliesPerComment": 5 }
```

Comment rows look like this:

```json
{ "type": "comment", "videoId": "dQw4w9WgXcQ", "commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg", "text": "I Rick rolled my entire French class...", "authorName": "@grustache4569", "authorChannelId": "UCKrzgYonJnMd0Dk7zQXjYXw", "likeCount": 107000, "replyCount": 690, "publishedText": "6 years ago (edited)", "isHearted": false, "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzKYksqeQ5gA3t0g0F4AaABAg" }
```

Quick, light listing without per-video detail calls:

```json
{ "channels": ["UCBJycsmduvYEL83R_U4JriQ"], "fullDetails": false, "maxVideosPerChannel": 200 }
```

### Pricing compared

| Actor | Price per 1,000 videos (free Apify plan) |
|---|---|
| **This actor** | **$0.30** |
| Popular video-details scrapers | $0.50 to $0.95 |
| Popular channel-video scrapers | about $1.00 |
| Popular comment scrapers (per 1,000 comments) | $0.50 to $2.00 |

One actor covers videos, channels, search and playlists, so you don't need to chain several scrapers.

### Use cases

- Competitor and creator tracking: newest uploads and how fast they gain views.
- Influencer vetting: subscribers, average views, engagement (likes and comments per view).
- Content research for AI agents: find the top videos for a topic, then pull transcripts with our [YouTube Transcript Extractor](https://apify.com/gouda_studios/youtube-transcript-extractor).
- Trend monitoring: run a search every hour with `uploadedWithin: "day"` and alert on fast risers.

### Calling it from code or an agent

```bash
curl -X POST "https://api.apify.com/v2/acts/gouda_studios~youtube-video-channel-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://youtu.be/dQw4w9WgXcQ"]}'
```

AI agents can also call it through the Apify MCP server at `https://mcp.apify.com` by adding the actor `gouda_studios/youtube-video-channel-scraper`.

### FAQ

**Do I need a YouTube API key?** No. The actor reads public YouTube pages, so there is no 10,000-unit daily quota.

**Are private or age-restricted videos supported?** Only public data is returned. Videos that need a login come back as a free error row.

**Is it legal?** It collects only publicly visible data. Make sure your use complies with YouTube's terms and with data-protection law where you operate.

**Something broke or you need a field?** Open an issue on the actor's Issues tab and we'll fix it quickly.

### Related actors

- [YouTube Transcript Extractor](https://apify.com/gouda_studios/youtube-transcript-extractor)
- [Instagram Reels & TikTok Transcript Scraper](https://apify.com/gouda_studios/instagram-tiktok-transcript-scraper)
- [App Store & Google Play Reviews Scraper](https://apify.com/gouda_studios/app-store-google-play-reviews)

# Actor input Schema

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

YouTube video links (watch, youtu.be, shorts, live) or 11-character video ids. Returns full details for each.

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

Channel @handles, channel URLs or UC... channel ids. Lists the latest videos from each channel.

## `channelTabs` (type: `array`):

Which channel tabs to list.

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

Newest first.

## `searchQueries` (type: `array`):

Keywords to search on YouTube.

## `maxResultsPerQuery` (type: `integer`):

Top results per query, in YouTube order.

## `sortBy` (type: `string`):

Relevance or most viewed first.

## `uploadedWithin` (type: `string`):

Only videos uploaded within this window.

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

Public playlist links or playlist ids.

## `maxVideosPerPlaylist` (type: `integer`):

Videos taken from each playlist.

## `fullDetails` (type: `boolean`):

For channel, search and playlist results, also fetch likes, comment count, exact publish date, tags, category, description and chapters. Turn off for faster, lighter rows. Same price either way.

## `maxTotalResults` (type: `integer`):

Hard cap on charged rows for the whole run.

## `commentVideoUrls` (type: `array`):

YouTube video or Shorts URLs (or 11-character ids). Returns top comments with text, author, likes, reply count, hearted flag and comment link.

## `maxCommentsPerVideo` (type: `integer`):

Comments are returned in YouTube top-comments order.

## `maxRepliesPerComment` (type: `integer`):

0 skips replies. Replies are returned as rows with type reply and parentCommentId.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "channels": [
    "@mkbhd"
  ],
  "channelTabs": [
    "videos"
  ],
  "maxVideosPerChannel": 30,
  "maxResultsPerQuery": 30,
  "sortBy": "relevance",
  "uploadedWithin": "any",
  "maxVideosPerPlaylist": 100,
  "fullDetails": true,
  "maxTotalResults": 0,
  "maxCommentsPerVideo": 100,
  "maxRepliesPerComment": 0
}
```

# Actor output Schema

## `results` (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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "channels": [
        "@mkbhd"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gouda_studios/youtube-video-channel-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 = {
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "channels": ["@mkbhd"],
}

# Run the Actor and wait for it to finish
run = client.actor("gouda_studios/youtube-video-channel-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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "channels": [
    "@mkbhd"
  ]
}' |
apify call gouda_studios/youtube-video-channel-scraper --silent --output-dataset

```

## MCP server setup

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