# YouTube Comments Scraper Pro: Replies, Channels & Shorts (`muarafa/youtube-comments-pro`) Actor

Extract YouTube comments with replies from videos, Shorts and whole channels or playlists, plus channel video lists. No login. Duplicates and failures never charged. $0.50 per 1,000 comments.

- **URL**: https://apify.com/muarafa/youtube-comments-pro.md
- **Developed by:** [Mohamed Arafa](https://apify.com/muarafa) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 comments

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 Comments Scraper Pro – Comments, Replies, Channels & Shorts

Get the **comments and replies** of any YouTube video, **Short**, playlist or **entire channel** – or just the **list of a channel's videos** – as clean JSON, CSV or Excel. No login, no cookies, no API key. Duplicates and failed videos are **never charged**.

**$0.50 per 1,000 comments** ($0.0005 each) · channel video lists: **$1 per 1,000 videos** ($0.001 each).

### Why this scraper?

| Common complaint with comment scrapers | YouTube Comments Scraper Pro |
|---|---|
| Replies missing or all-or-nothing | Replies fetched per comment, with `maxRepliesPerComment`, linked by `parent_comment_id` |
| Stops after ~1,000 comments on big videos | YouTube cuts its *Top* ranking short on huge videos – the scraper **automatically continues with the Newest stream** until your limit (verified past 10,000 comments) |
| Blocked / empty responses | Uses YouTube's own app endpoints, retries with a **fresh session and proxy IP**, escalates to residential proxy when needed |
| Paying for duplicates and errors | Each `comment_id` / `video_id` is charged **once**; failed videos are not charged |
| Only single videos | Videos, Shorts, playlists, channels (`@handle`, `/channel/`, `/c/`, `/user/`) in one run |
| Runaway cost | `maxTotalItems` + Apify's *Maximum cost per run* – the scraper stops cleanly at the limit |

### Input

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/mND4T0lzg_g",
    "https://www.youtube.com/@TED"
  ],
  "mode": "comments",
  "maxCommentsPerVideo": 500,
  "includeReplies": true,
  "maxRepliesPerComment": 20,
  "sortBy": "top",
  "maxVideosPerChannel": 50,
  "maxTotalItems": 5000
}
```

- **mode** – `comments` (default), `channel_videos` (only the video list of channels/playlists) or `both`.
- **maxCommentsPerVideo** – top-level comments per video. Replies are limited separately by **maxRepliesPerComment**.
- **sortBy** – `top` or `newest`.
- **language** – YouTube interface language (e.g. `ar`): changes the wording of `published_at_text`. `published_at` is estimated in English and Arabic (and common European languages).
- **maxTotalItems** – hard limit of items (comments + videos) for the run. Default 5,000.

### Output

#### Comment

```json
{
  "comment_id": "UgzKYksqeQ5gA3t0g0F4AaABAg",
  "video_id": "dQw4w9WgXcQ",
  "video_title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "author_name": "@grustache4569",
  "author_channel_url": "https://www.youtube.com/channel/UCKrzgYonJnMd0Dk7zQXjYXw",
  "author_is_channel_owner": false,
  "text": "I Rick rolled my entire French class…",
  "like_count": 105000,
  "reply_count": 644,
  "published_at_text": "6 years ago (edited)",
  "published_at": "2020-10-26T03:34:44.571Z",
  "is_reply": false,
  "parent_comment_id": null,
  "is_pinned": false,
  "is_hearted": false,
  "scraped_at": "2026-10-26T15:34:44.571Z"
}
```

For replies, `is_reply` is `true` and `parent_comment_id` points to the top-level comment.

> `like_count` is what YouTube shows: exact below 1,000, rounded above (`105K` → 105000). `published_at` is an **estimate** computed from YouTube's relative text ("6 years ago"), accurate to the unit YouTube gives.

#### Channel video (`channel_videos` / `both`)

```json
{
  "video_id": "46v8M4RsCzg",
  "title": "Why We Should Design Cities Like Disney | Zach DeBoer | TED",
  "url": "https://www.youtube.com/watch?v=46v8M4RsCzg",
  "published_at_text": "1 day ago",
  "view_count": 68000,
  "duration_seconds": 987,
  "thumbnail_url": "https://i.ytimg.com/vi/46v8M4RsCzg/hqdefault.jpg",
  "is_short": false
}
```

Channel video lists show YouTube's rounded view counts (`68K`); a video URL given directly returns the exact count.

Export the dataset as **JSON, CSV or Excel** from the Apify Console or API.

### Run report

Every run saves `RUN-SUMMARY` in the key-value store: videos processed, comments / replies / videos returned, the success rate and a list of videos that failed or could not be read (private, removed, invalid URL) with the reason. Videos with comments turned off are counted as successful with zero comments.

### Pricing

Pay-per-event:

- **Comment** – $0.0005 per unique comment or reply = **$0.50 per 1,000**.
- **Video** – $0.001 per unique channel video returned in `channel_videos` / `both` mode.

Duplicates, failures, listing/expanding channels in `comments` mode and the run report are free. Set *Maximum cost per run* and the scraper stops cleanly at your budget.

### FAQ

**Why do I get fewer comments than the number shown on YouTube?** The counter includes replies, held-for-review and deleted comments. YouTube also doesn't serve everything through its public endpoints; the scraper tells you in the log how many YouTube reports.

**Do I need a proxy?** Apify Proxy is on by default and rotated automatically.

**Can I call it from code, Make, Zapier, n8n or an AI agent?** Yes – via the Apify API, the JS/Python clients and all Apify integrations.

Found a video that fails? Open an issue with the URL – we fix reports fast.

# Actor input Schema

## `startUrls` (type: `array`):

Video URLs (watch, youtu.be, <b>Shorts</b>, live, embed), <b>channel</b> URLs (@handle, /channel/UC…, /c/…, /user/…) or <b>playlist</b> URLs. Bare video IDs and <code>@handle</code> work too. Channels and playlists are expanded into their videos; duplicates are removed.

## `mode` (type: `string`):

<b>comments</b>: comments of every video (channels/playlists are expanded). <b>channel_videos</b>: only list the videos of channels/playlists. <b>both</b>: video list plus the comments of each video.

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

Top-level comments per video (replies are limited separately by the option below).

## `includeReplies` (type: `boolean`):

Also fetch the replies under each comment.

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

Replies fetched under each top-level comment.

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

Top comments (YouTube's ranking) or newest first.

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

How many videos to take from each channel or playlist (newest first).

## `language` (type: `string`):

YouTube interface language code, e.g. <code>en</code>, <code>ar</code>, <code>es</code>. It changes the language of <code>published_at_text</code> and the video titles YouTube returns; leave empty for English.

## `maxTotalItems` (type: `integer`):

Hard limit on items (comments + videos) for the whole run. The run stops cleanly when reached.

## `maxConcurrency` (type: `integer`):

How many videos to process at the same time.

## `maxRetries` (type: `integer`):

Retries with a fresh session and proxy IP when YouTube rate-limits or returns an empty response.

## `proxyConfiguration` (type: `object`):

YouTube blocks many datacenter IPs. Apify Proxy is enabled by default and rotated automatically on every retry.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/aqz-KE-bpKQ",
    "@TED"
  ],
  "mode": "comments",
  "maxCommentsPerVideo": 500,
  "includeReplies": true,
  "maxRepliesPerComment": 20,
  "sortBy": "top",
  "maxVideosPerChannel": 50,
  "language": "ar",
  "maxTotalItems": 5000,
  "maxConcurrency": 4,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "startUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("muarafa/youtube-comments-pro").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 = {
    "startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("muarafa/youtube-comments-pro").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 '{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call muarafa/youtube-comments-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muarafa/youtube-comments-pro"
        }
    }
}
```

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/Qrv0xraaqxXaGCAPM/builds/UnQAtquCRbHFtJPBT/openapi.json
