# YouTube Comments Scraper | Comments & Replies by URL (`genial_candlestand/youtube-comments-and-replies-scraper`) Actor

Get YouTube comments and replies for videos and Shorts: comment text, exact like count, reply count, author, pinned/hearted flags and date. Many URLs per run, newest-first for full coverage, no login or API key.

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

## Pricing

from $0.25 / 1,000 comment or replies

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 by URL

![YouTube Comments Scraper | Comments & Replies by URL](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/youtube-com-comments-and-replies-banner-2af6e57b.png)

This actor returns the comments and replies of YouTube videos and Shorts as one dataset row each. Every row has the comment text, the like count, the reply count, the author handle and channel link, pinned and hearted flags, and an approximate publish date. It needs no login, cookies or YouTube API key.

### What does YouTube Comments Scraper do?

You give it YouTube video or Shorts URLs. For each video it reads the comment section, optionally follows the reply threads, and writes one row per comment or reply. Replies point to their parent through `parentCommentId`, and every row carries the video context (`videoId`, `videoTitle`, `channelName`, `commentsCount`).

It is meant for marketers doing audience research, creators and agencies moderating comments, researchers building text datasets, and AI agents that need to know what people say about a video.

### How to scrape YouTube comments and replies

![How YouTube Comments Scraper works: Reads the video page for its title and comments token; Pages the comment section in Top or Newest order; Opens reply threads up to your per-thread cap; Returns one ](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/youtube-com-comments-and-replies-how-d47769c9.png)

1. Open the actor in Apify Console and paste one or more video or Shorts URLs into **Video or Shorts URLs**.
2. Set how many comments per video you want (`0` = all), and whether to include replies.
3. Pick the order: Top comments or Newest first. Optionally set **Only comments newer than** or a total row limit.
4. Click **Start** and download the dataset as JSON, CSV, Excel or via the API.

### How much does it cost to scrape YouTube comments?

Price per event by Apify plan:

| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| Comment or reply | $0.36 per 1,000 | $0.324 per 1,000 | $0.288 per 1,000 | $0.252 per 1,000 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

A test run with the API example input below returned 121 rows in 22 s.

- **Comment or reply:** $0.00036 each, about **$0.36 per 1,000 rows** on the Free plan.
- **Actor start:** $0.00005 per run (per GB of memory).

Videos without comments and skipped URLs are free. Costs on the Free plan, start fee included:

| Scenario | Rows | Cost |
|---|---|---|
| 100 top-level comments of one video, no replies | 100 | about $0.036 |
| The example input below (2 videos, 100 comments, up to 10 replies each) test run | 121 | about $0.044 |
| One video, 1,000 comments and replies | 1,000 | about $0.36 |
| Ten videos, 1,000 rows each | 10,000 | about $3.60 |

### Input

![YouTube Comments Scraper input example: Video or Shorts URLs, Max comments per video, Include replies, Max replies per comment, Sort comments by](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/youtube-com-comments-and-replies-input-aac342f3.png)

| Field | Meaning |
|---|---|
| `startUrls` (required) | Video URLs: `watch?v=`, `youtu.be/`, `/shorts/`, `/live/`, `/embed/`, `m.youtube.com`, or a bare 11-character ID |
| `maxCommentsPerVideo` | Top-level comments per video, default 100, `0` = all |
| `includeReplies` | Also fetch replies, default on |
| `maxRepliesPerComment` | Replies per thread, default 10, `0` = all |
| `sort` | `top` (default, about 90% of all comments) or `newest` (reaches every comment; falls back to Top with a warning if YouTube offers no Newest order for a video) |
| `oldestCommentDate` | Skip older rows: `2026-10-01` or a relative age like `7 days`. With Newest, paging stops at the first older comment; pinned comments are kept regardless of date |
| `maxItems` | Total row cap for the whole run |
| `proxyConfiguration` | Apify datacenter proxy by default; residential is not needed |

Example input:

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
    { "url": "https://www.youtube.com/shorts/41UzbuW6wJs" }
  ],
  "maxCommentsPerVideo": 100,
  "includeReplies": true,
  "maxRepliesPerComment": 10,
  "sort": "top"
}
```

### What data can you extract from YouTube comments?

![YouTube Comments Scraper output example: Comment, Author, Likes, Replies, Reply, Pinned](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/youtube-com-comments-and-replies-output-fc154aa2.png)

One row is one comment or one reply. Main fields:

| Field | Description |
|---|---|
| `commentId`, `parentCommentId`, `isReply` | Identity and thread link (`parentCommentId` is null for top-level comments) |
| `text` | Comment text in its original language |
| `likeCount`, `replyCount` | Likes (exact below 1M) and replies of the thread |
| `isPinned`, `isHearted`, `isEdited` | Comment flags |
| `author`, `authorUrl`, `authorChannelId`, `authorAvatarUrl` | Author handle, channel link, ID and avatar |
| `authorIsVerified`, `authorIsChannelOwner` | Verified badge, creator comment or reply |
| `publishedTimeText`, `publishedAt` | YouTube's relative date and an approximate ISO date |
| `videoId`, `videoUrl`, `videoTitle`, `channelName`, `channelId`, `commentsCount` | The video the comment belongs to |
| `url`, `scrapedAt` | Link to the comment and scrape time |

Example row (shortened):

```json
{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugw10bSluCDSZMIxUSB4AaABAg",
  "commentId": "Ugw10bSluCDSZMIxUSB4AaABAg",
  "parentCommentId": null,
  "isReply": false,
  "text": "Let’s put the meme aside, this is actually a banging song.",
  "author": "@LK-ht7qz",
  "likeCount": 220926,
  "replyCount": 613,
  "isPinned": false,
  "isHearted": false,
  "publishedTimeText": "6 years ago",
  "publishedAt": "2020-11-02T12:59:34.719Z",
  "videoId": "dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "commentsCount": 2461240,
  "scrapedAt": "2026-11-03T00:59:42.712Z"
}
```

### Use cases

- **Sentiment and audience research:** collect the top comments of several videos and analyse text and likes.
- **Complete export or archive:** use `sort: newest` with `maxCommentsPerVideo: 0` and `maxRepliesPerComment: 0` to export every comment and reply YouTube shows.
- **Monitoring new comments:** schedule a run with `sort: newest` and `oldestCommentDate: "1 day"`.
- **Shorts comments:** pass Shorts URLs with `includeReplies: false` for a fast list of top-level comments.
- **Moderation and engagement:** filter rows by `isPinned`, `isHearted`, `authorIsChannelOwner` and `likeCount`.

### Limitations

- Dates are relative on YouTube ("6 years ago"), so `publishedAt` is approximate, precise to the unit only.
- Like counts of 1 million and above are rounded (for example 1000000).
- Only video and Shorts URLs are supported. Channel, playlist and search URLs are skipped with a warning when at least one other URL is a video; if none of the URLs is a video or Shorts URL, the run fails with an input error.
- Videos with comments turned off, live streams that are running now, and unavailable videos return no rows; the reason is written to the log and the run continues.
- With Top order YouTube exposes about 90% of all comments. Newest reaches every comment, but if YouTube gives no Newest option for a video, the actor falls back to Top for it and logs a warning.
- With `oldestCommentDate`, replies are fetched only for kept top-level comments, so a new reply under an older dropped comment is not returned. With Newest, pinned comments are exempt from the date stop and appear even if older than the cutoff.
- `text` can be empty for media-only comments, and some author or video fields can be null.

### Tips and troubleshooting

- For every comment, set `sort: newest`, `maxCommentsPerVideo: 0` and `maxRepliesPerComment: 0`.
- For only new comments, combine `sort: newest` with `oldestCommentDate`; with Top order the date only filters rows and does not stop paging early.
- A run that fails at once with an input error means none of the URLs is a video or Shorts URL: use `watch?v=`, `youtu.be/` or `/shorts/` links.
- Fewer rows than expected? Check the log: comments turned off, a live stream, or an unavailable video give 0 rows with a reason. Also check `maxItems` and the per-thread reply cap.
- Newest order falling back to Top shows as a warning in the log.
- The default datacenter proxy is enough; residential proxy is not needed.

### API, MCP and integrations

Run the actor from your code with the same JSON input as in Console. Your API token is in [Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("genial_candlestand/youtube-comments-and-replies-scraper").call(run_input={
    "startUrls": [
        {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
        {"url": "https://www.youtube.com/shorts/41UzbuW6wJs"},
    ],
    "maxCommentsPerVideo": 20,
    "maxRepliesPerComment": 3,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('genial_candlestand/youtube-comments-and-replies-scraper').call({
    "startUrls": [
        {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
        {"url": "https://www.youtube.com/shorts/41UzbuW6wJs"},
    ],
    "maxCommentsPerVideo": 20,
    "maxRepliesPerComment": 3,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**HTTP** — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: [run asynchronously](https://docs.apify.com/api/v2/act-runs-post)):

```bash
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~youtube-comments-and-replies-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},{"url":"https://www.youtube.com/shorts/41UzbuW6wJs"}],"maxCommentsPerVideo":20,"maxRepliesPerComment":3}'
```

**AI agents (MCP).** Add the actor as a tool of the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Claude Code:

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

Claude Desktop, Cursor or VS Code: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/youtube-comments-and-replies-scraper"}}}`. Then ask, for example:

- "Get the 100 newest comments of youtube.com/watch?v=dQw4w9WgXcQ without replies"
- "Export all comments and replies of https://youtu.be/xYLmZFZOTa8"
- "Get top-level comments from the last 7 days for this YouTube Short"

**Integrations.** Run it on a schedule with [Apify Schedules](https://docs.apify.com/platform/schedules) and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see [Apify integrations](https://docs.apify.com/platform/integrations).

### FAQ

**Is it legal to scrape YouTube comments?**<br>
The actor reads comments that YouTube shows publicly without login. Comments contain personal data such as handles, so you are responsible for using the data in line with the law (such as GDPR) and YouTube's terms.

**Do I need a YouTube API key or login?**<br>
No.

**How is it different from other YouTube comment scrapers?**<br>
It prices one event per row at about $0.36 per 1,000 rows on the Free plan, against $2 per 1,000 for the leading actor on the niche data. It does not need residential proxies, adds an approximate ISO `publishedAt` date next to the relative text, and exposes the pinned, hearted, edited, verified and channel-owner flags on every row.

**Why are some likes rounded?**<br>
YouTube shows only rounded numbers from 1 million upward.

### Also useful

- [Google Play Reviews Scraper](https://apify.com/genial_candlestand/google-play-reviews-scraper) — collect app reviews with ratings, dates and developer replies when you also study feedback on apps.
- [Apple App Store Reviews API](https://apify.com/genial_candlestand/apple-app-store-reviews-api) — export public iOS reviews as structured JSON across apps and countries.
- [Yelp Business Scraper](https://apify.com/genial_candlestand/yelp-business-scraper) — gather businesses with ratings, contacts and optional reviews.
- [Google Trends Scraper](https://apify.com/genial_candlestand/google-trends-scraper) — check interest over time, regions and related queries for a topic.

# Actor input Schema

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

YouTube videos and Shorts to get comments from. Accepts watch?v=, youtu.be, /shorts/, /live/, /embed/, m.youtube.com links or a bare 11-character video ID. Channel, playlist and search URLs are skipped with a warning when at least one other URL is a video; if none is a video or Shorts URL, the run fails with an input error.

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

Top-level comments to take from each video (replies are not counted here). 0 = all comments.

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

Also scrape replies as separate rows linked by parentCommentId. Turn off for top-level comments only (faster).

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

Replies to take from each comment thread. 0 = all replies. Used only when Include replies is on.

## `sort` (type: `string`):

Top comments (YouTube's relevance order, about 90% of all comments) or Newest first, which reaches every comment and is needed for an efficient date cutoff. If YouTube gives no Newest option for a video, that video falls back to Top order with a warning.

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

Skip comments and replies older than an absolute date (2026-10-01) or a relative age (7 days, 2 weeks, 1 month). With Newest, paging stops at the first older comment, except pinned comments, which come first and are kept regardless of date; with Top it only filters.

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

Stop the run after this many rows (comments + replies across all videos). Empty = no total limit.

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

Apify datacenter proxy (default) is enough; residential proxy is not needed.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    },
    {
      "url": "https://www.youtube.com/shorts/41UzbuW6wJs"
    }
  ],
  "maxCommentsPerVideo": 100,
  "includeReplies": true,
  "maxRepliesPerComment": 10,
  "sort": "top",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset with all comments and replies

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

Main fields of each comment

# 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"
        },
        {
            "url": "https://www.youtube.com/shorts/41UzbuW6wJs"
        }
    ],
    "maxCommentsPerVideo": 100,
    "maxRepliesPerComment": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("genial_candlestand/youtube-comments-and-replies-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" },
        { "url": "https://www.youtube.com/shorts/41UzbuW6wJs" },
    ],
    "maxCommentsPerVideo": 100,
    "maxRepliesPerComment": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("genial_candlestand/youtube-comments-and-replies-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"
    },
    {
      "url": "https://www.youtube.com/shorts/41UzbuW6wJs"
    }
  ],
  "maxCommentsPerVideo": 100,
  "maxRepliesPerComment": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call genial_candlestand/youtube-comments-and-replies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,genial_candlestand/youtube-comments-and-replies-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/wFCbbAmwFTBzjjKVX/builds/oiohUB7MaEvYjsX7m/openapi.json
