# 🔍 YouTube Comments Scraper — Bulk Comment Extractor (`nexgendata/youtube-comments-scraper`) Actor

Scrape YouTube comments from any video URL. Extract comment text, author, likes, replies, timestamps. No API key needed. Export to JSON, CSV, Excel. Perfect for sentiment analysis, market research, and content analysis.

- **URL**: https://apify.com/nexgendata/youtube-comments-scraper.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Social media, AI
- **Stats:** 7 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Comments Scraper — Extract All Comments, Replies & Engagement Data

Pull every comment + reply on a YouTube video at scale — author, timestamp, like count, reply chain, and reply count. Works on any public video URL or video-ID list. Built as a pay-per-result **alternative to** YouTube Data API v3 (heavily rate-limited), Brand24 ($79-499/mo), BuzzSumo ($99-499/mo), Mention, and manual export tools for sentiment analysis, audience research, and creator analytics.

### Why YouTube Comments Scraper Beats YouTube Data API, Brand24, BuzzSumo & Mention

| Feature | NexGenData YouTube Comments Scraper | YouTube Data API | Brand24 | BuzzSumo | Mention |
|---|---|---|---|---|---|
| Cost | $0.001 / comment, pay-per-result | Free but quota-capped at 10K units/day | $79-499 / month | $99-499 / month | $41-149 / month |
| Comments per video | Unlimited per run | ~100/page, quota-burn for deep videos | Plan-gated | Plan-gated | Plan-gated |
| Replies included | Yes — full reply chain | Yes (extra quota) | Limited | Limited | Limited |
| Like counts | Yes | Yes | Limited | Yes | Yes |
| Author handles | Yes | Yes | Yes | Yes | Yes |
| Multi-video batch | Yes — feed a video-ID list | DIY | Plan-gated | Plan-gated | Plan-gated |
| Bulk export | JSON / CSV / Excel | DIY | Plan-gated | Plan-gated | CSV |
| Auth required | Apify token | OAuth + API key + quota | Account + plan | Account + plan | Account + plan |
| Monthly minimum | None | None (quota walls) | $79+ | $99+ | $41+ |

Most creator-analytics + brand-monitoring teams pick this actor **instead of** wiring up the YouTube Data API because the quota cap kills any project past 5-6 deep videos a day. **Cheaper than** Brand24 + BuzzSumo for the video-comment slice and a **drop-in alternative to** Mention for YouTube-only monitoring.

### What You Get Per Comment

- `video_id`, `video_url`, `video_title`
- `comment_id`, `parent_id` (null for top-level)
- `author`, `author_channel_id`, `author_channel_url`
- `text`, `published_at`, `updated_at`
- `like_count`, `reply_count` (top-level only)
- `is_reply`, `is_owner_reply` (channel owner's response)
- `is_hearted` (creator-hearted)
- `is_pinned`

### Use Cases

- **Creator analytics** — pull every comment on a creator's last 50 videos for sentiment + topic analysis
- **Brand monitoring** — track every mention of your brand across product-review videos
- **Audience research** — surface frequently-asked questions across a niche for content planning
- **Competitor research** — see what audiences praise + complain about on competitor videos
- **Sentiment / NLP training** — bulk-export labeled comment data for model training
- **Influencer due diligence** — measure real engagement (vs view count) across a creator's catalog

### Quick Start (Python)

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/youtube-comments-scraper").call(run_input={
    "video_urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "max_comments_per_video": 5000,
    "include_replies": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["author"], item["text"], item["like_count"])
````

### Pricing — Pay Per Comment

- **Actor start:** $0.005
- **Comment:** $0.001

A 5,000-comment deep-dive on one video = $5.005. A 50-video weekly creator sweep at 1,000 comments each = $50.005. **No monthly minimum.**

### Related NexGenData Social + Video Actors

| Use case | Actor |
|----------|-------|
| YouTube transcript scraper (captions) | [youtube-transcript-scraper](https://apify.com/nexgendata/youtube-transcript-scraper?fpr=2ayu9b) |
| YouTube AI summarizer (transcripts + GPT) | [youtube-ai-summarizer](https://apify.com/nexgendata/youtube-ai-summarizer?fpr=2ayu9b) |
| Reddit scraper (posts + comments) | [reddit-scraper](https://apify.com/nexgendata/reddit-scraper?fpr=2ayu9b) |
| Reddit brand monitor (Brandwatch alt) | [reddit-brand-monitor](https://apify.com/nexgendata/reddit-brand-monitor?fpr=2ayu9b) |
| Reddit subreddit trends | [reddit-subreddit-trends](https://apify.com/nexgendata/reddit-subreddit-trends?fpr=2ayu9b) |
| Hacker News scraper (stories + comments) | [hacker-news-scraper](https://apify.com/nexgendata/hacker-news-scraper?fpr=2ayu9b) |
| Product Hunt daily launches | [product-hunt-launches-scraper](https://apify.com/nexgendata/product-hunt-launches-scraper?fpr=2ayu9b) |
| Indie Hackers product launches | [indie-hackers-products-tracker](https://apify.com/nexgendata/indie-hackers-products-tracker?fpr=2ayu9b) |
| Bilibili video search (China) | [bilibili-video-search](https://apify.com/nexgendata/bilibili-video-search?fpr=2ayu9b) |

### FAQ

**Q: Does it require a YouTube account or API key?**
A: No — it works on public videos via YouTube's own public endpoints. No OAuth, no Google Cloud project.

**Q: Replies fully captured?**
A: Yes. Set `include_replies: true` and every reply chain is flattened in the output with `parent_id` for threading.

**Q: How does it differ from the YouTube Data API?**
A: The official API has a 10K-units/day quota. Each `comments.list` call costs 1 unit and returns ~100 comments — so a 50K-comment video alone burns ~500 units. This actor has no daily cap; you pay per comment instead.

**Q: Maximum comments per video?**
A: No hard cap. Long-tail videos with 200K+ comments take longer (1-2 hours) but complete in a single run.

**Q: Sentiment analysis included?**
A: Not in this actor — use the reddit-brand-monitor actor (which has built-in sentiment) as a pattern, or pipe these comments into your own NLP.

***

### How NexGenData Pricing Works

Every NexGenData actor uses **pay-per-event** pricing — you only pay for results that actually land in your dataset. No monthly minimum, no seat fees, no surprise overage bills.

- **Actor Start:** a single-event charge each time you spin the actor up (scaled to memory size)
- **Result / item:** charged per item written to the default dataset
- **No charge** for retries, internal proxy rotation, or failed sub-requests — those are absorbed by the platform

### Apify Platform Bonus

New to Apify? Sign up with the NexGenData [referral link](https://www.apify.com/?fpr=2ayu9b) — you get free platform credits on signup (enough for several thousand free results) and you help fund the maintenance of this actor fleet.

### Integration Surface

Every actor in the NexGenData catalog can be triggered from:

- **Apify console** — point-and-click run
- **Apify API** — REST + webhooks
- **Apify Python / JS SDKs** — programmatic batch
- **Zapier, Make.com, n8n** — official integrations
- **MCP** — many actors are exposed as MCP tools for Claude / ChatGPT / Cursor agents
- **Schedules** — built-in cron for daily / weekly / monthly runs
- **Webhooks** — POST results to any HTTPS endpoint on dataset write

### Support

NexGenData maintains 260+ Apify actors and ships updates regularly. Bug reports via the Apify console issues tab get a response within 24 hours. Roadmap requests are welcome — high-demand features ship in the next version.

Home: [thenextgennexus.com](https://thenextgennexus.com)
Full catalog: [apify.com/nexgendata](https://apify.com/nexgendata?fpr=2ayu9b)

# Actor input Schema

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

List of YouTube video URLs to scrape comments from

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

Maximum number of comments to extract per video. Set to 0 for all comments.

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

Whether to include reply comments in addition to top-level comments

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

Sort order for comments. 'top' for most popular, 'newest' for most recent.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 100,
  "includeReplies": true,
  "sortBy": "top"
}
```

# 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"
    ],
    "maxComments": 100,
    "includeReplies": true,
    "sortBy": "top"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/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 = {
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxComments": 100,
    "includeReplies": True,
    "sortBy": "top",
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/youtube-comments-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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 100,
  "includeReplies": true,
  "sortBy": "top"
}' |
apify call nexgendata/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🔍 YouTube Comments Scraper — Bulk Comment Extractor",
        "description": "Scrape YouTube comments from any video URL. Extract comment text, author, likes, replies, timestamps. No API key needed. Export to JSON, CSV, Excel. Perfect for sentiment analysis, market research, and content analysis.",
        "version": "0.0",
        "x-build-id": "Mp41dJyHwMjStw2Zx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~youtube-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-youtube-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~youtube-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-youtube-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~youtube-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-youtube-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "List of YouTube video URLs to scrape comments from",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxComments": {
                        "title": "Max Comments Per Video",
                        "type": "integer",
                        "description": "Maximum number of comments to extract per video. Set to 0 for all comments.",
                        "default": 100
                    },
                    "includeReplies": {
                        "title": "Include Replies",
                        "type": "boolean",
                        "description": "Whether to include reply comments in addition to top-level comments",
                        "default": true
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "top",
                            "newest"
                        ],
                        "type": "string",
                        "description": "Sort order for comments. 'top' for most popular, 'newest' for most recent.",
                        "default": "top"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
