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

Scrape the comments under YouTube videos and Shorts without login or API key: text, author, likes, reply count, replies, pinned and creator-hearted flags. Top or newest first.

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

## Pricing

from $0.85 / 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

Collect the comments under YouTube videos, Shorts and live streams: comment text, author handle and channel, likes, reply count, the replies themselves, and whether the channel pinned or hearted a comment. Top comments or newest first. No login, no cookies, no YouTube API key and no API quota. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the YouTube Comments Scraper?

It is an Apify Actor that asks YouTube for comments the same way the watch page does when a visitor scrolls down: 20 comments per request, 10 replies per request. No browser is opened, so a run with 50 comments finishes in about nine seconds.

Paste video links in any form (`youtube.com/watch?v=…`, `youtu.be/…`, `/shorts/…`, `/live/…`) or bare video ids. Every row carries the video's title and channel, so comments from many videos can share one dataset.

Two orders are available, and they behave differently:

- **Top comments first** is the order visitors see. YouTube ends this list after roughly 1,000 to 1,200 comments, however many the video has.
- **Newest first** has no such end: 3,000 comments took 80 seconds in our test. Use it for full exports and for scheduled runs that watch a video for new comments.

With **Include replies** on, the replies follow the comment they answer, and `parent_id` links them. A limit per comment keeps one long discussion from using up the whole run.

#### What data does it extract?

- **Comment:** `id`, `url` (opens the video at that comment), `text`, `published`, `is_edited`, `record_type` (`comment` or `reply`), `parent_id`
- **Engagement:** `likes`, `reply_count`, `is_pinned`, `is_hearted`
- **Author:** `author`, `author_channel_id`, `author_url`, `author_is_verified`, `author_is_creator`
- **Video:** `video_id`, `video_url`, `video_title`, `channel`

### ⬇️ Input

| Field | Type | What it does |
|---|---|---|
| `videoUrls` | array | Video, Shorts or live links, or bare video ids |
| `maxResults` | integer | Rows per video. 50 by default, up to 100,000 |
| `sort` | string | `top` or `newest` |
| `includeReplies` | boolean | Also save the replies under each comment |
| `maxRepliesPerComment` | integer | Replies to save per comment when replies are on. 10 by default |

#### Example input

The newest 1,000 comments of two videos, with up to five replies each:

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/9bZkp7q19f0"
  ],
  "maxResults": 1000,
  "sort": "newest",
  "includeReplies": true,
  "maxRepliesPerComment": 5
}
```

### ⬆️ Output

A real comment row:

```json
{
  "record_type": "comment",
  "id": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "video_id": "jNQXAC9IVRw",
  "video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "video_title": "Me at the zoo",
  "channel": "jawed",
  "text": "We're so honored that the first ever YouTube video was filmed here!",
  "published": "6 years ago",
  "is_edited": false,
  "likes": 4800000,
  "reply_count": 985,
  "author": "@SanDiegoZoo",
  "author_channel_id": "UCC5NfQ6Mf0dq_eEwv4P_hWA",
  "author_url": "https://www.youtube.com/@SanDiegoZoo",
  "author_is_verified": true,
  "author_is_creator": false,
  "is_pinned": true,
  "is_hearted": true,
  "parent_id": null,
  "scraped_at": "2026-10-03T09:19:18.021692+00:00"
}
```

A reply points to its comment through `parent_id`:

```json
{
  "record_type": "reply",
  "id": "UgzuC3zzpRZkjc5Qzsd4AaABAg.958xaQsh63D958yN1-HDaK",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg.958xaQsh63D958yN1-HDaK",
  "video_id": "jNQXAC9IVRw",
  "video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "video_title": "Me at the zoo",
  "channel": "jawed",
  "text": "San Diego Zoo That’s so awesome! I’m so glad the first YouTube video featured cute animals in it! 😊🐘",
  "published": "6 years ago",
  "is_edited": true,
  "likes": 205000,
  "reply_count": 0,
  "author": "@TheGreekPianist",
  "author_channel_id": "UC8h3BHk1Pk1_-VH9PRIxtgg",
  "author_url": "https://www.youtube.com/@TheGreekPianist",
  "author_is_verified": false,
  "author_is_creator": false,
  "is_pinned": false,
  "is_hearted": false,
  "parent_id": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "scraped_at": "2026-10-03T09:19:16.002965+00:00"
}
```

`published` is the age YouTube shows ("3 days ago"); YouTube does not give visitors an exact timestamp. Large like counts are rounded by YouTube itself ("4.8M" becomes 4800000).

### 💰 How much does it cost?

You pay per saved comment or reply, plus a tiny start fee per run.

| Apify plan | Price per 1,000 comments |
|---|---|
| Free | $1.00 |
| Starter | $0.95 |
| Scale | $0.90 |
| Business and above | $0.85 |

The default run (50 comments) costs 5 cents. Set **Maximum cost per run** in the run options and the Actor stops saving at that amount and says so in the status message.

### 💡 Use cases

- 🗣️ **Audience and sentiment analysis:** read what viewers say about a launch video, a review or a competitor's channel.
- 🔔 **Comment monitoring:** schedule a run in newest order and send new comments to Slack, a sheet or a moderation queue.
- 🧠 **Datasets for AI and research:** large, clean comment sets with likes and reply structure.
- 💡 **Content ideas:** find the questions viewers ask again and again under videos in your niche.

### ❓ FAQ

**Do I need a YouTube API key or a Google account?** No. The Actor reads what the public watch page loads and uses no API quota.

**Why did top order stop at about 1,000 comments?** YouTube ends the top list there for every visitor. The status message tells you when that happened. Switch to newest order to read further.

**Why is the saved number lower than the count on the video?** The count on the video includes replies. Turn on **Include replies** to collect them.

**How fast is it?** Between 15 and 40 comments per second. In our tests 3,000 comments in newest order took 80 seconds and 980 in top order took 66 seconds.

**Does `maxResults` count per video or per run?** Per video. Two links with `maxResults: 500` can save up to 1,000 rows. To cap the whole run, set **Maximum cost per run**.

**What happens with deleted or private videos, or videos with comments turned off?** They are skipped and listed in the status message and the `SUMMARY` record. The run still succeeds with the other videos.

**Can I get exact comment dates?** No. Visitors only see the age ("2 weeks ago"), and the Actor does not invent a date from it. In newest order the rows are in time order.

**Does it work for Shorts and live streams?** Yes, any video with a comment section.

**Is it legal to scrape YouTube comments?** The Actor reads only what YouTube shows publicly to any visitor and does not log in. Comments are personal data, so GDPR, CCPA and similar rules apply to how you store and use them, and YouTube's terms apply to you as well. If in doubt, ask a lawyer.

**Something is missing or broken?** Open an issue on the Actor's Issues tab with the run ID. Issues are answered within one business day.

### 🔗 You might also like

- [YouTube Transcript Scraper](https://apify.com/benthepythondev/youtube-transcript-scraper)
- [YouTube Search Results Scraper](https://apify.com/benthepythondev/youtube-search-results-scraper)
- [Instagram Comments Scraper](https://apify.com/benthepythondev/instagram-comments-scraper)
- [Threads Replies Scraper](https://apify.com/benthepythondev/threads-replies-scraper)
- [Reddit Comments Scraper](https://apify.com/benthepythondev/reddit-comments-scraper)

**Keywords:** youtube comments scraper, youtube comment scraper, scrape youtube comments, youtube comments export, youtube comments to csv, youtube replies scraper, youtube comments api alternative, youtube comments without api key, youtube shorts comments, youtube sentiment analysis, youtube comment monitoring, youtube comments dataset, youtube comment downloader, youtube audience research, social listening

# Actor input Schema

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

Links to videos, Shorts or live streams (youtube.com/watch, youtu.be, /shorts/, /live/). A bare 11-character video id works too.

## `maxResults` (type: `integer`):

Rows to save for each video. Replies count toward it when they are included.

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

Newest first suits a scheduled run that watches a video for new comments. A pinned comment stays first in both orders.

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

Also save the replies under each comment, right after the comment they answer.

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

Used when replies are included, so that one long discussion does not use up the whole limit.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "maxResults": 50,
  "sort": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 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=jNQXAC9IVRw"
    ]
};

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

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

```

## MCP server setup

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