# YouTube Comments Scraper 💬 (replies, likes, bulk) (`tagadanar/youtube-comments-scraper`) Actor

Every comment and reply under any list of YouTube videos, with likes, author, channel link, pinned and creator-heart flags and dates. Flat rows ready for sentiment analysis. Top or newest first. Videos with comments off are never charged. No API key, platform usage included.

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

## Pricing

from $0.35 / 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: every comment and reply, ready for sentiment analysis

Paste a list of YouTube videos and get all the comments and replies under them as clean, flat rows: the text, the author and their channel, likes, reply count, when it was posted, and whether the creator pinned it, hearted it or wrote it. One row per comment, replies linked to their parent, so it loads straight into a spreadsheet, a BI tool or a sentiment model.

You choose the order YouTube itself offers (top comments or newest first) and how many rows you want per video. Videos with comments turned off, private or deleted videos, age-restricted and members-only videos are reported in the run status with the reason and are never charged.

One flat price per comment delivered, platform usage included. No API key, no Google Cloud project, no login, no cookies.

### What it costs against the rest of the category

| | This actor | Most-used YouTube comments actor on Apify | YouTube Data API |
| --- | --- | --- | --- |
| Price | $0.50 per 1,000 comments, all-in | $2 per 1,000 | Free, but 10,000 quota units a day and a Google Cloud project |
| Replies | Every reply, paged to the end of the thread | Varies | Only the first 5 per thread without extra calls |
| Pinned / creator heart / creator reply flags | Yes | Usually not | Partly |
| Videos with comments off | Free, with the reason | Varies | Error |
| Setup | Paste links | Paste links | API key, quota management |

### What you get

One record per comment or reply:

| Field | Description |
| --- | --- |
| `videoId`, `videoUrl`, `videoTitle` | The video the comment is under |
| `commentId` | YouTube's comment ID (a reply's ID is `parentId.replyId`) |
| `commentUrl` | Direct link that opens the video with this comment highlighted |
| `parentCommentId` | For a reply, the comment it answers; `null` for a top-level comment |
| `isReply` | True for replies |
| `text` | The full comment text, line breaks and emojis kept |
| `authorName` | The author's @handle as YouTube shows it |
| `authorChannelId`, `authorChannelUrl` | The author's channel |
| `authorAvatarUrl` | Profile picture |
| `isVerifiedAuthor` | The author has YouTube's verified badge |
| `isChannelOwner` | Written by the video's own creator |
| `isPinned` | Pinned by the creator |
| `isHearted` | Got the creator's heart |
| `likeCountApprox` | Likes as a number. YouTube rounds above 1,000 ("13K" becomes 13000), so it is exact below 1,000 and approximate above |
| `likeCountText` | Likes exactly as YouTube displays them |
| `replyCount` | Replies under a top-level comment (`null` on replies) |
| `publishedTimeText` | YouTube's own wording, e.g. `3 weeks ago` |
| `publishedAtApprox` | An ISO date estimated from that wording and the capture time. "2 years ago" can be off by months, so treat it as an estimate |
| `isEdited` | The author edited the comment |
| `capturedAt` | When the run collected the row |

The run's status line also gives each video's total comment count as YouTube shows it ("9,396 Comments"), how many rows you got and why it stopped.

#### Example row (real, from a test run)

```json
{
  "videoId": "aircAruvnKk",
  "videoUrl": "https://www.youtube.com/watch?v=aircAruvnKk",
  "videoTitle": "But what is a neural network? | Deep learning chapter 1",
  "commentUrl": "https://www.youtube.com/watch?v=aircAruvnKk&lc=Ugwedfi--9yZVC0eefl4AaABAg",
  "commentId": "Ugwedfi--9yZVC0eefl4AaABAg",
  "parentCommentId": null,
  "isReply": false,
  "text": "I study mathematics, physics and architecture. By definition this man is an ORACLE in the strict meaning of the word. ...",
  "authorName": "@kummer45",
  "authorChannelId": "UCqArZkt3NAOU0tcgIi6xmFQ",
  "authorChannelUrl": "https://www.youtube.com/@kummer45",
  "authorAvatarUrl": "https://yt3.ggpht.com/ytc/AIdro_m4CSuafW-y2xf_8OTq-udiBcDuBIkYQ6mivro3bwU=s88-c-k-c0x00ffffff-no-rj",
  "isVerifiedAuthor": false,
  "isChannelOwner": false,
  "isPinned": false,
  "isHearted": false,
  "likeCountApprox": 13000,
  "likeCountText": "13K",
  "replyCount": 173,
  "publishedTimeText": "7 years ago",
  "publishedAtApprox": "2019-10-16T03:49:43Z",
  "isEdited": true,
  "capturedAt": "2026-10-15T21:49:42.843Z"
}
```

### Who uses this

- **Brands and agencies doing social listening.** Pull every comment under your launch video, a competitor's ad or an influencer's review and score the sentiment, spot the recurring complaint, find the questions people keep asking.
- **Researchers.** Build a comment corpus for a topic, a channel or a news event, with stable IDs and parent links so threads can be rebuilt.
- **Creators and community managers.** Export your own comments to find the ones you have not answered, collect video ideas and testimonials, and see which comments you pinned or hearted.
- **AI pipelines.** Flat JSON with one comment per row goes straight into an embedding job, a classifier or an LLM prompt. Turn off replies when you only want the top-level discussion.

### Input

| Field | What it does |
| --- | --- |
| `videoUrls` | The videos, up to 500 per run. Watch links, `youtu.be` links, Shorts links, `/live/` links and bare 11-character IDs, mixed freely. Duplicates are removed. Another scraper's dataset with a `url` or `videoId` key works as-is |
| `maxCommentsPerVideo` | Rows per video, 1 to 10,000 (default 200). **Replies count**, so a video with 100 comments and 300 replies is 400 rows |
| `includeReplies` | On by default. Off gives top-level comments only |
| `sortBy` | `top` (YouTube's "Top comments", the default) or `newest` ("Newest first") |

Rows come page by page: 20 top-level comments, then the replies to those 20, then the next 20. With a small limit, one very busy thread can therefore take most of it; raise the limit or turn replies off if you want breadth.

#### One video, top comments with replies

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=aircAruvnKk"],
  "maxCommentsPerVideo": 500,
  "includeReplies": true
}
```

#### Fresh reactions on several videos, comments only

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/jNQXAC9IVRw",
    "https://www.youtube.com/shorts/dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 200,
  "includeReplies": false,
  "sortBy": "newest"
}
```

### Pricing

| Event | Price |
| --- | --- |
| Comment (or reply) delivered | $0.0005 each, i.e. **$0.50 per 1,000** |
| Run start | $0.001 per run |

Store discounts apply: Bronze $0.45, Silver $0.40, Gold $0.35 per 1,000 comments.

- **Misses are free.** Videos with comments turned off, unavailable, private, age-restricted or members-only videos, and videos with no comments yet cost nothing beyond the run start. The status line says which and why.
- **Platform usage is included.** There is no proxy setting to pay for or configure.
- **You control the spend** with `maxCommentsPerVideo`, and the run also respects the maximum charge you set on the run.

### Limits and honest caveats

- **Only what a signed-out visitor sees.** This actor never logs in. Age-restricted and members-only videos show no comments without an account, so they are reported and skipped. Comments YouTube holds for review or hides are not visible either, which is why a video's total can be a little higher than what you can collect.
- **Live chat is not comments.** A live stream's chat (and chat replay) is a different feed and is not included. If the stream also has a normal comment section, you get those comments.
- **Likes above 1,000 are rounded by YouTube** ("13K"). `likeCountApprox` is the number, `likeCountText` is what YouTube showed.
- **Dates are relative on YouTube** ("2 years ago"). `publishedAtApprox` turns that into a date, but it is only as precise as the wording.
- **Replies to replies** are shown by YouTube as replies to the same top-level comment, usually starting with an @mention. That is how they come out here too.

### Frequently asked questions

**How do I download all comments from a YouTube video?**
Paste the link, set `maxCommentsPerVideo` at or above the video's comment count (up to 10,000) and run. Replies are included by default.

**Can I scrape YouTube comments without an API key?**
Yes. There is no key, no quota and no Google Cloud project. The official Data API caps you at 10,000 quota units a day and returns only a handful of replies per thread without extra calls.

**Does it get replies to comments?**
Yes, every reply in the thread, paged to the end, each as its own row with `parentCommentId` pointing at the comment it belongs to.

**Can I get the newest comments first?**
Set `sortBy` to `newest`. That is YouTube's own "Newest first" order, handy for monitoring a video after it goes live.

**Does it work on YouTube Shorts?**
Yes, paste the Shorts link. Shorts comments come out the same way.

**Can I export YouTube comments to Excel or CSV for sentiment analysis?**
Yes. Every row is flat, so the dataset exports to CSV, Excel or JSON from the run page, or through the API into Python, Google Sheets, Make or Zapier.

**Why did a video return nothing?**
The status line names the reason per video: comments turned off, video unavailable or private, age-restricted, members-only, live chat only, or zero comments. None of these is charged.

**How many comments can I get per run?**
Up to 10,000 per video and up to 500 videos per run. For very large jobs, split them over several runs.

### Related YouTube actors

- [YouTube Search Scraper](https://apify.com/tagadanar/youtube-search-scraper): videos, Shorts and channels for any search query.
- [YouTube Channel Scraper](https://apify.com/tagadanar/youtube-channel-scraper): a channel's videos, Shorts and About details.
- [YouTube Shorts Scraper](https://apify.com/tagadanar/youtube-shorts-scraper): Shorts by search or by channel.
- [YouTube Channel Email Scraper](https://apify.com/tagadanar/youtube-channel-email-scraper): creator contact details and links for outreach.
- [YouTube Transcript Scraper](https://apify.com/tagadanar/youtube-transcript-extractor): transcripts for a whole list of videos, in the language you want.

YouTube comments scraper, YouTube comment extractor, download YouTube comments, export YouTube comments to CSV, YouTube replies scraper, YouTube sentiment analysis data, YouTube comments API alternative.

# Changelog

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

# Actor input Schema

## `videoUrls` (type: `array`):

One per line. Watch links (<code>https://www.youtube.com/watch?v=…</code>), short links (<code>https://youtu.be/…</code>), Shorts links, live links and bare 11-character video IDs all work, and you can mix them. Extra parameters like <code>?t=</code> or <code>\&list=</code> are ignored and duplicates are removed.

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

Stop each video after this many rows. Replies count toward the limit, so a video with 100 comments and 300 replies is 400 rows. You only pay for rows delivered. Up to 10,000 per video.

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

Also open every comment's reply thread. Each reply is its own row, linked to its comment by <code>parentCommentId</code>. Turn off to get top-level comments only.

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

The same two orders YouTube offers under a video. Use <i>Newest first</i> to track fresh reactions, <i>Top comments</i> for the most-liked discussion.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "maxCommentsPerVideo": 100,
  "includeReplies": true,
  "sortBy": "top"
}
```

# Actor output Schema

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

One item per comment or reply in the default dataset.

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=aircAruvnKk"
    ],
    "maxCommentsPerVideo": 100
};

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

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

```

## MCP server setup

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