# YouTube Comments Scraper: Comments & Replies, No API Key (`pulsedata/youtube-comments-scraper`) Actor

Extract all comments and replies from YouTube videos, Shorts or live VODs: text, author, channel, likes, reply count, heart by creator, pinned, timestamps. Top or newest first, thousands of comments per video, plus video title & channel. No YouTube API key or quota. $1 per 1,000 comments.

- **URL**: https://apify.com/pulsedata/youtube-comments-scraper.md
- **Developed by:** [PulseData](https://apify.com/pulsedata) (community)
- **Categories:** Social media, Videos, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 comment scrapeds

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

YouTube Comments Scraper extracts comments and, optionally, their replies from YouTube videos, Shorts and live stream recordings. Each comment is one flat JSON item with text, author, author channel, like count, reply count, creator heart, pinned status and timestamps, plus the video title and channel. It costs $1 per 1,000 comments, replies included.

No YouTube Data API key is needed and there is no daily quota: the actor reads the same comment feed the YouTube website uses.

### Features

- **Export all comments from a YouTube video** to JSON, CSV or Excel. Set `maxCommentsPerVideo` to 0 for no cap.
- **Scrape YouTube comment replies**: each reply carries `parentCommentId`, so threads can be rebuilt.
- **Sort YouTube comments by top or newest** with `sortBy`.
- **Scrape comments from YouTube Shorts** and live stream recordings, not only regular videos.
- **Scrape comments for a list of YouTube videos** in one run, several videos in parallel.
- **Monitor new comments on a YouTube video**: with `onlyNewComments` a scheduled run returns and charges only comments and replies it has not delivered before.
- Flags for pinned comments, comments hearted by the creator, edited comments, verified authors and replies from the channel owner.
- Accepts watch URLs, `youtu.be` links, Shorts, live and embed URLs, or bare 11-character video IDs.

### Use cases

- **Sentiment and audience research**: what viewers say about a product, launch, creator or ad, exported as a dataset for NLP or an LLM.
- **Community management**: collect the questions viewers ask so they can be answered or turned into an FAQ.
- **Moderation**: pull the newest comments and replies to review spam and scam replies.
- **Competitor monitoring**: schedule a daily run with `sortBy: "newest"` on a competitor's latest videos.
- **Research datasets**: comments with like counts and timestamps for topic clustering or classification.

### Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://www.youtube.com/shorts/dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 500,
  "sortBy": "top",
  "includeReplies": true,
  "maxRepliesPerComment": 20,
  "includeVideoInfo": true
}
```

| Field | Type | Default | What it does |
|---|---|---|---|
| `videoUrls` | array | required | Video URLs or IDs, one per line. |
| `maxCommentsPerVideo` | integer | `100` | Top-level comments per video; 0 means all. Replies are counted separately. |
| `sortBy` | string | `top` | `top` (YouTube's ranking) or `newest`. |
| `includeReplies` | boolean | `false` | Also fetch the replies of each comment that has replies. |
| `maxRepliesPerComment` | integer | `50` | Cap per thread; 0 means all replies. |
| `includeVideoInfo` | boolean | `true` | Add `videoTitle`, `channelName` and `channelUrl` to every comment (one small extra request per video). |
| `concurrency` | integer | `3` | Videos processed in parallel, 1 to 10. |
| `proxyConfiguration` | object | no proxy | Optional Apify Proxy settings. |
| `onlyNewComments` | boolean | `false` | Monitor mode: output and charge only comments and replies not delivered on an earlier run. |
| `monitorStoreName` | string | empty | Key-value store that remembers delivered comments. Empty means a name derived from the videos and options. |

### Monitor new comments on a YouTube video

Turn on `onlyNewComments` with `sortBy: "newest"` to get only the comments posted since your last run:

```json
{ "videoUrls": ["https://www.youtube.com/watch?v=aircAruvnKk"], "sortBy": "newest", "maxCommentsPerVideo": 500, "includeReplies": true, "onlyNewComments": true }
```

The actor remembers the ID of every comment and reply it delivers in a named key-value store in your Apify account. On the next run those are neither output nor charged. The first run has no history yet: it returns every comment up to the limits and fills the store.

How to set up new-comment alerts (a ready task is on the example page [Monitor new comments on a YouTube video](https://apify.com/pulsedata/youtube-comments-scraper/examples/monitor-new-youtube-comments)):

1. Save the input above as an Apify task.
2. Add an [Apify schedule](https://docs.apify.com/platform/schedules) for the task, daily or weekly.
3. Add an integration on the task (email, Slack, Google Sheets, Make, Zapier or a webhook) that fires when a run succeeds. Each run's dataset then holds only the new comments.

Details:

- With `sortBy: "newest"` a run stops reading a video at the first known comment that is not pinned. With `top` it reads every page up to `maxCommentsPerVideo` and drops known comments.
- Replies are checked only under new comments, so a new reply under an older comment is not picked up.
- Without `monitorStoreName` each different input keeps its own history; the run log names the store.
- Schedule one run per store; two parallel runs can both deliver the same new comment.

### Output

```json
{
  "commentId": "Ugwedfi--9yZVC0eefl4AaABAg",
  "videoId": "aircAruvnKk",
  "text": "I study mathematics, physics and architecture. …",
  "author": "@kummer45",
  "authorChannelId": "UCqArZkt3NAOU0tcgIi6xmFQ",
  "authorUrl": "https://www.youtube.com/@kummer45",
  "authorThumbnail": "https://yt3.ggpht.com/…",
  "authorIsVerified": false,
  "authorIsChannelOwner": false,
  "publishedTimeText": "7 years ago (edited)",
  "publishedAt": "2019-08-21T14:03:23.423Z",
  "isEdited": true,
  "likeCount": 13000,
  "replyCount": 166,
  "isHearted": false,
  "isPinned": false,
  "isReply": false,
  "parentCommentId": null,
  "url": "https://www.youtube.com/watch?v=aircAruvnKk&lc=Ugwedfi--9yZVC0eefl4AaABAg",
  "videoTitle": "But what is a neural network? | Deep learning chapter 1",
  "channelName": "3Blue1Brown",
  "channelUrl": "https://www.youtube.com/@3blue1brown"
}
```

Notes on the data:

- `publishedAt` is computed from YouTube's relative time ("7 years ago"), so it is approximate. `publishedTimeText` keeps the original text.
- `likeCount` is parsed from YouTube's display value, so large counts are rounded the way YouTube shows them (13K becomes 13000).
- Replies have `isReply: true` and the parent's ID in `parentCommentId`.
- A video with comments turned off produces one item with `error: "COMMENTS_DISABLED"`. A video that fails for another reason produces an item with the error message.

### Pricing

Pay per event: **$0.001 per comment** (`comment-scraped`), which is $1 per 1,000. Top-level comments and replies are priced the same. Error items, such as videos with comments turned off, are not charged.

Worked example: 20 videos with `maxCommentsPerVideo: 500` and replies off return at most 10,000 comments, so the run costs at most $10. With `includeReplies` on and `maxRepliesPerComment: 20`, a video whose 500 top comments have 1,500 replies in total (within the per thread cap) returns 2,000 items and costs $2.

In monitor mode only new comments and replies are charged. A daily run that finds 12 new comments and 3 new replies costs 15 x $0.001 = $0.015. There is no per-run event, so a run with nothing new costs nothing.

### FAQ

**Do I need a YouTube API key?**
No. The Data API limits comment reads through its daily quota; this actor reads the public comment feed instead.

**How many comments can I export from one video?**
Set `maxCommentsPerVideo` to 0 to take everything YouTube serves. Large videos take a while. There are internal safety limits of 5,000 pages of top-level comments per video and 200 pages of replies per thread.

**Do I need proxies?**
Usually not. If requests keep failing and you have not configured a proxy, the actor retries through Apify residential proxy.

**What can it not do?**
It cannot read comments on private or removed videos, or on videos where comments are turned off. It does not return comments from YouTube community posts, and it does not take channel URLs; pass video URLs. To get all video URLs of a channel, run the [YouTube Channel Videos Scraper](https://apify.com/pulsedata/youtube-channel-videos-scraper) first.

**How do I export or schedule it?**
Download the dataset as JSON, CSV or Excel, call the actor through the Apify API or SDKs, schedule runs, or connect it to Google Sheets, Make, Zapier or n8n. It is also usable as an MCP tool by AI agents.

### Use it from Claude, ChatGPT or Cursor (Apify MCP server)

The actor can be called as a tool by any AI assistant that speaks the Model Context Protocol. Add the Apify MCP server to your client with this URL, which loads only this actor as a tool:

```text
https://mcp.apify.com?tools=pulsedata/youtube-comments-scraper
```

You sign in to Apify on first connection, then ask in plain language, for example "collect the 1,000 top comments on this video and list the most common complaints". Billing is the same as a normal run.

### Paying from an AI agent without an Apify account (x402 and Skyfire)

An agent can buy a prepaid, spend-capped Apify token at [Apify AGI](https://agi.apify.com), paid in USDC through [x402](https://docs.apify.com/platform/integrations/x402) or from a [Skyfire](https://docs.apify.com/platform/integrations/skyfire) wallet, and use it for both the API and the MCP server. This actor runs with limited permissions, so it works with these tokens. The smallest token is $1, tokens expire 14 days after purchase, and Apify marks agentic payments as experimental.

### Related actors

- [YouTube Scraper](https://apify.com/pulsedata/youtube-scraper): find the videos to analyse through search, channels or playlists, with views and likes.
- [YouTube Channel Videos Scraper](https://apify.com/pulsedata/youtube-channel-videos-scraper): list every video of a channel, then feed the URLs here.
- [YouTube Transcript Scraper](https://apify.com/pulsedata/youtube-transcript-scraper): what was said in the video, to set against what viewers wrote.
- [Google Play Reviews Scraper](https://apify.com/pulsedata/google-play-reviews-scraper): user feedback on an app, for the same kind of sentiment analysis.
- [App Store Reviews Scraper](https://apify.com/pulsedata/app-store-reviews-scraper): the iOS side of app feedback.

# Actor input Schema

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

Video URLs (watch, youtu.be, Shorts, live, embed) or bare 11-character video IDs – one per line.

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

Top-level comments to collect per video (replies are counted separately). 0 = all.

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

`top` = YouTube's ranking (default), `newest` = newest first.

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

Also fetch the replies of each comment (one extra request per comment thread that has replies).

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

0 = all replies.

## `includeVideoInfo` (type: `boolean`):

Adds videoTitle, channelName and channelUrl to every comment (one small extra request per video).

## `concurrency` (type: `integer`):

Videos processed in parallel.

## `onlyNewComments` (type: `boolean`):

Output and charge only comments this monitor has not delivered on an earlier run. The comment IDs are remembered in a named key-value store in your account, so a scheduled daily or weekly run returns just the comments posted since the last run. Replies count too. With "Sort by: newest" the run stops reading a video at the first comment it already knows; replies are checked only under new comments. The first run returns everything and fills the store.

## `monitorStoreName` (type: `string`):

Name of the key-value store that remembers delivered comments. Leave empty to name it after the run's targets and filters, so each different input keeps its own history. Set a name to share one history between inputs, or to start over by picking a new one. Letters, digits and hyphens.

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

Usually not required. Enable Apify Proxy if YouTube starts rate-limiting your runs.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "maxCommentsPerVideo": 100,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 50,
  "includeVideoInfo": true,
  "concurrency": 3,
  "onlyNewComments": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Comments stored in the default dataset (JSON/CSV/Excel via the dataset API).

# 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=aircAruvnKk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pulsedata/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=aircAruvnKk"] }

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

```

## MCP server setup

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