# YouTube Comments Scraper: Replies, Likes & Channels (`inimi/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies from any video, Short, playlist or channel. Top or newest first, with likes, reply counts, author, creator hearts and pinned flags. Fast, cheap, no browser, no API key.

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

## Pricing

from $1.00 / 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: Replies, Likes & Channels

Scrape **YouTube comments and replies** from any video, Short, playlist or whole channel. Get the comment text, author, likes, reply count, date, and whether the creator hearted or pinned it, as clean JSON, CSV or Excel.

No browser and no YouTube API key (so no 10,000-units-a-day quota). The Actor reads comments the same way the YouTube page does, which makes it **fast and cheap**, and residential proxies are included in the price.

### What can you use it for?

- **Audience research**: learn what viewers ask for, complain about and love, in their own words.
- **Sentiment & brand monitoring**: track reactions to your videos, products or competitors.
- **Content ideas**: mine questions from comments for your next video, blog post or FAQ.
- **AI & LLM pipelines**: feed comments into classification, summarization or RAG.
- **Influencer & campaign analysis**: compare engagement across creators and videos.
- **Lead and community discovery**: find active commenters and channels in a niche.

### Features

| | |
|---|---|
| Inputs | Video URLs, IDs, Shorts, live replays, playlists, channels (@handle or URL) |
| Sorting | Top comments or newest first |
| Replies | Optional, each reply saved right after its parent, with `parentCommentId` |
| Per comment | Text, author handle, channel ID & URL, avatar, verified badge, channel-owner flag, likes, reply count, creator heart, pinned, edited, posted time (text + approximate date), direct comment link |
| Bulk | Many videos in parallel; for channels/playlists the latest N videos |
| Limits | Max comments per video, max replies per comment, max total cost per run |

### How to use

1. Paste videos, Shorts, playlists or channels into **Videos, channels or playlists**, one per line.
2. Set **Max comments per video** (0 = all) and the **sort order**.
3. Turn on **Include replies** if you need them.
4. Click **Start**, then download the results or use the API.

### Input example

```json
{
    "videos": ["https://www.youtube.com/watch?v=aircAruvnKk", "https://www.youtube.com/@mkbhd"],
    "maxComments": 200,
    "sort": "top",
    "includeReplies": true,
    "maxRepliesPerComment": 10,
    "maxVideosPerSource": 5
}
```

### Output example

```json
{
    "videoId": "aircAruvnKk",
    "videoTitle": "But what is a neural network? | Deep learning chapter 1",
    "commentId": "Ugwedfi--9yZVC0eefl4AaABAg",
    "url": "https://www.youtube.com/watch?v=aircAruvnKk&lc=Ugwedfi--9yZVC0eefl4AaABAg",
    "text": "I study mathematics, physics and architecture. By definition this man is an ORACLE...",
    "author": "@kummer45",
    "authorChannelId": "UCqArZkt3NAOU0tcgIi6xmFQ",
    "authorIsVerified": false,
    "authorIsChannelOwner": false,
    "likes": 14000,
    "likesText": "14K",
    "replyCount": 176,
    "isPinned": false,
    "isHeartedByCreator": false,
    "isEdited": true,
    "publishedTimeText": "7 years ago",
    "publishedAt": "2019-10-30T06:28:30.808Z",
    "isReply": false,
    "parentCommentId": null,
    "status": "ok"
}
```

Videos with comments turned off (or private/removed) get one free row with `status` and the reason in `error`. A per-video summary is saved to the key-value store as `SUMMARY`.

### Pricing

You pay **per comment saved** (replies count as comments). Status rows are free. Proxies and compute are included. Set a maximum cost per run and the Actor stops cleanly when it is reached.

### FAQ

**Why are likes like 14000 instead of 14,231?**
YouTube only shows rounded like counts ("14K") for comments. `likes` is that number, and `likesText` is exactly what YouTube shows.

**How exact is `publishedAt`?**
YouTube shows relative times ("7 years ago"), so `publishedAt` is an estimate. `publishedTimeText` is the original text.

**Can I get all comments of a video?**
Yes, set **Max comments per video** to 0. Very large videos can have hundreds of thousands of comments, so set a maximum cost per run.

**Can I call it from code or an AI agent?**
Yes, via the Apify API, the official JS/Python clients, or Apify's MCP server.

# Actor input Schema

## `videos` (type: `array`):

One per line: video URL (watch, youtu.be, Shorts, live), video ID, playlist URL, or channel URL / @handle (gets comments from the channel's latest videos).

## `maxComments` (type: `integer`):

Top-level comments per video. 0 = all.

## `sort` (type: `string`):

Sort by.

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

Also get replies to each comment (each reply is one row, saved right after its parent).

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

Max replies per comment.

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

For channels and playlists: how many of the latest videos to get comments from. 0 = all.

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

Videos in parallel.

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

Proxies are included in the price. Switch to residential proxies if you see many blocked requests.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "maxComments": 100,
  "sort": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxVideosPerSource": 10,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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