# YouTube Comments Scraper - Replies, Likes & Shorts (`delicious_zebu/youtube-comments-replies-scraper`) Actor

Scrape comments and replies from any YouTube video or Short: text, likes, reply counts, author channel, pinned and hearted flags, comment IDs and links. Sort by Top comments or Newest first, skip replies or stop at a date.

- **URL**: https://apify.com/delicious_zebu/youtube-comments-replies-scraper.md
- **Developed by:** [Zebu Data](https://apify.com/delicious_zebu) (community)
- **Categories:** Social media, Videos, Developer tools
- **Stats:** 106 total users, 2 monthly users, 100.0% runs succeeded, 30 bookmarks
- **User rating**: 4.81 out of 5 stars

## Pricing

from $0.50 / 1,000 results

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

### What does YouTube Comments Scraper do?

**YouTube Comments Scraper** exports the comments and replies of any [YouTube](https://www.youtube.com) video or Short as clean, structured data: **comment text, likes, reply count, author and channel, whether the creator pinned or hearted it, comment ID and a direct link**, plus the video's exact like and comment counts. It works as an unofficial **YouTube comments API alternative**: no API key, no quota and no login.

Paste video links or video IDs, choose **Top comments** or **Newest first**, and download the results as JSON, CSV or Excel. Every comment and every reply is its own row, and each reply row also shows the comment it answers.

### Why use YouTube Comments Scraper?

- 💬 **Comments and replies in one table**: each comment is followed by its replies, oldest first. Filter `type` to get only comments or only replies.
- 🔢 **Numbers you can sort**: likes, reply counts and the video's exact like and comment counts are numbers, not text.
- 📌 **Creator signals**: see which comments the creator **pinned** or **hearted**, and which comments and replies come from the creator's own channel.
- 🎛️ **Same controls as YouTube**: Sort by **Top comments** or **Newest first**, cap comments per video and replies per comment, skip replies entirely, or stop at a date to get only recent comments.
- 🎬 **Videos, Shorts and live replays**: paste any video link, or just the video ID.
- 🔗 **IDs and links on every row**: comment IDs, reply IDs, author channel IDs and a link that opens each comment on YouTube.

**Popular use cases:** sentiment analysis, audience and product research, community management, finding questions and feature requests, tracking reactions to a launch, influencer vetting, and building comment datasets for AI.

| | YouTube Comments Scraper | YouTube Data API | Copying by hand |
|---|---|---|---|
| API key / Google Cloud project | Not needed | Required | Not needed |
| Daily quota | None | 10,000 units per day by default | — |
| Pinned and hearted flags | Yes | Not available | Yes, slowly |
| Export to CSV / Excel / JSON | Yes | Needs code | Manual |

### What data can you extract?

**Comment fields** (on every row; on reply rows they describe the comment being replied to)

| Field | Description | Example |
|---|---|---|
| `type` | `comment` or `reply` | `comment` |
| `comment_content` | Comment text | `So happy to collab with small channels like Linus Tech Tips ...` |
| `comment_user` | Comment author | `@BocaBola_` |
| `comment_like_count` | Likes (rounded like YouTube shows them above 1,000) | `14000` |
| `comment_reply_count` | Number of replies | `119` |
| `comment_time` | Posting time as YouTube shows it | `6 days ago (edited)` |
| `comment_date_approx` | Approximate posting date | `2026-09-29` |
| `comment_is_pinned` | Pinned by the creator | `false` |
| `comment_is_hearted` | Hearted by the creator | `true` |
| `comment_author_is_creator` | Written by the video's own channel | `false` |
| `comment_author_is_verified` | Author has the verified badge | `true` |
| `comment_is_edited` | The comment was edited | `true` |
| `comment_rank` | Position in the Sort by order | `1` |
| `comment_id` | YouTube comment ID | `UgwuR991jUmcKQrNWhl4AaABAg` |
| `comment_url` | Opens the video with this comment highlighted | `https://www.youtube.com/watch?v=y1hZ3EalPQU&lc=Ugwu...` |
| `comment_author_channel_id`, `comment_author_url`, `comment_author_avatar_url` | Author's channel ID, link and profile picture | `UCBur6ZOAqhjRs9PadDArozQ` |

**Reply fields** (filled on reply rows)

| Field | Description | Example |
|---|---|---|
| `reply_content` | Reply text | `heyo` |
| `reply_user` | Reply author | `@rennohenno` |
| `reply_like_count` | Likes | `3` |
| `reply_time`, `reply_date_approx` | Posting time as shown, and approximate date | `6 days ago`, `2026-09-29` |
| `reply_is_hearted`, `reply_author_is_creator`, `reply_author_is_verified`, `reply_is_edited` | Creator heart, written by the creator, verified author, edited | `false` |
| `reply_id`, `reply_url` | Reply ID (parent comment ID, a dot, then the reply's ID) and link | `UgwuR991jUmcKQrNWhl4AaABAg.AbJNy82gG6tAbJO-A3eHWX` |
| `reply_author_channel_id`, `reply_author_url`, `reply_author_avatar_url` | Author's channel ID, link and profile picture | `UCezkU2pwg8bR5jUsZSHTmew` |

**Video fields** (on every row)

| Field | Description | Example |
|---|---|---|
| `video_title` | Video title | `I Found these Computers in a Ditch…` |
| `video_url`, `video_id` | Video link from your input and video ID | `https://www.youtube.com/watch?v=y1hZ3EalPQU` |
| `post_like_count` | Exact like count of the video | `41729` |
| `post_comment_count` | Exact number of comments on the video | `2753` |
| `crawl_time` | When the row was scraped (GMT) | `Mon, 05 Oct 2026 09:49:20 GMT` |

### How to scrape YouTube comments

1. Click **Try for free** on this page and sign in to Apify (a free account is enough).
2. In **YouTube video links**, paste video or Shorts links, or video IDs, one per line.
3. Set **Max top-level comments per video** and **Max replies per comment**, and pick **Sort by**.
4. Click **Start**. The log shows each page of comments as it's scraped.
5. Download the results as JSON, CSV, Excel or HTML, or get them through the API.

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

You only pay for the rows you get: each comment and each reply is one row. See the [Pricing](https://apify.com/delicious_zebu/youtube-comments-replies-scraper/pricing) tab for the current price.

To keep a run within budget:

- Set **Max top-level comments per video** and **Max replies per comment**, or turn off **Include replies**.
- Set a **Max cost per run** in the run options. The Actor stops as soon as the limit is reached.

New to Apify? The free plan includes monthly platform credit, so you can try this Actor at no cost.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| YouTube video links (`urls`) | List | — | Video, Shorts or live links, or video IDs, one per line. Required. |
| Max top-level comments per video (`max_comments`) | Number | `0` (all) | How many top-level comments to take from each video, in the Sort by order. |
| Max replies per comment (`max_replies`) | Number | `0` (all) | How many replies to take for each comment. Replies come oldest first, so a limit keeps the earliest ones. |
| Include replies (`include_replies`) | Checkbox | `true` | Turn off to get only top-level comments. |
| Sort by (`sort_by`) | Select | `top` | `top` (Top comments) or `newest` (Newest first), like the menu above the comments on YouTube. |
| Comments published after (`comments_published_after`) | Date or period | — | Only comments posted on or after this date, e.g. `2026-10-01` or `7 days`. Scrapes by Newest first. |

**The 100 top comments of a video, with up to 5 replies each**

```json
{
    "urls": ["https://www.youtube.com/watch?v=y1hZ3EalPQU"],
    "max_comments": 100,
    "max_replies": 5
}
```

**Only top-level comments from several videos and Shorts**

```json
{
    "urls": ["dQw4w9WgXcQ", "https://www.youtube.com/shorts/CEJXqm2eiJ0"],
    "max_comments": 500,
    "include_replies": false
}
```

**Everything posted in the last 7 days**

```json
{
    "urls": ["https://www.youtube.com/watch?v=y1hZ3EalPQU"],
    "comments_published_after": "7 days"
}
```

### Output

Each comment and each reply is one item in the dataset. Comments follow the **Sort by** order, and each comment is followed by its replies, oldest first. Here is a real comment row (avatar link shortened):

```json
{
    "video_url": "https://www.youtube.com/watch?v=y1hZ3EalPQU",
    "post_like_count": 41729,
    "post_comment_count": 2753,
    "comment_user": "@BocaBola_",
    "comment_content": "So happy to collab with small channels like Linus Tech Tips\n\nPS: I also cringe everytime Linus calls me BocaBola",
    "comment_time": "6 days ago (edited)",
    "comment_like_count": 14000,         // Rounded like YouTube shows it (14K)
    "comment_reply_count": 119,
    "reply_user": null,                  // The reply_* fields are filled on reply rows
    "reply_content": null,
    "reply_time": null,
    "reply_like_count": null,
    "crawl_time": "Mon, 05 Oct 2026 09:49:20 GMT",
    "type": "comment",
    "video_id": "y1hZ3EalPQU",
    "video_title": "I Found these Computers in a Ditch…",
    "comment_rank": 1,
    "comment_id": "UgwuR991jUmcKQrNWhl4AaABAg",
    "comment_url": "https://www.youtube.com/watch?v=y1hZ3EalPQU&lc=UgwuR991jUmcKQrNWhl4AaABAg",
    "comment_author_channel_id": "UCBur6ZOAqhjRs9PadDArozQ",
    "comment_author_url": "https://www.youtube.com/@BocaBola_",
    "comment_author_avatar_url": "https://yt3.ggpht.com/W06WOQyhTCE4KMf9wCvQnpcrp_...",
    "comment_author_is_verified": true,
    "comment_author_is_creator": false,
    "comment_is_pinned": false,
    "comment_is_hearted": true,
    "comment_is_edited": true,
    "comment_date_approx": "2026-09-29",
    "reply_id": null,
    "reply_url": null,
    "reply_author_channel_id": null,
    "reply_author_url": null,
    "reply_author_avatar_url": null,
    "reply_author_is_verified": null,
    "reply_author_is_creator": null,
    "reply_is_hearted": null,
    "reply_is_edited": null,
    "reply_date_approx": null
}
```

The next row is one of its replies: the same video and comment fields, with the reply filled in:

```json
{
    "type": "reply",
    "comment_id": "UgwuR991jUmcKQrNWhl4AaABAg",
    "reply_user": "@rennohenno",
    "reply_content": "heyo",
    "reply_time": "6 days ago",
    "reply_like_count": 3,
    "reply_id": "UgwuR991jUmcKQrNWhl4AaABAg.AbJNy82gG6tAbJO-A3eHWX",
    "reply_url": "https://www.youtube.com/watch?v=y1hZ3EalPQU&lc=UgwuR991jUmcKQrNWhl4AaABAg.AbJNy82gG6tAbJO-A3eHWX",
    "reply_author_channel_id": "UCezkU2pwg8bR5jUsZSHTmew",
    "reply_author_url": "https://www.youtube.com/@rennohenno",
    "reply_author_is_verified": false,
    "reply_author_is_creator": false,
    "reply_is_hearted": false,
    "reply_is_edited": false,
    "reply_date_approx": "2026-09-29"
}
```

### Tips and limitations

- **One row per comment or reply:** filter `type` = `comment` for top-level comments only. Reply rows repeat their parent comment, so you can read each conversation without joining tables.
- **Like counts above 1,000** are rounded the way YouTube shows them (14K becomes `14000`). Smaller counts are exact.
- **Dates:** YouTube shows relative times such as "6 days ago". `comment_date_approx` is worked out from that and `crawl_time`: exact for recent comments, only the month or year for older ones.
- **Get only new comments:** set **Comments published after** (for example `1 day`) and [schedule](https://docs.apify.com/platform/schedules) the run daily. The pinned comment is skipped if it is older.
- **Big videos:** videos with tens of thousands of comments take a while. Set **Max top-level comments per video** to get a sample quickly.
- **Comments turned off:** the video is skipped and the status message says so. YouTube shows the same message when a video can't be played in the United States, where the Actor runs.
- Need the video's full stats, all videos of a channel, or videos for a keyword? See the related Actors below.

### FAQ

#### Is it legal to scrape YouTube comments?

This Actor only collects data that YouTube shows publicly. Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

#### Do I need a YouTube API key or account?

No. Paste the video links and start the run.

#### Is one row the same as one comment?

Yes. Every comment and every reply is its own row, and `type` tells you which is which.

#### Why are the replies in a different order than on YouTube?

The Actor returns each comment's replies in the order they were posted, oldest first. On its website, YouTube groups replies into conversations (a reply to a reply is shown under it) and puts those conversations in its own order, which can differ from viewer to viewer. With **Max replies per comment** set to `0` you get every reply, just in posting order; with a limit you get the earliest replies. A reply that answers another reply usually starts with that person's @handle.

#### Can I scrape comments from YouTube Shorts?

Yes. Paste the Shorts link (or its video ID) like any other video.

#### Why did I get fewer comments than the video shows?

The comment count YouTube shows can include comments that are held for review, removed or hidden by YouTube, so the number you can scrape is usually a little lower. Your limits, **Include replies** and **Comments published after** also reduce the number of rows.

#### Can I use it through the API or with AI agents?

Yes. You can run it with the [Apify API](https://docs.apify.com/api/v2), the Python and JavaScript clients, integrations such as Make, Zapier and n8n, or the [Apify MCP server](https://mcp.apify.com) for AI agents. Set the limits so an agent always gets a predictable number of rows.

### Related Actors

| Actor | What it does |
|---|---|
| [YouTube Transcript Scraper - Subtitles & Captions API](https://apify.com/delicious_zebu/youtube-transcript-scraper) | Transcripts and subtitles of any video, in every language it has |
| [YouTube Video Details Scraper - Views, Likes & Channel Stats](https://apify.com/delicious_zebu/youtube-video-data-scraper) | Full details of any list of video links |
| [YouTube Channel Scraper - All Videos, Views & Dates](https://apify.com/delicious_zebu/youtube-channel-video-scraper) | Every video, Short and live stream of a channel |
| [YouTube Search Scraper - Videos & Shorts by Keyword](https://apify.com/delicious_zebu/youtube-video-scraper-by-keyword) | Videos that match a search term |

### Support

Found a problem or need another field? Open an issue in the **Issues** tab and we'll get back to you.

# Actor input Schema

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

Add the videos to scrape, one per line. Each line can be a video link (https://www.youtube.com/watch?v=y1hZ3EalPQU or https://youtu.be/y1hZ3EalPQU), a Shorts or live link, or just the 11-character video ID. Each video is scraped only once.

## `max_comments` (type: `integer`):

How many top-level comments to scrape for each video, in the order of Sort by. Use 0 to scrape all comments (big videos can take a long time).

## `max_replies` (type: `integer`):

How many replies to scrape for each top-level comment. Use 0 to scrape all replies. Replies come in the order they were posted (oldest first), so a limit keeps the earliest ones. YouTube's page may show them in a different order.

## `include_replies` (type: `boolean`):

Turn off to scrape only top-level comments, which is faster and cheaper.

## `sort_by` (type: `string`):

Same as the Sort by menu above the comments on YouTube: Top comments (YouTube's default) or Newest first.

## `comments_published_after` (type: `string`):

Only scrape comments posted on or after this date. Pick a date, or enter a period such as 7 days or 3 months. YouTube only shows relative times such as "3 weeks ago", so the cutoff is approximate. When set, comments are scraped by Newest first and the pinned comment is skipped if it is older. Replies of the scraped comments are all included.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=y1hZ3EalPQU"
  ],
  "max_comments": 100,
  "max_replies": 5,
  "include_replies": true,
  "sort_by": "top"
}
```

# Actor output Schema

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

Table view of YouTube comments using the 'overview' view from dataset_schema.json.

## `rawResults` (type: `string`):

All comment and reply items from the default dataset without a specific view.

# 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=y1hZ3EalPQU"
    ],
    "max_comments": 100,
    "max_replies": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("delicious_zebu/youtube-comments-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 = {
    "urls": ["https://www.youtube.com/watch?v=y1hZ3EalPQU"],
    "max_comments": 100,
    "max_replies": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("delicious_zebu/youtube-comments-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 '{
  "urls": [
    "https://www.youtube.com/watch?v=y1hZ3EalPQU"
  ],
  "max_comments": 100,
  "max_replies": 5
}' |
apify call delicious_zebu/youtube-comments-replies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,delicious_zebu/youtube-comments-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/7NufOe5zDF6KVz6Xj/builds/9bcl1KpYHsDqti99E/openapi.json
