# YouTube Comments Scraper: Comments, Replies & Video Insights (`wrenfield-data/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies from videos, Shorts, whole channels and playlists. Text, likes, reply count, author, pinned and creator-hearted flags, comment links, plus a per-video summary with themes. No login, no API key, no quota. $0.40/1K.

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

## Pricing

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

### What does YouTube Comments Scraper do?

YouTube Comments Scraper exports the comments and replies of any public YouTube video or Short into clean JSON, CSV or Excel. Paste video links, Shorts, **whole channels** (`@handle` or channel URL) or **playlists**, and get every comment with its text, likes, reply count, author handle, date, pinned and creator-hearted flags and a direct link to the comment.

Each video also gets an optional **summary row**: total comment count, views, average likes, share of comments that are questions, how often the channel owner replied, creator hearts, the top recurring themes and the most-liked comment. That is the audience-research view other comment scrapers leave you to build yourself.

- No login, no cookies, no YouTube API key and no quota limits
- Videos, Shorts, channels (latest N uploads) and playlists in one run
- Top or Newest order, replies on demand, date cutoff for monitoring, keyword filter
- **$0.40 per 1,000 comments**, cheaper on higher Apify plans

#### Sample output

| author | text | likes | replyCount | publishedTimeText | isPinned |
|---|---|---|---|---|---|
| @LK-ht7qz | Let's put the meme aside, this is actually a banging song. | 223000 | 658 | 6 years ago | false |

### What YouTube comment data can you get?

| Field | Description |
|---|---|
| `type` | `comment`, `reply`, `video-summary` (or `error` for an unreachable video, never charged) |
| `commentId`, `parentCommentId` | YouTube comment ID; replies point to their parent comment |
| `text` | Full comment text |
| `likes`, `replyCount` | Like count and number of replies |
| `publishedTimeText`, `publishedDateApprox`, `edited` | YouTube's relative date ("3 days ago"), the matching calendar date, edited flag |
| `author`, `authorChannelId` | Public handle and channel ID of the commenter |
| `authorIsChannelOwner`, `authorIsVerified` | Reply from the video's creator; verified badge |
| `isPinned`, `isHeartedByCreator` | Pinned comment; hearted by the creator |
| `commentUrl` | Direct link that opens the video at this comment |
| `videoId`, `videoUrl`, `videoTitle`, `channelName`, `channelId` | Video context on every row |

Summary rows add `totalCommentCount`, `videoViews`, `videoPublished`, `commentsCollected`, `repliesCollected`, `avgLikesPerComment`, `questionsShare`, `channelOwnerReplies`, `heartedByCreator`, `topThemes` and `mostLikedComment`.

### How to scrape YouTube comments in 4 steps

1. Click **Try for free** (Apify gives every account monthly free credit).
2. Paste video URLs, Shorts, `@handles`, channel URLs or playlist URLs, one per line.
3. Set **Max comments per video**, choose **Top** or **Newest**, and turn on replies if you need them.
4. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or pull them through the API.

### Input example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/tPEE9ZwTmy0",
    "@mkbhd"
  ],
  "maxComments": 200,
  "sortBy": "top",
  "includeReplies": true,
  "maxRepliesPerComment": 10,
  "maxVideosPerChannel": 5
}
```

### Output example

```json
{
  "type": "comment",
  "commentId": "Ugw10bSluCDSZMIxUSB4AaABAg",
  "parentCommentId": null,
  "text": "Let's put the meme aside, this is actually a banging song.",
  "likes": 223000,
  "replyCount": 658,
  "publishedTimeText": "6 years ago",
  "publishedDateApprox": "2020-11-20",
  "edited": false,
  "author": "@LK-ht7qz",
  "authorChannelId": "UCHpvHTRSILoOFKWX5oFCYDA",
  "authorIsChannelOwner": false,
  "authorIsVerified": false,
  "isPinned": false,
  "isHeartedByCreator": false,
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugw10bSluCDSZMIxUSB4AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley"
}
```

Summary row:

```json
{
  "type": "video-summary",
  "videoId": "tPEE9ZwTmy0",
  "videoTitle": "Shortest Video on Youtube",
  "channelName": "Mylo the Cat",
  "videoViews": 71878803,
  "totalCommentCount": 77520,
  "commentsCollected": 30,
  "repliesCollected": 3,
  "avgLikesPerComment": 2533.6,
  "questionsShare": 0.1,
  "channelOwnerReplies": 1,
  "heartedByCreator": 0,
  "topThemes": ["youtube", "second", "cat"],
  "mostLikedComment": {"text": "This one second video turns into an epic story (told in 1,000 parts)...", "likes": 76000, "author": "@hiddentracktv2"}
}
```

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

Pay only for the rows you get:

| Event | Free plan | Paid plans |
|---|---|---|
| Comment or reply | $0.40 / 1,000 | $0.35 to $0.20 / 1,000 |
| Video summary row | $0.002 per video | $0.002 per video |
| Run start | $0.002 | $0.0005 |

**10,000 comments from 20 videos cost about $4.04 on the Free plan.** Comments filtered out by the keyword or date filter, videos with comments turned off and error rows are free. Set a maximum cost per run in the run options and the Actor stops cleanly at that limit.

### Use cases

- **Audience research:** find what viewers ask for, praise and complain about on your own or competitors' videos.
- **Product and brand feedback:** collect reactions to launch videos, reviews and sponsored segments.
- **Content ideas:** the questions share and top themes show which topics deserve the next video.
- **Sentiment and NLP datasets:** flat rows ready for sentiment models, LLM summarisation or topic clustering.
- **Influencer vetting:** check engagement quality, creator replies and comment volume before a partnership.
- **Community management:** pull new comments daily and route questions to your team.

### Monitor new comments on a schedule

Save a task with **Newest first** and **Only comments newer than** set to yesterday's date, then add an Apify schedule (daily or hourly). Each run reads only fresh comments and stops at the first older ones, so monitoring stays cheap.

### Use it from code or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/wrenfield-data~youtube-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videos":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"maxComments":100}'
```

- **MCP:** add `https://mcp.apify.com/?actors=wrenfield-data/youtube-comments-scraper` to Claude, Cursor or any MCP client.
- **Pay per run without an account:** agents can pay for a run through Apify's agentic payments, with no Apify account required.
- **Cap the bill:** set `maxTotalChargeUsd` on the run to limit what a run can charge.
- Rows are flat JSON with the fields documented above, so an agent can use them without post-processing.

### Related tools

- [YouTube Transcript Scraper](https://apify.com/wrenfield-data/youtube-transcript-scraper): full transcripts of videos, channels and playlists
- [YouTube Search Scraper](https://apify.com/wrenfield-data/youtube-search-scraper): YouTube search results and rankings for any keyword
- [App Store & Google Play Reviews Scraper](https://apify.com/wrenfield-data/app-store-google-play-reviews): user reviews with complaint themes
- [Keyword Search Volume](https://apify.com/wrenfield-data/keyword-search-volume): Google search volume for the topics your audience asks about

### FAQ

**How many comments can I get per video?**
As many as YouTube shows on the video page. Set **Max comments per video** to the number you need; large videos return tens of thousands.

**Do I need a login, API key or proxy?**
No. The Actor reads YouTube's public web pages the same way a signed-out visitor does. No YouTube Data API key, no quota.

**Does it work for Shorts and live replays?**
Yes. Shorts, regular videos and live stream replays with comments enabled all work.

**Can I scrape a whole channel?**
Yes. Enter the `@handle` or channel URL and set **Max videos per channel**. The latest uploads are scraped in order.

**Why is the date approximate?**
YouTube displays comment dates as "3 days ago", "2 months ago". `publishedDateApprox` converts that to a calendar date at the same precision; `publishedTimeText` keeps the original.

**What if YouTube slows the run down?**
The Actor backs off politely and, if YouTube keeps refusing, ends the run with everything collected so far saved and a clear status message.

**Did it help?** If this tool saved you time, a short review on the Store helps other people find it. Feedback on what's missing is just as welcome.

### Feedback and support

Open an issue on the Issues tab with the video you used. We reply fast and ship fixes quickly.

# Actor input Schema

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

One per line: video URLs, Shorts URLs, youtu.be links, 11-character video IDs, channel URLs or @handles (latest uploads are scraped), or playlist URLs.

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

Top-level comments to collect from each video. Replies (if enabled) are extra.

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

Same order as on YouTube. Use 'Newest first' together with 'Only comments newer than' for monitoring.

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

Also collect replies under each comment (each reply is one row, linked by parentCommentId).

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

Only used when replies are included.

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

For channel and playlist inputs: how many of the latest videos to scrape.

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

Optional date (YYYY-MM-DD). Older comments are skipped; with 'Newest first' the run stops reading a video once it reaches older comments. YouTube shows relative dates, so the cutoff is matched to the day.

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

Optional. Keep only comments that contain at least one of these words (case-insensitive). Only kept comments are charged.

## `includeVideoSummary` (type: `boolean`):

One extra row per video: total comment count, views, average likes, share of questions, channel-owner replies, creator hearts, top themes and the most-liked comment.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 20,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxVideosPerChannel": 10,
  "includeVideoSummary": true
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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