# YouTube Comments Scraper: Comments & Replies Export (`s_actors/youtube-comments-scraper`) Actor

Export YouTube comments and replies from videos, Shorts and whole channels to CSV, Excel or JSON: text, author, likes, replies, date, pinned and creator-hearted. Filter by keyword and date, top or newest. Only-new mode returns just the new comments on each scheduled run. No API key or quota.

- **URL**: https://apify.com/s\_actors/youtube-comments-scraper.md
- **Developed by:** [Superior Actors](https://apify.com/s_actors) (community)
- **Categories:** Videos, Social media, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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: Comments & Replies Export

Export **YouTube comments and replies** from videos, **Shorts** and **whole channels** to CSV, Excel or JSON: comment text, author, likes, reply count, date, **pinned** and **hearted by the creator**. Filter by **keyword** and **date**, sort by **top** or **newest**, and schedule **Only new comments** to get just the comments posted since the last run.

```json
{ "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"], "maxComments": 500, "includeReplies": true }
```

No YouTube API key, no quota, no browser extension, no login.

#### What you get

One row per comment or reply. Real example, Rick Astley's "Never Gonna Give You Up", September 2026:

| author | text | likes | replyCount | publishedTimeText | isPinned | isHeartedByCreator |
|---|---|---|---|---|---|---|
| @YouTube | can confirm: he never gave us up | 320000 | 963 | 1 year ago | true | true |
| @Oatman69 | Gonna flag this for nudity so I can rick roll the ... | 567000 | 705 | 6 years ago | false | false |
| @KhayaNxumalo-b7j | I can't believe I was Rick rolled in 2026 | 153 | 11 | 2 days ago | false | false |

| Field | Description |
|---|---|
| `text` | Full comment text with emoji and line breaks |
| `author`, `authorChannelId`, `authorUrl`, `authorAvatar` | Commenter's @handle, channel ID, channel link and picture |
| `authorIsVerified`, `authorIsChannelOwner` | Verified badge; the comment is by the video's creator |
| `likes`, `replyCount` | Likes (YouTube rounds large numbers: `320K` = 320000) and replies |
| `publishedTimeText`, `publishedDate`, `isEdited` | As shown on YouTube (`2 days ago`), the approximate date, edited flag |
| `isPinned`, `isHeartedByCreator` | Pinned by the creator, liked with a heart by the creator |
| `isReply`, `parentCommentId`, `replyLevel` | Replies follow their comment; `parentCommentId` links them |
| `position` | Place of the comment in the chosen order (top or newest) |
| `commentId`, `commentUrl` | ID and a direct link that opens the comment on YouTube |
| `videoId`, `videoTitle`, `videoUrl`, `channelName`, `channelId`, `videoCommentsCount` | The video, on every row |

#### How it works

1. Add **videos, Shorts, channels or playlists**: `youtube.com/watch?v=...`, `youtu.be/...`, `/shorts/...`, video IDs, `youtube.com/@handle`, `/channel/UC...`, `@handle` or a playlist link `?list=...`
2. Set **Max comments per video** (0 = all) and **Sort**: top comments or newest first
3. Optional: **Include replies**, **Only comments containing** (keywords), **Newer than** (`7 days`, `24 hours`, `2026-09-01`)
4. Run, then download the dataset as CSV, Excel, JSON or HTML

| Input | What it does |
|---|---|
| **Videos, Shorts, channels or playlists** | A channel gives the comments of its latest uploads, a playlist of its videos (**Videos per channel or playlist**, default 10) |
| **Max comments per video** | Top-level comments per video; replies come on top. `0` = all |
| **Sort comments by** | `top` (as YouTube shows them) or `newest` |
| **Include replies**, **Max replies per comment** | Reply threads, oldest first as on YouTube; `0` = all replies |
| **Newer than** | Only recent comments. With newest first the scan stops at the first older comment: seconds even on viral videos |
| **Only comments containing** | Keep comments that contain any of your words: brand, product, `?` for questions. You pay only for matches |
| **Only new comments** | Monitoring: each scheduled run returns only new comments (see below) |

#### Why this Actor

| | |
|---|---|
| 📺 **Whole channels** | A channel link gives the comments of its latest videos in one dataset, with the video on every row |
| 🔔 **Only new comments** | Schedule it and get only what was posted since the previous run, plus new replies to recent comments |
| 🔍 **Keyword filter** | Brand mentions, product names, questions; skipped comments are free |
| 📅 **Date filter** | Last 24 hours, 7 days or since a date, with an early stop |
| 📌 **Creator signals** | Pinned, hearted by the creator, replies by the channel owner |
| 💰 **$0.30 per 1,000 comments** | Cheaper than the popular comment scrapers, no subscription |

#### Only new comments: monitoring your videos

1. Switch on **Only new comments** and give the task a **Monitor name**
2. Save as a task and add a schedule, e.g. every hour or every morning
3. **First run** returns the latest comments (up to **Max comments per video**) and remembers them. **Every later run** returns only comments posted since, newest first, and with **Include replies** also new replies to threads it has seen (threads up to 500 replies). An empty result means no new comments

Connect Slack, email or [Google Sheets](https://apify.com/s_actors/google-sheets-import-export) with an integration to receive the new comments. Use a different **Monitor name** for each task.

#### Pricing

Pay per result, no subscription:

| Event | Price |
|---|---|
| Run start | $0.001 |
| Video (opened for its comments; also in only-new mode) | $0.001 |
| Comment or reply in the results | $0.0003 |

| Task | Cost |
|---|---|
| 1,000 comments of one video | ~$0.30 |
| 100 comments on each of a channel's 10 latest videos | ~$0.31 |
| Only new comments on 3 videos, hourly for a month, ~20 new a day | ~$3.10 per month |

Comments removed by your keyword or date filters are not charged.

#### Ready-made tasks

Open one, change the videos or channels, and run:

| Task | What you get |
|---|---|
| [Export YouTube Comments to CSV or Excel](https://apify.com/s_actors/youtube-comments-scraper/examples/export-youtube-comments-to-csv) | The top 500 comments of a video in a spreadsheet |
| [YouTube Comment and Replies Extractor: Full Threads](https://apify.com/s_actors/youtube-comments-scraper/examples/youtube-comments-and-replies) | Comments with every reply |
| [Download YouTube Shorts Comments](https://apify.com/s_actors/youtube-comments-scraper/examples/youtube-shorts-comments) | Comments of Shorts |

#### FAQ

**Can it get all comments of a video?** Yes, set **Max comments per video** to `0`. A video with 10,000 comments takes a few minutes. Comments held for review, hidden or removed by the creator are not public and are not included, so the total can be lower than the counter under the video.

**Why are likes round numbers?** YouTube shows `320K` instead of the exact count to every visitor and every app, so exact likes above 1,000 are not available anywhere without the owner's access.

**How exact is `publishedDate`?** YouTube shows relative dates (`3 weeks ago`). The Actor turns them into a date counted back from the run: exact to the day for recent comments, approximate for older ones (`2 years ago`). The original text is in `publishedTimeText`.

**Does it work with Shorts and live stream replays?** Yes, Shorts links and past live streams work like videos. Live chat is not comments and is not collected.

**What if comments are turned off?** The video is skipped, logged, and the rest of the run continues. You pay only the video event.

**Do I need a YouTube API key?** No. The Actor reads public comments the way the YouTube website does, so there is no quota of 10,000 units a day.

#### Use with the API and AI agents

Run it via the [Apify API](https://docs.apify.com/api/v2) from Python, Node.js or any HTTP client, or connect it to Claude, ChatGPT and other AI agents through the [Apify MCP server](https://mcp.apify.com): "Summarize what viewers complain about in the comments of my last 5 videos."

#### Other YouTube tools

| Tool | What it does |
|---|---|
| [YouTube SEO & Rank Tracker](https://apify.com/s_actors/youtube-seo-rank-tracker) | Searches a video ranks for, keyword rankings, tags, suggestions |
| [Google Sheets Import & Export](https://apify.com/s_actors/google-sheets-import-export) | Send the comments to a Google Sheet |

#### Is it legal?

The Actor collects only public comments that YouTube shows to any visitor, without logging in. Comments contain names and handles of their authors: use the data in line with GDPR and other privacy laws, for example for aggregated analysis, and do not use it for spam.

# Actor input Schema

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

One per line: video links (youtube.com/watch?v=..., youtu.be/...), Shorts links (/shorts/...), 11-character video IDs, channel links (youtube.com/@handle, /channel/UC...), @handles or playlist links (?list=...). A channel gives the comments of its latest videos, a playlist of its videos (see Videos per channel).

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

Top-level comments to return per video (replies come on top, see below). 0 = all comments of the video. In only-new mode: the maximum number of new comments per video.

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

Top: YouTube's default order, most liked and discussed first. Newest first: the latest comments first, best with Newer than. Only-new mode always reads newest first.

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

Also return the replies to each comment, right after it (isReply = true, parentCommentId = the comment).

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

With Include replies: how many replies to return per comment, oldest first as on YouTube. 0 = all replies. A cap keeps one viral thread from taking the whole run.

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

For channels: how many of the latest uploads (videos, Shorts and past streams) to scrape comments from. For playlists: how many videos from the top of the playlist.

## `newerThan` (type: `string`):

Only comments posted in this period, e.g. 24 hours, 7 days, 2 weeks, 1 month, or a date like 2026-09-01. With Newest first the scan stops at the first older comment, so it is fast and cheap. YouTube shows relative dates ("3 days ago"), so the limit is approximate for older comments.

## `keywords` (type: `array`):

Keep only comments (and replies) that contain at least one of these words or phrases, not case-sensitive: your brand, a product, a question. You pay only for the comments returned. With a filter the Actor scans up to 20 times Max comments per video (at least 2,000).

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

For scheduled runs (save the input as a task and add a schedule). The first run returns the latest comments and remembers them; every later run returns only comments posted since, plus new replies to recent comments (with Include replies). An empty result means no new comments.

## `monitorName` (type: `string`):

Name of the memory used by Only new comments. Use a different name for each task, otherwise two tasks share what they have already seen.

## `maxConcurrency` (type: `integer`):

How many requests to YouTube run at the same time.

## `proxyConfiguration` (type: `object`):

Requests go direct first and switch to Apify datacenter proxies when YouTube refuses them. The default works for most runs.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 50,
  "sort": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxVideosPerChannel": 10,
  "onlyNew": false,
  "monitorName": "default",
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `comments` (type: `string`):

Comment text, author, likes, replies, date, pinned and hearted flags, with the video.

## `all` (type: `string`):

Every field of every row.

# 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"
    ],
    "maxComments": 50
};

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

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

```

## MCP server setup

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