# YouTube Comments Scraper + Free Comment Insights | $0.50/1K (`rasareka/youtube-comments`) Actor

Scrape YouTube comments and replies from any public video or Short: text, likes, author, date, pinned and hearted. Free insights: top terms, viewer questions, sentiment estimate, most-liked. No login or API key. Pay per comment.

- **URL**: https://apify.com/rasareka/youtube-comments.md
- **Developed by:** [Rasa Reka](https://apify.com/rasareka) (community)
- **Categories:** 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.50 / 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.

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 + Free Comment Insights

Scrape **YouTube comments and replies** from any public video or Short, and get a **free comment-analysis report** with every run: top terms, most-liked comments, **viewer questions** (ready-made content ideas), a sentiment estimate and comments by age. Paste video links or IDs. No login, no cookies, no YouTube API key.

![Real output: 200 top comments on freeCodeCamp's Learn Python course, about 41% positive and 6% negative (lexicon estimate), top terms hello world, data types, try except, 10 viewer questions such as "is this video still usable?"](https://assets.rasareka.com/hero-youtube-comments.png)

*Real output from one cloud run on freeCodeCamp's "Learn Python - Full Course for Beginners" (200 top comments; no commenter names shown). Sentiment is an estimate. Viewers keep asking whether the 2018 course is still usable, which is a ready-made idea for an updated video. Most comment scrapers give you the 200 rows. This one also gives you the summary above, free.*

### What you get

- 💬 Full comment text, comment ID and (optionally) replies with their parent comment ID
- 👍 Like count as a number (YouTube's "1.2K" becomes `1200`) and reply count
- 🗓️ YouTube's relative time ("2 weeks ago") plus an approximate ISO date (`publishedAtApprox: true`)
- 📌 Pinned comment, ❤️ creator heart, edited flag, channel-owner and verified badges
- 👤 Author name, channel ID, channel URL and avatar, or **anonymized authors** with one switch
- 🎬 Video title and channel name on every row
- 📊 **Free COMMENT_INSIGHTS report** per video: views, YouTube's reported comment count, `sampleSize`, top terms (words and two-word phrases), 10 most-liked comments, **viewer questions** sorted by likes, `sentimentEstimate`, creator reply rate (when replies are fetched) and comments by age (24 h / 7 d / 30 d / older)

### Why this Actor

| | Typical YouTube comment scraper | **This Actor** |
|---|---|---|
| Input | Video URL | Watch URL, **youtu.be, Shorts, live, embed or bare ID** |
| Sort order | Often top only | **Top or newest** |
| Replies | Sometimes | **Optional, with a per-comment cap** |
| Likes | Text like "1.2K" | **Numbers** you can sort and sum |
| Comment-analysis report | No, you analyse it yourself | **Included free** (terms, questions, sentiment estimate, age) |
| Privacy switch | Rarely | **`anonymizeAuthors`** for GDPR-friendly datasets |
| Login, cookies, API key | Varies | **Not needed** |
| Failed videos | Sometimes charged | **Never charged**, listed in a free FAILED record |

### Use cases

- **Creators:** see what your audience talks about, which comments get the most likes, and how often you reply.
- **Content ideas from viewer questions:** the report pulls real questions ("What should my next steps be after this video?") sorted by likes. Each one is a possible follow-up video, FAQ or Short.
- **Brand monitoring:** track what people say about your product in review and unboxing videos, on a schedule.
- **Sentiment snapshots:** a quick positive / negative / neutral estimate per video, plus the raw text for your own model.
- **AI and LLM pipelines:** clean, structured comments for RAG, summarisation, classification or fine-tuning. The report is compact enough to pass straight to an LLM.
- **Market research:** compare the comment sections of competing channels or product launches.

### How to use it

1. Add one or more videos in **Videos**: `https://www.youtube.com/watch?v=...`, `https://youtu.be/...`, `https://www.youtube.com/shorts/...` or just the 11-character ID.
2. Set **Max comments per video** (replies count toward it) and pick **Top** or **Newest**.
3. Optional: turn on **Include replies**, or **Anonymize authors**.
4. Run. Comments go to the dataset; the report goes to **Storage → Key-value store → COMMENT_INSIGHTS**. Videos that could not be scraped are listed in **FAILED**.

#### Input example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/rfscVS0vtbw"
  ],
  "maxCommentsPerVideo": 300,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "anonymizeAuthors": false,
  "includeInsights": true
}
```

#### Output example (one comment, real)

```json
{
  "videoId": "jNQXAC9IVRw",
  "videoTitle": "Me at the zoo",
  "channelName": "jawed",
  "commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "text": "We're so honored that the first ever YouTube video was filmed here!",
  "authorName": "@SanDiegoZoo",
  "authorChannelId": "UCC5NfQ6Mf0dq_eEwv4P_hWA",
  "authorUrl": "https://www.youtube.com/@SanDiegoZoo",
  "authorAvatar": "https://yt3.ggpht.com/i8RqA9tYqbbnOi4mlnYEY7IR3kXAoDqQbM_5Sfzw7OjTubiGsOaTdlrIZmj-I0q0Vup68eqs=s88-c-k-c0x00ffffff-no-rj",
  "authorIsChannelOwner": false,
  "authorIsVerified": true,
  "likeCount": 4800000,
  "replyCount": 986,
  "publishedTimeText": "6 years ago",
  "publishedAt": "2020-11-19T01:37:17.630Z",
  "publishedAtApprox": true,
  "isEdited": false,
  "isReply": false,
  "parentCommentId": null,
  "isPinned": true,
  "isHearted": true,
  "scrapedAt": "2026-11-18T01:37:17.631Z"
}
```

With `anonymizeAuthors: true` the same row has `"authorName": "Commenter 1"` and no `authorChannelId`, `authorUrl` or `authorAvatar`.

#### COMMENT_INSIGHTS example (real, shortened)

```json
{
  "videoTitle": "Learn Python - Full Course for Beginners [Tutorial]",
  "channelName": "freeCodeCamp.org",
  "videoViews": 49601124,
  "totalCommentsReported": 46000,
  "totalCommentsReportedText": "46K",
  "sortBy": "top",
  "sampleSize": 300,
  "topTerms": [
    { "term": "hello world", "type": "bigram", "mentions": 22, "shareOfComments": 0.073 },
    { "term": "data types", "type": "bigram", "mentions": 10, "shareOfComments": 0.033 },
    { "term": "try except", "type": "bigram", "mentions": 10, "shareOfComments": 0.033 }
  ],
  "mostLikedComments": [
    { "text": "Several weeks ago I commented that I was a few days away from turning 73 and I was learning Python…", "likeCount": 35000, "replyCount": 588, "authorName": "Commenter 1" }
  ],
  "viewerQuestions": {
    "count": 13,
    "shareOfComments": 0.043,
    "top": [
      { "question": "is this video still usable?", "likeCount": 3 },
      { "question": "Can anyone tell me if this video is helpful for me now(2025) i am an absolute beginner or should i prefer other new videos out there?", "likeCount": 2 }
    ]
  },
  "sentimentEstimate": { "positiveShare": 0.47, "negativeShare": 0.047, "neutralShare": 0.483, "method": "lexicon estimate" },
  "creatorReplyRate": null,
  "creatorReplyNote": "Replies were not fetched. Run with includeReplies: true to measure how often the creator replies.",
  "commentsByAge": { "last24h": 0, "last7d": 1, "last30d": 11, "older": 288 }
}
```

Export to JSON, CSV or Excel, or connect to Google Sheets, Make, Zapier, n8n or your own code through the Apify API.

### How the insights are calculated

Every number comes only from the comments fetched in that run, and `sampleSize` tells you how many that was. With **Top** sort you analyse the most-liked comments; with **Newest** you analyse the latest ones.

- **topTerms:** words and two-word phrases, counted once per comment, after removing common English stopwords, @mentions, links and words from the video title and channel name.
- **viewerQuestions:** comments with a sentence that ends in "?" and starts with a question word (what, how, why, can, should…). Rhetorical "who's here in 2026?" comments are skipped. Sorted by likes.
- **sentimentEstimate:** a simple, transparent lexicon method. Each comment gets +1 for every positive word (love, amazing, helpful, thanks…) and −1 for every negative word (worst, boring, waste, broken…). A negation in the two words before flips it ("not good" counts as negative). Positive emoji (❤️ 😂 🔥 👍) add 1, negative emoji (😡 👎 🙄) subtract 1. Score above 0 = positive, below 0 = negative, 0 = neutral. It is English-centric and misses sarcasm, so treat it as an estimate.
- **creatorReplyRate:** share of fetched top-level comments that have at least one reply from the channel owner among the fetched replies. Only calculated when `includeReplies` is on; otherwise `null` with a note. Because replies are capped, it can undercount.
- **commentsByAge:** buckets from YouTube's relative times ("3 days ago"), so the edges are approximate.

### Pricing

Pay per result: you pay only for comments saved to your dataset (replies included). The COMMENT_INSIGHTS report is free, and failed videos are never charged. Set a maximum cost per run in the run options and the Actor stops cleanly when it is reached.

### Limits

- The Actor reads YouTube's public web pages the same way a logged-out visitor does. It does **not** log in, use cookies, solve CAPTCHAs or rotate proxies to dodge blocks. If YouTube shows a sign-in, bot-check or consent page, that video is listed in FAILED with "YouTube blocked this request; try later" and the rest of the run stops sending requests. Very heavy use can trigger this; smaller runs spread over time work best.
- Requests are paced (about 0.3 to 0.6 seconds apart), so very large runs take a while: roughly 20 comments per request.
- Dates are approximate. YouTube only shows relative times such as "2 weeks ago", so `publishedAt` is calculated from that and flagged `publishedAtApprox: true`. "6 years ago" can be off by months.
- Like counts above 1,000 are rounded by YouTube ("4.8M").
- `totalCommentsReported` is YouTube's own rounded figure ("46K") and can differ from what is actually loadable.
- Private videos, unavailable videos, age-restricted videos that need sign-in, and videos with comments turned off (for example videos made for kids) cannot be scraped. They appear in FAILED and are free.
- Topic and question extraction are keyword based and work best on English comments.

### Privacy, GDPR and YouTube's Terms

This Actor collects only what anyone can see on a public YouTube video: comment text and the public channel name shown next to it. It collects no emails, phone numbers or other contact details and does no enrichment of personal data.

Commenter names and channel IDs are personal data under laws such as the GDPR and CCPA. **You are responsible for having a lawful basis for processing them and for following YouTube's Terms of Service.** If you do not need to know who wrote a comment, turn on `anonymizeAuthors`: names become "Commenter 1", "Commenter 2"… (stable within one run), channel IDs, profile URLs and avatars are removed, and @mentions in the text become `@commenter`. The video's own channel owner keeps the public channel name. Names typed in plain text inside a comment are not detected.

### Also from Rasa Reka

- [Apple App Store Reviews Scraper + Insights](https://apify.com/rasareka/app-store-reviews): the same kind of free report for iOS app reviews
- [Google Play Reviews Scraper + Insights](https://apify.com/rasareka/google-play-reviews): the same for Android apps

### FAQ

**Do I need a YouTube account or API key?** No. The Actor uses YouTube's public web endpoints, with no login and no Google API quota.

**Does it work with Shorts?** Yes. Paste the `youtube.com/shorts/...` link or the ID.

**Can I get every comment on a huge video?** You can set a high `maxCommentsPerVideo`, but YouTube may slow down or block very long runs. For trend analysis, a few hundred top or newest comments is usually enough, and the report shows exactly how many were analysed.

**Why did a video fail?** Check the FAILED record in the key-value store. It gives a plain reason: invalid ID, unavailable or private video, comments turned off, or a YouTube block. Failed videos are not charged.

**Is scraping YouTube comments legal?** This Actor reads publicly available comments only. You are responsible for how you use the data, including GDPR/CCPA and YouTube's Terms of Service. See the privacy section above.

**Something broken or a feature missing?** Open an issue on the Issues tab. We usually reply within 24 hours.

# Actor input Schema

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

YouTube video URLs or 11-character video IDs. Works with youtube.com/watch, youtu.be, Shorts, live and embed links.

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

Stop after this many saved comments for each video (replies count too). You pay only for comments saved.

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

Top comments (YouTube's default ranking) or newest first.

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

Also fetch the replies under each comment (up to the cap below). Needed for the creator reply rate in the insights.

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

Only used when replies are included.

## `anonymizeAuthors` (type: `boolean`):

Replace commenter names with "Commenter 1", "Commenter 2"... (stable within one run), remove channel IDs, profile links and avatars, and replace @mentions in text with @commenter.

## `includeInsights` (type: `boolean`):

Save a summary per video (top terms, most-liked comments, viewer questions, sentiment estimate, comments by age, creator reply rate) to the key-value store as COMMENT_INSIGHTS. Free of charge.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "maxCommentsPerVideo": 500,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "anonymizeAuthors": false,
  "includeInsights": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `insights` (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=jNQXAC9IVRw"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rasareka/youtube-comments"
        }
    }
}
```

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/1ehisrtLOyBbuPCSm/builds/1qF3mgD0mradcmErV/openapi.json
