# YouTube Comment Scraper \[FAST] | Likes, Replies & Authors (`apizy/youtube-comment-scraper`) Actor

Turn any YouTube video's comments into a clean dataset. Pull comment text, authors, like counts, reply counts, and publish dates for up to 1,000 comments, great for sentiment analysis and audience research. Sort by top or newest. Pay $0.0005 per comment, only on success. Failures are 100% free.

- **URL**: https://apify.com/apizy/youtube-comment-scraper.md
- **Developed by:** [Apizy](https://apify.com/apizy) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 8 total users, 1 monthly users, 100.0% runs succeeded, 6 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.40 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Comment Scraper

Scrape comments from any YouTube video and get the full comment text, author details, like counts, reply counts, publish dates, and engagement flags. Works on any video URL format and returns clean JSON in seconds.

You are only charged for comments that come back with real data. Failed requests and empty results are free.

### What does YouTube Comment Scraper do?

YouTube Comment Scraper pulls comment data directly from any YouTube video and turns it into a clean, structured dataset ready to use.

It can extract:

- Comment text and comment IDs
- Author name, channel URL, and profile image
- Like counts (normalized integer)
- Reply counts and whether a comment has replies
- Publish dates (raw string and `YYYY-MM-DD`)
- Engagement flags: pinned, edited, and reply status

### Why Scrape YouTube Comments?

A video's comment section is where the real audience reaction lives. Likes, replies, and timing together reveal what people actually think, which comments drive conversation, and how sentiment shifts as a video gains traction.

Here are some ways you could use this data:

- Run sentiment and feedback analysis on your own or competitor videos
- Surface the most-liked and most-discussed comments in any niche
- Monitor brand mentions and audience reactions over time
- Build datasets for NLP, sentiment models, or trend research
- Feed comment data into dashboards, spreadsheets, or automation tools

### How to Use

Scraping a YouTube video's comments takes about 10 seconds. No setup needed beyond the video URL.

1. Click **Try for free**
2. Enter the YouTube video URL, for example: `https://www.youtube.com/watch?v=dQw4w9WgXcQ`
3. Pick how many comments to fetch: 10, 20, 50, 100, 300, 500, or 1,000
4. Choose how to sort: **Top comments** or **Newest first**
5. Click **Run**
6. When done, preview or download your data from the Dataset tab

### Input

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "maxComments": "100",
  "sortBy": "top"
}
```

#### Input Fields

| Field         | Type   | Default | Description                                                                                         |
| ------------- | ------ | ------- | --------------------------------------------------------------------------------------------------- |
| `videoUrl`    | string | none    | YouTube video URL **(required)**. Supports `watch?v=`, `youtu.be/`, `/shorts/`, and `/embed/` links |
| `maxComments` | string | `"20"`  | How many comments to scrape. Options: `10`, `20`, `50`, `100`, `300`, `500`, `1000`                 |
| `sortBy`      | string | `"top"` | Comment sort order. `top` for YouTube's ranked comments, `newest` for chronological order           |

### Output

Each comment is saved as one item in the Dataset. The run summary goes to the Key-Value Store under `OUTPUT`.

**Comment item**

```json
{
  "commentId": "UgxABC123def456",
  "text": "This is exactly what I needed, thank you!",
  "authorName": "Jane Doe",
  "authorChannelUrl": "https://www.youtube.com/@janedoe",
  "authorProfileImageUrl": "https://yt3.ggpht.com/ytc/abc123...",
  "publishedAt": "2026-06-24",
  "publishedAtRaw": "2 days ago",
  "likeCount": 1240,
  "replyCount": 18,
  "hasReplies": true,
  "isReply": false,
  "parentCommentId": null,
  "isPinned": false,
  "isEdited": false,
  "videoId": "dQw4w9WgXcQ"
}
```

**Run summary**

```json
{
  "summary": {
    "videoId": "dQw4w9WgXcQ",
    "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "videoTitle": "Rick Astley - Never Gonna Give You Up",
    "channelName": "Rick Astley",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "viewCount": 1600000000,
    "totalCommentCount": 2300000,
    "successCount": 100,
    "failedCount": 0,
    "successRate": "100%",
    "totalCharged": 0.05,
    "startedAt": "2026-06-25T10:00:00.000Z",
    "finishedAt": "2026-06-25T10:00:05.000Z",
    "totalDurationSeconds": 5
  }
}
```

#### Output Fields

**Comment data**

| Field                   | Description                                                |
| ----------------------- | ---------------------------------------------------------- |
| `commentId`             | YouTube comment ID                                         |
| `text`                  | Full comment text                                          |
| `authorName`            | Display name of the comment author                         |
| `authorChannelUrl`      | Link to the author's channel                               |
| `authorProfileImageUrl` | Author's profile picture URL                               |
| `publishedAt`           | Publish date in `YYYY-MM-DD` format                        |
| `publishedAtRaw`        | Raw publish string from YouTube (e.g. `"2 days ago"`)      |
| `likeCount`             | Like count as an integer (`1240`, not `"1.2K"`)            |
| `replyCount`            | Number of replies on the comment                           |
| `hasReplies`            | `true` if the comment has at least one reply               |
| `isReply`               | `true` if the item is a reply to another comment           |
| `parentCommentId`       | ID of the parent comment, or `null` for top-level comments |
| `isPinned`              | `true` if the comment is pinned by the creator             |
| `isEdited`              | `true` if the comment was edited                           |
| `videoId`               | YouTube video ID the comment belongs to                    |

### Pricing

Pay per successfully scraped comment. Failed requests are free.

| Comments | Cost   | Est. time |
| -------- | ------ | --------- |
| 10       | $0.005 | ~2s       |
| 100      | $0.05  | ~5s       |
| 300      | $0.15  | ~15s      |
| 500      | $0.25  | ~20s      |
| 1,000    | $0.50  | ~40s      |

$0.0005 per comment.

For runs over 500 comments, set **No timeout** in Run options.

### Notes

- All video URL formats work: `watch?v=`, `youtu.be/`, `/shorts/`, and `/embed/`.
- Like counts are integers, not strings. `1240` instead of `"1.2K"`, ready to sort and filter without extra parsing.
- Sort by `top` to get YouTube's ranked comments, or `newest` to catch the freshest reactions first.
- Videos with comments disabled will return an error explaining no comment section was found.

### More Actors You Might Like

Built by the same team and backed by the same transparent pricing philosophy: no hidden attempts, no wasted credits, no charge for failed results.

| Actor                                                                                     | Description                                                                                                    |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| [YouTube Video Scraper](https://apify.com/apizy/youtube-video-scraper)                    | Scrape every video from a channel with views, durations, thumbnails, and insights.                             |
| [YouTube Video Detail Scraper](https://apify.com/apizy/youtube-video-detail-scraper)      | Full video metadata: views, likes, comments, keywords, duration, and engagement insights.                      |
| [YouTube Channel Scraper](https://apify.com/apizy/youtube-channel-scraper)                | Channel profiles with subscriber counts, engagement rates, contact info, and links.                            |
| [YouTube Channel Scraper Fast](https://apify.com/apizy/youtube-channel-scraper-innertube) | Same channel data as Channel Scraper but significantly faster. Better for high-volume and large-scale lookups. |
| [YouTube Transcript Scraper](https://apify.com/apizy/youtube-transcript-scraper)          | Extract the full transcript from any YouTube video, with optional timestamps per segment.                      |

### Get in Touch

Have questions, need custom scraping solutions, or want to integrate with your existing stack? We're here to help!

- **Email:** apizy.studio@gmail.com

We build custom scraping solutions tailored to your specific needs that are fast, reliable, and transparent.

# Actor input Schema

## `videoUrl` (type: `string`):

YouTube video URL to scrape comments from.

## `maxComments` (type: `string`):

Number of comments to scrape per run.

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

How to sort the comments.

• Top comments — YouTube's default ranking. Combines like count, reply engagement, recency, and creator interactions (pinned/hearted). High-quality comments surface first even if they're older.

• Newest first — Chronological order, most recent comments first. Useful for monitoring live activity or catching fresh reactions.

## Actor input object example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "maxComments": "20",
  "sortBy": "top"
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing one item per scraped comment.

## `output` (type: `string`):

Video info, success/fail counts, and total charge for this run.

## `pagination` (type: `string`):

Current page, total pages, and nextCursor to pass into the next run.

# 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 = {
    "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
};

// Run the Actor and wait for it to finish
const run = await client.actor("apizy/youtube-comment-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 = { "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }

# Run the Actor and wait for it to finish
run = client.actor("apizy/youtube-comment-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}' |
apify call apizy/youtube-comment-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apizy/youtube-comment-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Gn1qCGg1mIIVUeYlB/builds/qWFhowOnYisHcHo6K/openapi.json
