# YouTube Comments Scraper (`sleepmodesystems/youtube-comments-scraper`) Actor

\[💰 $1.99 / 1K comments] YouTube comments of any video, channel, playlist or search, one row per comment · author, channel id, likes, replies, pinned and hearted by the creator · top or newest, with replies, from a date · No account, no proxy. Export JSON, CSV or Excel.

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

## Pricing

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

**\[💰 $1.99 per 1,000 comments]** Scrape the comments of any YouTube video, or of the videos of a channel, playlist or search, one row per comment: the 100 top comments of 2 videos in ~8 seconds, 300 comments with their replies from 3 search videos in ~10 seconds. No account, no API key, no proxy. Export JSON, CSV or Excel.

### What can the YouTube Comments Scraper do?

The YouTube Comments Scraper **extracts comments from YouTube** (https://www.youtube.com) in a single tool: paste **video links** for their comments, or a **channel**, a **playlist** or a **search** for the comments of their videos. Each comment is its own row with its **author and channel id**, **likes**, **number of replies**, whether it is **pinned**, **hearted by the creator** or **written by the creator**, and the **replies** under it if you want them, **top or newest first**, **from a date** you choose.

<table>
<tr><th>📦 What you can extract</th><th>⚙️ Features &amp; integrations</th></tr>
<tr><td valign="top">

💬 **Comments**, one row each <br>
↩️ **Replies** under each comment <br>
👤 **Authors**: @handle, channel id <br>
❤️ **Pinned, hearted** by the creator <br>
📊 **Likes** and reply counts

</td><td valign="top">

🔎 **Videos, channels, playlists, searches** <br>
🗓️ **Comments from** a date <br>
⬆️ **Top or newest** first <br>
⬇️ **Export** to JSON, CSV, Excel or XML <br>
🦾 **API, webhooks**, Node.js & Python clients <br>
🤖 **LLM-ready data** for MCP, Claude, ChatGPT

</td></tr>
</table>

If you analyse audience sentiment, collect product feedback and pain points, moderate a channel, find engaged viewers or build an AI dataset from real conversations, the YouTube Comments Scraper gives you every comment in one flat table.

### What data can I scrape from YouTube comments?

- 💬 **Comments**: *what viewers say.* The full text, its likes, its number of replies, and whether it is pinned, hearted by the creator, written by the creator or edited.
- 👤 **Authors**: *who said it.* The author's @handle and channel id, verified badge and official-artist badge.
- ↩️ **Replies**: *the conversation.* With **Include replies** on, every reply as its own row, with the comment it answers (`parentId`).
- 🎬 **The video**: its id, title and link on every row; each comment's link opens it on the video.
- 🗓️ **When**: the date as YouTube shows it ("3 weeks ago") and a date worked out from it (`publishedAtApprox`).

Runs on 2026-11-18: 2 video links, 100 top comments each, in 7.5 seconds; a channel's 5 newest videos with their comments of the last 30 days, newest first (105 comments, all dated within the window), in 6.5 seconds; 3 videos of the search "iphone 17 review" with replies (300 rows, 194 of them replies) in 9.8 seconds. Text and author on 100% of rows.

> Need more? This dedicated YouTube scraper covers comments. For the videos themselves, use the main actor:
>
> - 🎬 [YouTube Scraper](https://apify.com/sleepmodesystems/youtube-scraper): complete videos (exact dates, likes, comment counts, channel details), transcripts and creators

### How much will scraping YouTube comments cost?

The YouTube Comments Scraper uses **pay-per-event** pricing: you pay for each comment or reply it returns, nothing else. The videos are read to find their comments and are not charged. Platform usage is included.

| Event | FREE | BRONZE | SILVER | GOLD |
|---|---|---|---|---|
| Comment or reply (per 1,000) | $1.99 | $1.59 | $1.29 | $0.89 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

The tiers are Apify's discount tiers; PLATINUM and DIAMOND pay the GOLD price.

#### Cost examples

| What you scrape | Comments | FREE | GOLD |
|---|---|---|---|
| 100 top comments of 10 videos | 1,000 | $1.99 | $0.89 |
| Every comment of one video with ~5,000 | ~5,000 | $9.95 | $4.45 |
| 100 comments of a channel's 20 newest videos | 2,000 | $3.98 | $1.78 |

### How do I use the YouTube Comments Scraper?

<a href="https://console.apify.com/actors/bPKagKatXesmmwuuA/input"><img src="https://raw.githubusercontent.com/sleepmodesystems/actor-readme-images/main/youtube-comments-scraper/youtube-comments-scraper-how-it-works.png" alt="YouTube Comments Scraper, how it works: video links, a channel, a playlist or a search in, one row per comment out" style="width:100%;"></a>

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open the [YouTube Comments Scraper](https://console.apify.com/actors/bPKagKatXesmmwuuA) in Apify Console.
3. Paste video links, a channel, a playlist or a search in **Videos, channels, playlists or links**.
4. Set **Comments per video**, the order, and whether to **Include replies**.
5. Click **Save & Start**, then download the comments as JSON, CSV, Excel or XML, or read them through the API.

### ⬇️ Input

Each link and each search is read on its own: a video link gives that video's comments; a channel, playlist or search gives the comments of its videos, up to the number of videos you set.

<a href="https://console.apify.com/actors/bPKagKatXesmmwuuA/input"><img src="https://raw.githubusercontent.com/sleepmodesystems/actor-readme-images/main/youtube-comments-scraper/youtube-comments-scraper-input.png" alt="YouTube Comments Scraper input form in Apify Console: links, comments per video, order, replies and date" style="width:100%;"></a>

#### Comments of video links

```json
{ "startUrls": ["https://youtu.be/dQw4w9WgXcQ", "https://www.youtube.com/watch?v=yyUHQIec83I"], "maxComments": 200 }
```

The 200 top comments of each video, one row each.

#### Every comment of a video, newest first, with replies

```json
{ "startUrls": ["https://youtu.be/dQw4w9WgXcQ"], "maxComments": 0, "commentsSort": "newest", "includeReplies": true }
```

Every comment and every reply, newest first.

#### This month's comments on a channel's recent videos

```json
{ "startUrls": ["https://www.youtube.com/@TechWorldwithNana"], "maxResults": 10, "commentsSort": "newest", "commentsFrom": "30 days" }
```

The comments of the last 30 days on the channel's 10 newest videos.

#### What to paste

| Paste this | You get |
|---|---|
| `https://www.youtube.com/watch?v=…`, `youtu.be/…`, `/shorts/…`, `/live/…`, a video id | that video's comments |
| `https://www.youtube.com/@handle`, `@handle`, `/channel/UC…` | the comments of the channel's newest videos |
| `https://www.youtube.com/playlist?list=…`, a playlist id | the comments of the playlist's videos |
| `https://www.youtube.com/results?search_query=…`, or words in the search field | the comments of the search's videos |

#### Fields

| Field | Type | Default | Meaning |
|---|---|---|---|
| `startUrls` | list | | Videos, channels, playlists, searches or links |
| `searchQueries` | list | | Searches, one per line |
| `maxComments` | number | 100 | Comments per video; 0 = every comment |
| `commentsSort` | text | top | top or newest |
| `includeReplies` | yes/no | no | Replies under each comment, as their own rows (they count toward the comments per video) |
| `commentsFrom` | date | | Only comments from this day on (a date or a span such as `30 days`) |
| `maxResults` | number | 10 | Videos per channel, playlist or search; 0 = all |
| `dateFrom`, `dateTo` | date | | Only videos published in this window |
| `sortBy` | text | relevance | relevance, popular, newest, oldest (videos) |
| `country` | text | US | Results as shown in that country |
| `minItems` | number | 0 | Fail the run below this many rows |

### ⬆️ Output

<a href="https://console.apify.com/actors/bPKagKatXesmmwuuA/input"><img src="https://raw.githubusercontent.com/sleepmodesystems/actor-readme-images/main/youtube-comments-scraper/youtube-comments-scraper-output.png" alt="YouTube Comments Scraper output table: video, comment, author, likes, replies, pinned, hearted and date" style="width:100%;"></a>

One row per comment or reply. The Output tab has two views: Comments and Authors.

#### 💬 Comment data sample

```json
{
  "type": "comment",
  "id": "Ugy-nsL_coD4NI3tkBJ4AaABAg",
  "videoId": "yyUHQIec83I",
  "videoTitle": "Golang Tutorial for Beginners | Full Go Course",
  "url": "https://www.youtube.com/watch?v=yyUHQIec83I&lc=Ugy-nsL_coD4NI3tkBJ4AaABAg",
  "text": "Git Repo: https://gitlab.com/nanuchi/go-full-course-youtube ...",
  "authorName": "@TechWorldwithNana",
  "authorChannelId": "UCdngmbVKX1Tgre699-XLlUA",
  "authorIsVerified": false,
  "authorIsCreator": true,
  "likeCount": 152,
  "replyCount": 15,
  "isReply": false,
  "isPinned": true,
  "isHearted": false,
  "isEdited": true,
  "publishedText": "4 years ago",
  "publishedAtApprox": "2022-11-18",
  "source": "https://youtu.be/yyUHQIec83I",
  "rank": 1
}
```

#### Run summary

Each run saves a summary (key-value store, `SUMMARY`): `comments` returned, `videos` read, `videosWithoutComments` (videos whose comments could not be read this time: run them again), `unavailableVideos`, `notFound` (links YouTube does not know), `duplicatesSkipped` and the run's plan in words.

#### 📝 Notes and limits

- YouTube shows comment dates only as "3 weeks ago": each row has that text and a date worked out from it. **Comments from** compares on that date.
- Large like counts are rounded by YouTube itself (1.2K = 1,200).
- Top comments are YouTube's own ranking and may not reach every comment of a very large video; newest first does.
- Videos with comments turned off give no rows and cost nothing.

### What can you do with YouTube comments?

#### 🔍 [YouTube Comments for Product Research](https://apify.com/sleepmodesystems/youtube-comments-scraper/examples/youtube-comments-product-research)

Read what buyers say about a product or a competitor in the comments of review videos: praise, complaints, questions, features they want. **Recipe:** 1. Type the product in **Or search YouTube for** ("iphone 17 review"). 2. Set 10 videos and 200 comments per video. 3. Sort by `likeCount` and read the top of the table, or send it to an AI for a summary.

#### 📈 Comments on your channel, every week

Answer and moderate new comments across your videos. **Recipe:** 1. Paste your channel. 2. Set **Comments order** to newest and **Comments from** to `7 days`. 3. Schedule it weekly.

#### 🤖 Sentiment and AI datasets

Collect real conversations for sentiment analysis or training. **Recipe:** 1. Paste the videos of a topic, or search it. 2. Switch on **Include replies** for whole threads. 3. Export JSON with `text`, `likeCount`, `isReply` and `parentId`.

### YouTube comment scrapers compared

| | YouTube Comments Scraper | streamers Comments Scraper | apidojo Comments Scraper | supreme_coder Comment Scraper |
|---|---|---|---|---|
| Price per 1,000 comments | $1.99 | $2.00 | $0.50 | $0.25 |
| Channels, playlists, searches | ✅ | ❌ | ❌ | ❌ |
| Replies | ✅ | ✅ | ✅ | ❌ |
| Top or newest | ✅ | ✅ | ✅ | ❌ |
| Author channel id | ✅ | ❌ | ✅ | ✅ |
| Pinned flag | ✅ | ❌ | ✅ | ❌ |
| Hearted by creator | ✅ | ✅ | ✅ | ✅ |
| Comments from a date | ✅ | ✅ | ❌ | ❌ |

### Want to get other data from YouTube?

<table>
<tr><td>🎬 <a href="https://apify.com/sleepmodesystems/youtube-scraper">YouTube Scraper</a></td><td>📝 <a href="https://apify.com/sleepmodesystems/youtube-transcript-scraper">YouTube Transcript Scraper</a></td></tr>
<tr><td>📺 <a href="https://apify.com/sleepmodesystems/youtube-channel-scraper">YouTube Channel Scraper</a></td><td>📱 <a href="https://apify.com/sleepmodesystems/youtube-shorts-scraper">YouTube Shorts Scraper</a></td></tr>
</table>

### How do you use the YouTube Comments Scraper with AI agents (Claude, ChatGPT, Cursor)?

The [Apify MCP server](https://mcp.apify.com/) lets AI agents run the YouTube Comments Scraper and read its results:

```
https://mcp.apify.com/?tools=sleepmodesystems/youtube-comments-scraper
```

```json
{
  "mcpServers": {
    "youtube-comments-scraper": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=sleepmodesystems/youtube-comments-scraper"]
    }
  }
}
```

Example prompts:

- "Get the 300 top comments of https://youtu.be/dQw4w9WgXcQ and tell me what viewers like most."
- "Collect the comments of the 10 most relevant 'iphone 17 review' videos and list the most common complaints."
- "Fetch this week's comments on @TechWorldwithNana and flag the questions that have no reply yet."

https://www.youtube.com/watch?v=BKu8H91uCTg

#### Why agents should choose the YouTube Comments Scraper

- **One call for many videos**: video links, a channel, a playlist or a search, with a date for the comments.
- **Flat rows**: one comment per row, replies linked to their parent, the video's title on each row.
- **Signals agents can rank by**: likes, reply counts, pinned and hearted flags, creator comments.
- **Errors an agent can act on**: input it cannot read ends the run in seconds with what to fix, and nothing charged; a link YouTube does not know is named in the run's message.
- **Price**: $1.99 per 1,000 comments on FREE, $0.89 on GOLD; no setup, no account, no API key.

#### Quick reference for AI agents

- Actor: `sleepmodesystems/youtube-comments-scraper`.
- One row per comment or reply (`type: "comment"`).
- Smallest input: `{"startUrls": ["https://youtu.be/dQw4w9WgXcQ"]}` gives that video's 100 top comments.
- Common inputs: `startUrls`, `searchQueries`, `maxComments` (0 = all), `commentsSort` (top / newest), `includeReplies`, `commentsFrom`, `maxResults` (videos per channel or search).
- Main fields: `text`, `authorName`, `authorChannelId`, `likeCount`, `replyCount`, `isReply`, `parentId`, `isPinned`, `isHearted`, `publishedText`, `publishedAtApprox`, `videoId`, `videoTitle`.
- `parentId` is `null` on top-level comments; `authorChannelId` is `null` when YouTube does not show it.
- Zero rows: the videos have no comments, have them turned off, or none since your date; the status message says so, and nothing is charged.

### ❓ Frequently Asked Questions

#### Can I get every comment of a video?

Yes. Set **Comments per video** to 0 and **Comments order** to newest: every comment, and every reply with **Include replies** on.

#### Why do comments show "3 weeks ago" instead of a date?

YouTube itself shows comment dates that way. Each row also has `publishedAtApprox`, a date worked out from that text.

#### Am I charged for the videos?

No. The videos are read to find their comments; only the comments and replies returned are charged.

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

The YouTube Comments Scraper collects only public data that anyone can see without logging in, and you choose what to collect. You are responsible for how you use the data, including comment authors' names and other personal data, under YouTube's terms and laws such as the GDPR and CCPA. The YouTube Comments Scraper is an independent tool by Sleep Mode Systems. It is not affiliated with, endorsed by or sponsored by YouTube or Google; YouTube is a trademark of Google LLC.

#### Can I integrate YouTube comments with other apps?

Yes. Export to JSON, CSV, Excel or XML, or connect Apify's integrations (webhooks, Zapier, Make, Google Drive) to send results anywhere.

#### Can I use the YouTube Comments Scraper with the Apify API?

Yes. Start runs and read results through the [Apify API](https://docs.apify.com/api/v2), or the Node.js and Python clients.

#### The YouTube Comments Scraper is not working?

Open an issue on the Issues tab or write to sleepmodesystems@proton.me; we answer fast. If it helped you, a review on the Store takes a minute and helps others find it.

#### Can I use the YouTube Comments Scraper through an MCP server?

Yes: `https://mcp.apify.com/?tools=sleepmodesystems/youtube-comments-scraper`. See the [API's MCP page](https://apify.com/sleepmodesystems/youtube-comments-scraper/api/mcp) and [the AI agents section](#how-do-you-use-the-youtube-comments-scraper-with-ai-agents-claude-chatgpt-cursor).

# Changelog

This Actor's version history is a separate document: https://apify.com/sleepmodesystems/youtube-comments-scraper/changelog.md

# Actor input Schema

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

Any YouTube link (video, Short, live, channel, playlist, search results, hashtag), or a video id, an @handle or a channel id. Paste a list of video links to get each one's comments. Example: https://youtu.be/dQw4w9WgXcQ

## `searchQueries` (type: `array`):

Words as you would type them in YouTube's search box: the comments of the videos YouTube shows for them. Example: iphone 17 review.

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

How many comments to return for each video, one row each (author, channel id, likes, replies, pinned, hearted by the creator). 0 = every comment.

## `commentsSort` (type: `string`):

Top comments as YouTube ranks them, or newest first (newest first reaches every comment and lets "Comments from" stop early).

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

Also return the replies under each comment (they count toward the comments per video).

## `commentsFrom` (type: `string`):

Only comments from this day on: a date (2025-01-01) or a span back from today (30 days, 6 months). YouTube shows comment dates as "3 weeks ago", so the day is worked out from that. With Newest first, reading stops at the first older comment.

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

How many videos to read comments from, for each channel, playlist, search or hashtag (a video link always gives that video). 0 = every video.

## `dateFrom` (type: `string`):

Only videos published on or after this day (a date, or a span such as 30 days). For the comments' own dates, use Comments from.

## `dateTo` (type: `string`):

Only videos published on or before this day. Together with the start date, this gives a window such as all of 2025.

## `sortBy` (type: `string`):

Searches: relevance or popularity (YouTube's own search choices). Channels: newest, popular or oldest first.

## `country` (type: `string`):

Results as YouTube shows them in this country (two letters: US, GB, DE, IN, BR...). Titles stay as their creators wrote them.

## `minItems` (type: `integer`):

For monitoring: mark the run as failed when it returns fewer rows than this. 0 = never.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 100,
  "commentsSort": "top",
  "includeReplies": false,
  "maxResults": 5,
  "sortBy": "relevance",
  "country": "US",
  "minItems": 0
}
```

# 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 = {
    "startUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxComments": 100,
    "maxResults": 5
};

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

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

```

## MCP server setup

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