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

Scrape YouTube comments and replies from videos, Shorts, channels, playlists or searches: text, author, likes, reply count, creator heart, date and video details. Top or newest order, comment monitoring. Pay per comment, no API key.

- **URL**: https://apify.com/fguiraud/youtube-comments-scraper.md
- **Developed by:** [Fernando Guiraud](https://apify.com/fguiraud) (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.32 / 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

### What does YouTube Comments Scraper do?

**YouTube Comments Scraper** extracts **comments and replies from YouTube videos and Shorts**: the comment text, author handle and channel, likes, number of replies, whether the creator **hearted** it, when it was posted, and the video's title and channel. Give it **video links, channels or playlists** (their newest videos) or **search keywords** (the top videos), choose **Top comments or Newest first**, and download thousands of comments in minutes. No API key and no YouTube Data API quota.

With `onlyNew` it becomes a **comment monitor**: a schedule returns, and charges, only the comments posted since the last run.

It runs on the Apify platform, so you also get an API, scheduling, integrations (Google Sheets, Make, Zapier, n8n, Slack) and access for **AI agents through the [Apify MCP server](https://mcp.apify.com)**. Export to **Excel, CSV or JSON**.

### Why use it?

- 💬 **Audience research and sentiment**: what viewers say about a product, a brand, a competitor or a topic, ready for an LLM or a spreadsheet.
- 🔁 **Replies too**: `includeReplies` adds the replies of each comment, linked by `parentCommentId`.
- 📺 **Whole channels and searches**: the newest videos of a channel or playlist, or the top videos for a keyword, in one run.
- 🔔 **Comment monitoring**: schedule it with `sortBy: "newest"` and `onlyNew: true` to get only new comments on your videos or a competitor's.
- 💸 **Pay per comment**, $0.40 per 1,000; videos with comments turned off are free.

Typical uses: brand and product feedback, creator analytics, community management, market research, training and evaluation data for AI, and AI agents that answer "what do people complain about in the comments of this video".

### How to scrape YouTube comments

1. Click **Try for free**.
2. Paste one or more video links (or a channel such as `@TED`), or type a search keyword.
3. Choose how many comments per video, the order, and whether to include replies.
4. Click **Start**. 1,000 comments take about a minute and a half.
5. Download the comments as **Excel, CSV or JSON**, or connect them to Google Sheets.

### Input

| Field | Description | Default |
|---|---|---|
| `videos` | Video links or IDs (watch, youtu.be, Shorts, live), channels (`@handle`, channel link) or playlists | — |
| `searchQueries` | Keywords: the comments of the top videos for each one | — |
| `maxCommentsPerVideo` | Top-level comments per video (replies are counted apart) | 100 |
| `sortBy` | `top` (Top comments) or `newest` (Newest first) | `top` |
| `includeReplies` / `maxRepliesPerComment` | Also the replies of each comment, up to this many | `false` / 20 |
| `maxVideosPerChannel` / `maxVideosPerSearch` | Newest videos of each channel or playlist / top videos of each search | 10 / 10 |
| `maxItems` | Comments and replies in the whole run (the cost cap) | 1,000 |
| `onlyNew` | Monitoring: skip (and do not charge) comments delivered by earlier runs for the same video | `false` |

```json
{
  "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "@TED"],
  "maxCommentsPerVideo": 200,
  "sortBy": "top",
  "includeReplies": true,
  "maxRepliesPerComment": 5
}
```

### Output

One row per comment or reply. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

Real rows from runs on 2026-11-11:

```json
{
  "commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg",
  "text": "I Rick rolled my entire French class because we had to study a city in France and make a quiz about it as well as a presentation, ...",
  "author": "@grustache4569",
  "authorChannelId": "UCKrzgYonJnMd0Dk7zQXjYXw",
  "authorChannelUrl": "https://www.youtube.com/channel/UCKrzgYonJnMd0Dk7zQXjYXw",
  "authorIsChannelOwner": false,
  "authorIsVerified": false,
  "likes": 108000,
  "likesText": "108K",
  "replyCount": 692,
  "heartedByCreator": false,
  "publishedTime": "6 years ago",
  "publishedApprox": "2020-11-11",
  "edited": true,
  "isReply": false,
  "parentCommentId": null,
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzKYksqeQ5gA3t0g0F4AaABAg",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "status": "ok"
}
```

```json
{"commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg.91a9XW7osVT952pvnnAzll", "text": "The biggest comrade ever", "author": "@egdog_tm", "likes": 6900, "likesText": "6.9K", "isReply": true, "parentCommentId": "UgzKYksqeQ5gA3t0g0F4AaABAg", "videoId": "dQw4w9WgXcQ"}
{"commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg", "text": "We're so honored that the first ever YouTube video was filmed here!", "author": "@SanDiegoZoo", "authorIsVerified": true, "likes": 4800000, "likesText": "4.8M", "replyCount": 986, "heartedByCreator": true, "videoTitle": "Me at the zoo"}
```

What the runs returned: **1,000 comments from "Me at the zoo" in 85 seconds**; 40 comments with up to 3 replies each, **135 rows**; the newest comments of 3 TED videos (posted minutes to hours before the run); the comments of the top 3 videos for "python tutorial". A second `onlyNew` run on the same video returned only the 2 comments posted in between.

### Data fields

| Field | Description |
|---|---|
| `commentId`, `text`, `commentUrl` | Comment id, text and direct link |
| `author`, `authorChannelId`, `authorChannelUrl` | Author handle and channel |
| `authorIsChannelOwner`, `authorIsVerified` | Written by the video's channel; verified author |
| `likes`, `likesText` | Likes as a number (from YouTube's rounded count) and as shown |
| `replyCount`, `heartedByCreator`, `edited` | Replies, creator heart, edited |
| `publishedTime`, `publishedApprox` | Relative time as shown (6 years ago) and the approximate date |
| `isReply`, `parentCommentId` | Replies and the comment they answer |
| `videoId`, `videoUrl`, `videoTitle`, `channelName`, `channelId`, `videoCommentCount` | The video |
| `source`, `searchQuery`, `searchRank` | Channel, playlist or search that found the video |
| `status` | `ok`; `no-comments`, `error` and `sample` rows are not billed |

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

| Event | Price |
|---|---|
| Run start (per GB of memory, default 256 MB) | $0.00005 |
| Comment or reply | **$0.0004** (about $0.40 per 1,000) |

Higher Apify plans pay less per comment (SILVER −10%, GOLD −20%). 1,000 comments cost about $0.40. Videos with comments off, comments skipped by `onlyNew` and failed requests are never charged. Use `maxItems` or **Max cost per run** to cap a run.

### Tips

- **Monitoring**: schedule daily with `sortBy: "newest"` and `onlyNew: true`; each video keeps its own memory. Connect the run to Slack or Google Sheets in **Integrations**.
- **Exact dates**: YouTube shows only relative times ("6 years ago"); `publishedApprox` converts them, so it is precise to the day for recent comments and to the year for old ones.
- **Likes** come rounded by YouTube (108K, 4.8M).
- **Big videos**: popular videos have millions of comments; set `maxCommentsPerVideo` to what you need.

### Run it from Python or the API

```python
from apify_client import ApifyClient  # pip install apify-client (3.x)

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("fguiraud/youtube-comments-scraper").call(run_input={
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxCommentsPerVideo": 500,
    "sortBy": "top",
})
for c in client.dataset(run.default_dataset_id).iterate_items():
    print(c["likes"], c["author"], c["text"][:80])
```

### Use it with AI agents (MCP)

Add `https://mcp.apify.com/?tools=fguiraud/youtube-comments-scraper` to Claude, ChatGPT, Cursor or any MCP client, and ask "summarize what viewers say in the comments of this video". Agent-friendly input: common field names such as `url`, `urls`, `query`, `limit` or `maxComments` are accepted, and an empty input runs a small sample.

### Related tools

- [YouTube Transcript Scraper](https://apify.com/fguiraud/youtube-transcript-scraper): what is said in the video, as text or subtitles.
- [YouTube Channel Transcripts](https://apify.com/fguiraud/youtube-channel-transcripts) and [YouTube Search Transcripts](https://apify.com/fguiraud/youtube-search-transcripts).

### FAQ

- **Where does the data come from?** From YouTube's public watch pages, the same comments any visitor sees. No account, no API key.
- **Does it collect private data?** No: only public comments and the public handle and channel of their authors. Use the data according to the laws that apply to you (for example GDPR for EU users).
- **Why is `videoCommentCount` rounded for some videos?** YouTube sometimes shows only a rounded count (10M).
- Found a problem or need a feature? Open an issue on the **Issues** tab. Replies within 24 hours.
- **Did it save you time?** A short review on the **Reviews** tab helps other people find this Actor.

# Changelog

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

# Actor input Schema

## `videos` (type: `array`):

YouTube video links or IDs (watch, youtu.be, Shorts, live), channels (@handle or channel link: its newest videos) or playlists, one per line.

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

Optional: comments of the top videos for each keyword (see Max videos per search).

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

Top-level comments per video (replies are counted apart).

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

YouTube's order: Top comments or Newest first.

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

Also get the replies of each comment (each reply is one result and one charge).

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

With replies on: replies per comment.

## `maxVideosPerChannel` (type: `integer`):

Newest videos taken from each channel or playlist.

## `maxVideosPerSearch` (type: `integer`):

Top videos taken from each search keyword.

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

Stop after this many comments and replies in the whole run (the cost cap).

## `onlyNew` (type: `boolean`):

Skip comments delivered by earlier runs for the same video. Best with Newest first: paging stops at the first known comment.

## `failOnError` (type: `boolean`):

Mark the run as failed when requests fail or key fields come back empty. Useful for scheduled monitoring (Apify emails you on failed runs).

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 100,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxVideosPerChannel": 10,
  "maxVideosPerSearch": 10,
  "maxItems": 1000,
  "onlyNew": false,
  "failOnError": false
}
```

# Actor output Schema

## `results` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

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

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

```

## MCP server setup

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