# YouTube Comments Scraper - Replies and Likes (`parseforge/youtube-comments-scraper`) Actor

Extract all comments and replies from YouTube videos. No API key required.

- **URL**: https://apify.com/parseforge/youtube-comments-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Videos, Social media, AI
- **Features:** Limited permissions
- **Stats:** 145 total users, 14 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.90 / 1,000 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/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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### YouTube Comments Scraper - Replies and Likes

**Scrape comments and replies from any YouTube video, up to a million per video.** Every comment comes with 17 fields: its text, author, likes, reply count and publish date among them. Optional AI enhancement adds 6 more. No API key or OAuth. Export to CSV, JSON, Excel, or XML.

**Pay per result:** $1.30 per 1,000 comments on the Free plan, down to $0.90 on Gold, plus a start fee of $0.001 per run. See [Pricing](#pricing).

YouTube's official API requires an app registration, OAuth, and imposes strict quotas that limit how many comments you can pull. This Actor reads the public comment feeds directly, filtered by video URL, and returns each comment and reply in one fixed schema. Optionally, enable AI enhancement to get sentiment, emotion, toxicity, and language detection for every comment.

| Who uses it | What they scrape YouTube for |
|---|---|
| Content creators | Which topics or phrases spark the most engagement in their video comments. |
| Market researchers | What audiences are saying about a brand, product, or trend across multiple videos. |
| Community managers | Flag toxic or highly emotional comments for moderation or response. |
| Data analysts | Build sentiment and emotion datasets from public YouTube discussions. |

### What it does

This Actor collects comments and replies from YouTube videos by URL, and returns each one as a flat row with optional AI-powered analysis.

Each top-level comment row has 17 fields: `type`, `commentId`, `parentId`, `videoId`, `videoUrl`, `authorName`, `authorId`, `authorUrl`, `authorThumbnailUrl`, `text`, `likeCount`, `publishedAt`, `publishedTimeText`, `isPinned`, `isVerified`, `replyCount` and `scrapedAt`. Reply rows have the same fields except `isPinned` (16), with `parentId` set to the comment they answer. With AI enhancement on, each analyzed row also gets `sentimentLabel`, `sentimentScore`, `confidence`, `toxicityScore`, `emotionLabel` and `language` (23 fields).

- 🧠 **AI-powered analysis (optional, paid plans):** Sentiment (positive/negative/neutral), emotion (joy, anger, sadness, etc.), toxicity score, and language detection per comment.
- 💬 **Replies included or excluded:** Choose to scrape only top-level comments or include replies, with a configurable maximum per comment.
- 📦 **Bulk extraction:** Scrape from multiple video URLs in one run, up to 1,000,000 comments per video.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with YouTube data

**📈 Track audience sentiment on a product launch.**

A brand manager runs the scraper on review and unboxing videos, enables AI analysis, and exports the sentiment breakdown to decide on messaging adjustments.

**🔍 Moderate comments at scale.**

A community manager scrapes comments from a popular channel, filters by high toxicity scores, and prioritises moderation actions.

**📊 Build a training dataset for NLP models.**

A data scientist collects millions of YouTube comments with AI-generated labels (sentiment, emotion, language) to train a custom classifier.

**💡 Identify trending topics in a niche.**

A content creator scrapes comments from competitor videos, groups by common phrases, and plans their next video around what viewers are asking.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API limits** | Bypass YouTube's quota restrictions and OAuth setup. |
| **AI signals** | Get sentiment, emotion, toxicity, and language without extra tools. |
| **Full reply tree** | Optionally scrape nested replies with a configurable max per comment. |
| **Flat schema** | Every comment and reply is a single row, ready for analysis. |

### How it compares

Compared to the popular YouTube Scraper, this actor focuses specifically on comments and replies with built-in AI analysis.

| Feature | ParseForge | YouTube Scraper |
|---|---|---|
| Scrapes comments and replies | Yes | Not listed |
| AI sentiment analysis | Yes | Not listed |
| AI emotion detection | Yes | Not listed |
| AI toxicity scoring | Yes | Not listed |
| AI language detection | Yes | Not listed |
| Scrapes video metadata | Not listed | Yes |
| Scrapes channel info | Not listed | Yes |

### Configure the run

Drive the Actor from one or more YouTube video URLs (supports youtube.com/watch, youtu.be, and youtube.com/shorts). `maxItems` caps the rows per video, counting comments and replies together. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxItems": 10
}
```

A larger pull:

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxItems": 200
}
```

### Pricing

Pay per event. The price falls as your Apify plan rises:

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Result (one comment or reply row), per 1,000 | $1.30 | $1.25 | $1.20 | $0.90 |
| Actor start, once per run per GB of memory | $0.001 | $0.000962 | $0.000926 | $0.00089 |
| AI enhancement, per 1,000 analyzed comments (only when AI Enhancement is on) | $2.50 | $2.33 | $2.17 | $2.00 |

The default run memory is 512 MB, so the start fee is charged once per run. AI enhancement is charged only for comments the analysis succeeds on.

| Results collected (Free plan, no AI) | Approximate cost |
|---|---|
| 100 results | $0.13 |
| 1,000 results | $1.30 |
| 10,000 results | $13.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 100 results per video, and AI enhancement is turned off for them. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per video.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [YouTube Comments Scraper](https://apify.com/parseforge/youtube-comments-scraper?fpr=vmoqkp).
3. Set your inputs, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to YouTube through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/youtube-comments-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no comments?**

Check that the video URL is correct and publicly accessible. Some videos have comments disabled or are private. Also verify that maxItems is set high enough.

**The AI analysis is not running.**

Ensure the 'AI Enhancement' toggle is enabled in the input settings. AI analysis only runs when this option is turned on, and only on paid Apify plans.

**Replies are not being scraped.**

Make sure 'Include Replies' is set to true. Replies are collected after the top-level comments, inside the same maxItems cap, so on a video with more top-level comments than maxItems no replies fit. Raise maxItems to leave room for them.

**The run is taking too long.**

Reduce maxItems or maxRepliesPerComment. AI analysis also increases run time; disable it if speed is critical.

**I get an error about invalid URL.**

Only use URLs in the formats: https://www.youtube.com/watch?v=..., https://youtu.be/..., or https://www.youtube.com/shorts/... Remove any extra parameters or playlist IDs.

### FAQ

| Question | Answer |
|---|---|
| Do I need a YouTube API key? | No. This scraper reads the public comment feeds directly, so no API key or OAuth is required. |
| Can I scrape comments from a live stream? | Yes, as long as the video is publicly accessible and has comments enabled. The scraper reads the current comment feed. |
| What video URL formats are supported? | Standard youtube.com/watch?v=..., youtu.be/..., and youtube.com/shorts/... URLs are all supported. |
| How many comments can I scrape per run? | Up to 1,000,000 per video on a paid plan (100 on the Free plan), set with the maxItems field. |
| Does the AI analysis cost extra? | Yes. It is billed as a separate event, $2.50 per 1,000 analyzed comments on the Free plan down to $2.00 on Gold, on top of the result price. It needs no API key of your own, and it is available on paid plans only. |
| Can I scrape replies to comments? | Yes. Enable the 'Include Replies' option and set the max replies per comment (default 100, up to 1000). |
| What fields are returned for each comment? | 17 fields per comment: text, author name, channel ID, channel URL and avatar, like count, reply count, publish date (timestamp and text), pinned and verified flags, and the comment, parent and video IDs. Replies have 16 (no pinned flag). AI enhancement adds 6: sentiment label and score, confidence, toxicity score, emotion and language. |
| Can I scrape comments from multiple videos at once? | Yes. Provide multiple video URLs in the startUrls array, and the scraper will process them sequentially in one run. |
| Is there a limit on the number of videos I can input? | No hard limit. The maxItems setting applies to each video separately, so the run returns up to maxItems rows per video. |
| What export formats are available? | You can export the dataset as CSV, JSON, Excel, or XML directly from the Apify platform. |

### Next step

Each comment row carries its video and its author, so you can keep going with the other ParseForge YouTube Actors:

- [YouTube Transcript Scraper - Timestamps, SRT and Metadata](https://apify.com/parseforge/youtube-transcript-scraper?fpr=vmoqkp): put the `videoUrl` column in `startUrls` to read what was said in the video people are commenting on.
- [YouTube Scraper - Search, Channels and Playlists](https://apify.com/parseforge/youtube-scraper?fpr=vmoqkp): put the `authorUrl` column in `startUrls` to list the videos of the channels that comment. It also works the other way: run a search, channel or playlist there first and paste its `url` column here.
- [YouTube Shorts Scraper - 35 Fields Per Short](https://apify.com/parseforge/youtube-shorts-scraper?fpr=vmoqkp): put the `authorUrl` column in `channels` to get the Shorts of those commenters' channels. Use the `@handle` links: the Shorts Scraper does not read `/channel/UC...` links yet.
- [YouTube Channel Scraper - Stats and Video List](https://apify.com/parseforge/youtube-channel-scraper?fpr=vmoqkp): put the `authorUrl` column (or `authorId`, the commenter's `UC...` channel ID) in `startUrls` to get the subscribers, total views and latest uploads of the people who comment.

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Google LLC. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

Enter YouTube video URLs to scrape comments from. Supports youtube.com/watch, youtu.be, and youtube.com/shorts URLs.

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

How many comments to collect per run.

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

Whether to include replies to comments. If false, only main comments will be scraped.

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

Maximum number of replies to fetch per comment. Only used when Include Replies is enabled.

## `aiEnhancement` (type: `boolean`):

Enable AI-powered analysis for each comment. Adds sentiment analysis, emotion detection, toxicity scoring, and language detection. Note: This uses AI processing and may increase run time.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxItems": 10,
  "includeReplies": true,
  "maxRepliesPerComment": 100,
  "aiEnhancement": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Complete dataset with all comment fields including AI analysis

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

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/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 = {
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
    "maxItems": 10,
}

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

```

## MCP server setup

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