# YouTube Comments Scraper: Replies, Likes & Authors (`automatic/youtube-comments-scraper`) Actor

Export YouTube comments and replies from videos, Shorts, live streams, channels or searches: text, author, likes, reply count, pinned and creator-heart flags. Top or newest first, with a date filter.

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

## Pricing

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

Export the public comments of any YouTube video, Short or live stream to a spreadsheet: comment text, author name and channel, likes, reply count, pinned and creator-heart flags, and optional replies threaded under their parent. Paste a channel link to collect comments from its latest videos, or a search link to cover the top results.

### What you get

- **One row per comment** with the video ID, URL and title, text, author name, channel ID, channel URL and avatar, likes, reply count, upload age, and flags for pinned, edited, creator heart, channel owner and verified author.
- **Replies on demand**, each linked to its parent comment by `parentId`.
- **Top comments or newest first**, and only comments posted after a date such as `7 days`.
- **Whole channels and searches**: a channel link (or its `/shorts` or `/streams` tab) collects comments from its latest videos; a search-results link from its first results.
- **Paste links the way you have them**: watch, youtu.be, Shorts and live links, bare video IDs, or the `startUrls` list you already use with other YouTube scrapers.
- No login, API key or quota. Export JSON, CSV or Excel, or connect through the API.

### Use cases

- **Audience research**: what viewers praise, ask for and complain about.
- **Sentiment and brand monitoring**: feed comments into your analysis or AI tools, or track new comments on a schedule with Newest first.
- **Creator and campaign reviews**: compare reactions across a channel's latest videos in one run.
- **Community management**: find the most liked questions and the threads under them.

### Also available

The YouTube suite: pick the job.

| Actor | Use when |
|---|---|
| **YouTube Comments Scraper (this Actor)** | Comments and replies from videos or channels |
| [YouTube Scraper](https://apify.com/automatic/youtube-scraper) | Videos, channels, search results and comments |
| [YouTube Transcripts](https://apify.com/automatic/youtube-transcripts-scraper) | Bulk transcripts as text, SRT or VTT |
| [YouTube Outlier Finder](https://apify.com/automatic/youtube-outlier-finder) | Breakout videos that beat their channel median |

### Input

The Console prefill collects 10 top comments from one video:

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

Newest comments and replies from a channel's 5 latest videos, posted in the last week:

```json
{
  "videoUrls": ["https://www.youtube.com/@mkbhd"],
  "maxVideos": 5,
  "maxComments": 100,
  "sort": "newest",
  "includeReplies": true,
  "publishedAfter": "7 days",
  "maxItems": 500
}
```

Switching from another YouTube comments scraper? Paste your usual input: `startUrls` (plain links or `{"url": "…"}` objects), `maxComments`, `sortCommentsBy` (`TOP_COMMENTS`, `NEWEST_FIRST`) and `oldestCommentDate` are understood.

### Input options

| Input | Default | What it controls |
| --- | --- | --- |
| `videoUrls` | `"empty: sample"` | Public video, Shorts or live links, or 11-character IDs. Channel and search-results links collect comments from their first videos. Empty sources run the announced sample. |
| `startUrls` | — | The same links in the common `startUrls` format. |
| `maxVideos` | `5` | For a channel link, how many of its latest videos; for a search-results link, how many top results. Not used for video links. |
| `maxComments` | `100` | Maximum comment rows per video, including replies, for example 50. Also bounded by maxItems. |
| `sort` | `"top"` | Choose top comments or newest first. For example newest shows recent audience feedback. Pinned comments may appear first. |
| `includeReplies` | `false` | Include public replies, for example enable this to review conversations. Replies share the per-video maxComments cap. |
| `publishedAfter` | — | Only comments posted on or after a date (`2026-10-01`) or a relative value (`7 days`). |
| `maxItems` | `100` | Hard cap across all sources and row types, for example 200. Duplicates count once. |

`maxComments` counts replies as well as top-level comments. `isHearted` is `null` when a creator-heart state is not exposed publicly. `parentId` identifies the top-level comment for each reply.

### Output example

This real public record was collected on 2026-11-14.

```json
{
  "type": "comment",
  "input": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "scrapedAt": "2026-11-14T23:41:08Z",
  "id": "Ugw10bSluCDSZMIxUSB4AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "text": "Let’s put the meme aside, this is actually a banging song.",
  "authorName": "@LK-ht7qz",
  "authorChannelId": "UCHpvHTRSILoOFKWX5oFCYDA",
  "authorUrl": "https://www.youtube.com/@LK-ht7qz",
  "authorAvatarUrl": "https://yt3.ggpht.com/RJnrz4JwDmHNgtFdnVdJ6FKLiuo59IuHkY6bvqaEJM0mxTSlq0GKQs_ItA-sJ8QMqps_lf9Lvgs=s88-c-k-c0x00ffffff-no-rj",
  "authorIsChannelOwner": false,
  "authorIsVerified": false,
  "likes": 222000,
  "replyCount": 644,
  "publishedAt": null,
  "publishedText": "6 years ago",
  "isEdited": false,
  "isReply": false,
  "parentId": null,
  "isPinned": false,
  "isHearted": false
}
```

### Pricing

**$0.002 per comment ($2.00 per 1,000) plus $0.005 per run start.** The start fee is charged per GB of memory at startup (rounded up, minimum one GB); the default 512 MB run is one start event. Failed inputs produce no result rows.

| Example | Results | Cost |
| --- | ---: | ---: |
| Console prefill | 10 | $0.025 |
| 100 results | 100 | $0.205 |
| 1,000 results | 1,000 | $2.005 |

All examples use the default 512 MB memory.

### Good to know

- Public data visible without signing in only. Unavailable videos appear in `OUTPUT.errors`; valid sources continue, and the status reports partial results.
- A video with comments turned off, or one where YouTube shows 0 comments, is listed in `OUTPUT.errors` (`COMMENTS_UNAVAILABLE` or `NO_COMMENTS`). If that leaves the run with no rows, it still finishes successfully with `OUTPUT.status: "no_results"` and a status message that says why.
- Up to 50 comment pages per video and 50 reply pages per thread; availability varies, and large runs may stop early with partial results. This is not a complete historical archive.
- Counts can be rounded or hidden. Comment dates are relative ("2 weeks ago"): `publishedAt` stays `null`, and `publishedAfter` drops a comment only when its shown age is certainly older than the cutoff, so one just past the cutoff can be kept (a comment shown as "1 month ago" counts as at least 4 weeks old). With Newest first the run stops reading a video once its comments are older than the cutoff.
- Up to 100 source entries per run. Empty lists use the same small sample as `{}`; whitespace-only or malformed entries are skipped and reported. Duplicates count once per run. Scheduled runs collect the input again; saved-state deduplication is not supported.
- A playlist or hashtag link is skipped with a clear note in `OUTPUT.errors` and is not charged. If no input could be collected (all unavailable or skipped), the run still finishes successfully with `OUTPUT.status: "no_results"`.
- Input fields this Actor does not use, including connection settings, are listed in `OUTPUT.notices` and in the status message instead of failing the run. The Actor always uses its own standard connection.

This product is independent of YouTube and is not endorsed by it.

# Actor input Schema

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

Public video, Shorts or live links, or 11-character IDs, for example https://www.youtube.com/watch?v=dQw4w9WgXcQ. A channel link or a search-results link collects comments from its first videos (see Videos per channel or search). Empty sources run the announced sample. Up to 100 sources total.

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

The common startUrls input format from other YouTube Actors: plain links or {"url": "…"} objects, for example \[{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}]. Video, Shorts, channel and search-results links. Combined with the list above, duplicates removed.

## `maxVideos` (type: `integer`):

For a channel link: how many of its latest videos to read comments from. For a search-results link: how many top results. Example: 5. Not used for video links.

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

Maximum comment rows per video, including replies, for example 50. Also bounded by Maximum total rows.

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

Choose top comments or newest first. For example newest shows recent audience feedback. Pinned comments may appear first. Empty uses top.

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

Include public replies, for example enable this to review conversations. Replies share the per-video maxComments cap.

## `publishedAfter` (type: `string`):

Only comments posted on or after this date: 2026-10-01, or a relative value such as 7 days. Based on the age YouTube shows ("2 weeks ago"): a comment is dropped only when it is certainly older, so one just past the cutoff can be kept. Fastest with Newest first.

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

Hard cap across all sources and row types, for example 200. Duplicates count once.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideos": 5,
  "maxComments": 10,
  "includeReplies": false,
  "maxItems": 10
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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": 10,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automatic/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": 10,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automatic/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=dQw4w9WgXcQ"
  ],
  "maxComments": 10,
  "maxItems": 10
}' |
apify call automatic/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

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