# YouTube Comments Scraper: Comments, Replies, Likes (`arcadium/youtube-comments`) Actor

YouTube comments and replies for video URLs (text, likes, reply count, date, pinned, hearted flags) at $1.80 per 1,000 comments. Top or newest order, date cut-off, no author data. Free error rows.

- **URL**: https://apify.com/arcadium/youtube-comments.md
- **Developed by:** [Arcadium Data](https://apify.com/arcadium) (community)
- **Categories:** Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.81 / 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.
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

## YouTube Comments Scraper: Comments, Replies, Likes

Give it YouTube video or Shorts links and it returns one JSON row per comment: text, likes, reply count, date, pinned, creator-heart and by-creator flags, with the video title and channel. Replies are optional and come right after their comment. $1.80 per 1,000 comments; you pay only for rows you get.

**Why this actor**

- Top or newest order, a date cut-off, a cap per video and per run.
- Input names of the leading comment actors are accepted (`startUrls`, `maxComments`, `sortCommentsBy`, `oldestCommentDate`, `sort`, `includeReplies`, `maxItems`).
- Videos with comments turned off, private or missing videos come back as free error rows that say why.
- No personal data: comment authors' names, handles and channels are never collected, and @mentions in the text are replaced.

Built by Arcadium Data: public data, dated and agent-ready, never personal data.

### Use with AI agents

The actor takes plain JSON and returns one flat row per comment, so an AI agent or MCP client (for example through [mcp.apify.com](https://mcp.apify.com)) can call `arcadium/youtube-comments` directly. Comments cost $1.80 per 1,000 on the Free plan.

Input example for "the 100 top comments of a video":

```json
{ "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"], "maxComments": 100 }
```

"Newest comments of the last week with their replies":

```json
{ "urls": ["https://youtu.be/dQw4w9WgXcQ"], "sortCommentsBy": "NEWEST_FIRST", "oldestCommentDate": "7 days", "includeReplies": true, "maxComments": 500 }
```

### What you get

| Field | What it holds |
| --- | --- |
| `commentId`, `commentUrl` | Stable comment id and a link that opens the video at this comment. |
| `text` | The comment. Emails, phones, profile links and @mentions are replaced. |
| `likeCount` | Likes, rounded by YouTube above 1,000. |
| `replyCount` | Replies to a top-level comment. |
| `publishedText`, `publishDate` | "3 weeks ago" and the approximate date it means. |
| `isReply`, `parentCommentId` | Replies point at their comment. |
| `isPinned`, `isHearted`, `isByChannelOwner`, `isAuthorVerified` | Creator signals. |
| `position` | Rank of the comment in the chosen order. |
| `videoId`, `videoTitle`, `channelName`, `channelId`, `videoCommentCountText` | The video and its channel. |

Output example:

```json
{
  "rowType": "comment",
  "platform": "youtube",
  "commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg",
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzKYksqeQ5gA3t0g0F4AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "videoCommentCountText": "2.4M",
  "text": "I Rick rolled my entire French class with a fake quiz link.",
  "publishedText": "6 years ago",
  "publishDate": "2020-11-01",
  "publishDateIsApprox": true,
  "isEdited": true,
  "likeCount": 106000,
  "replyCount": 648,
  "isReply": false,
  "parentCommentId": null,
  "isByChannelOwner": false,
  "isAuthorVerified": false,
  "isHearted": false,
  "isPinned": false,
  "position": 1,
  "sortedBy": "top",
  "scrapedAt": "2026-10-31T04:00:00.000Z"
}
```

### Input

| Field | What it does |
| --- | --- |
| `urls` | Video or Shorts URLs, or video ids. |
| `maxComments` | Rows per video, comments plus replies (default 100). |
| `sortCommentsBy` | `TOP_COMMENTS` (default) or `NEWEST_FIRST`. |
| `includeReplies`, `maxRepliesPerComment` | Replies after each comment (default off, 20 each). |
| `oldestCommentDate` | Skip older comments (approximate, see Limitations). |
| `maxItems` | Cap for the whole run. |

### Pricing

You pay per comment or reply delivered, at the price of your Apify plan. Error rows and repeats are free.

| Apify plan | Per 1,000 comments |
| --- | --- |
| Free | $1.80 |
| Starter (Bronze) | $1.35 |
| Scale (Silver) | $1.08 |
| Business (Gold) | $0.81 |
| Platinum | $0.81 |
| Diamond | $0.81 |

Plus a one-off $0.001 per GB of memory when a run starts. Set a maximum cost per run in the Apify run options and the actor stops before it goes over.

### Related actors

- [YouTube Scraper: Videos, Shorts, Channels, Search](https://apify.com/arcadium/youtube-videos)
- [YouTube Transcript & Subtitles Scraper: Text, SRT, VTT](https://apify.com/arcadium/youtube-transcripts)

### Use cases

- Audience research: what viewers ask, praise and complain about under your or a competitor's videos.
- Product feedback: comments under review videos of a product, newest first, every day.
- Sentiment and topic analysis: clean text with likes as a weight, no personal data to scrub.
- Agents: "what do people say about this video" before writing a summary.

### Limitations

- YouTube shows comment dates as "3 weeks ago", so `publishDate` and the `oldestCommentDate` cut are approximate (to the unit shown).
- Like counts above 1,000 are rounded by YouTube ("106K").
- No author names, handles, avatars or author channels, by design. Old replies may start with the replied-to person's display name as plain text without an @; those are not always caught.
- Comments are read as an anonymous visitor sees them; held-for-review and members-only comments are not visible.

### Privacy

Public data only, read the way an anonymous visitor's browser reads it. No login, no cookies, no account. Comment authors are never collected: no names, handles, channel ids or avatars. @mentions of other users become `@user`; emails, phone numbers and profile links in the text are replaced. The channel name in each row is the video's publisher.

### FAQ

**Can I get the comment author?**
No. Author names and handles are personal data and are never output; `isByChannelOwner` and `isAuthorVerified` say whether the creator or a verified channel wrote it.

**A video returned nothing. Why?**
Look at its error row: comments may be turned off, or the video is private or removed. Error rows are free.

# Actor input Schema

## `urls` (type: `array`):

Video or Shorts URLs (https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://youtu.be/..., https://www.youtube.com/shorts/...) or bare 11-character video ids.

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

Rows per video (comments plus replies), 1 to 100,000 (default 100).

## `sortCommentsBy` (type: `string`):

Values: TOP_COMMENTS (default, YouTube's Top order), NEWEST_FIRST.

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

Adds the replies of each comment right after it (isReply true, parentCommentId set). Replies count toward maxComments. Off by default.

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

With replies on: replies per comment, 1 to 10,000 (default 20).

## `oldestCommentDate` (type: `string`):

Skip comments older than this: YYYY-MM-DD or a relative age such as "7 days". YouTube shows comment dates as "3 weeks ago", so the cut is approximate (to the unit shown). With NEWEST_FIRST the video stops at the first older comments.

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

Stops the run after this many comments across all videos, 1 to 1,000,000. A cost cap; leave empty for no limit.

## `includeErrorRows` (type: `boolean`):

Adds a free row (rowType error, with a code and message) for every video that is private, missing or has comments turned off. On by default.

## `maxRetries` (type: `integer`):

Advanced. How often a request is retried after a temporary error, 0 to 10.

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

Advanced. Leave empty: the actor starts on datacenter proxies and moves to residential when YouTube asks to confirm you are not a bot.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 20,
  "includeErrorRows": true,
  "maxRetries": 5
}
```

# Actor output Schema

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

All rows of this run in the default dataset.

## `view_overview` (type: `string`):

No description

## `view_errors` (type: `string`):

No description

## `record_stats` (type: `string`):

Requests, data volume, retries, proxy tiers and cost per comment for this 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 = {
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxComments": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("arcadium/youtube-comments").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 = {
    "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxComments": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,arcadium/youtube-comments"
        }
    }
}
```

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/3MGVfYogBGY4XxDvr/builds/m0IZf0J4AltjNCiA7/openapi.json
