# YouTube Comments Scraper — $0.25/1k · Replies, Likes & Authors (`tidydata/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies from videos, Shorts, playlists, whole channels or search results: text, author, likes, reply count, pinned and creator-hearted flags, date. Top or newest first. Export to CSV, Excel or JSON. $0.25 per 1,000 comments, no API key.

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

## Pricing

from $0.20 / 1,000 comment scrapeds

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 — Replies, Likes, Pinned & Authors

Scrape **YouTube comments and replies** from single videos, **Shorts**, **playlists**, **whole channels** or **search results**. Every comment comes with its **text, author, likes, reply count, date, pinned and creator-hearted flags**, ready to export to **CSV, Excel or JSON**.

**$0.25 per 1,000 comments** — one of the cheapest in the Store. No YouTube API key, no quota, no login.

- ✅ **Any input**: video links (`watch`, `youtu.be`, `shorts`, `live`) or IDs, playlists, channels (`@handle`, `/channel/UC…`, plus `/shorts` or `/streams` tabs) and plain **search terms**
- ✅ **Top or newest first** — the same as YouTube's "Sort by" menu
- ✅ **Replies** (optional), linked to their parent comment
- ✅ **Rich data**: likes, reply count, author channel ID and URL, verified badge, **channel owner** flag, **pinned**, **hearted by creator**, edited, approximate date
- ✅ **Total comment count** of each video
- ✅ **All comments** of a video (set the limit to 0) or just the top N
- ✅ Videos with comments turned off are listed with the reason and **never charged**
- ✅ Fast: thousands of comments per minute, several videos in parallel

### Who uses it

- **Brands & marketers** — what people say about a product, a launch or a competitor's videos.
- **Creators & agencies** — find questions and video ideas in the comments, spot top fans, track reactions to each upload.
- **Researchers & data scientists** — datasets for **sentiment analysis**, topic modelling and NLP training.
- **AI builders** — feed real audience feedback to an LLM to summarise opinions or answer "what do viewers want?".
- **Community managers** — export comments to a spreadsheet to reply, moderate or report.

### How to use it

1. **Sources**: paste one item per line, mixed as you like:
   ```
   https://www.youtube.com/watch?v=NiCgcUTL9_Q
   https://youtube.com/shorts/6U6Z6pb6ewI
   @veritasium
   https://www.youtube.com/playlist?list=PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF
   iphone 17 review
   ```
2. **Max comments per video** (0 = all), **Order** (top or newest), **Include replies** and how many.
3. For channels, playlists and searches set **Max videos per source** (newest videos first for channels).
4. Run and download the table as CSV, Excel, JSON or HTML, or read it through the API.

### Output example

```json
{
  "videoId": "NiCgcUTL9_Q",
  "videoUrl": "https://www.youtube.com/watch?v=NiCgcUTL9_Q",
  "videoTitle": "The Absurd Engineering Behind the Internet",
  "videoCommentCount": 5385,
  "commentId": "UgyBzai4Mnxf_2fOSLd4AaABAg",
  "commentUrl": "https://www.youtube.com/watch?v=NiCgcUTL9_Q&lc=UgyBzai4Mnxf_2fOSLd4AaABAg",
  "text": "…",
  "author": "@veritasium",
  "authorChannelId": "UCHnyfMqiRRG1u-2MsSQLbXA",
  "authorChannelUrl": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA",
  "authorIsVerified": true,
  "authorIsChannelOwner": true,
  "likeCount": 246,
  "likeCountText": "246",
  "replyCount": 46,
  "publishedTimeText": "7 days ago",
  "publishedAtApprox": "2026-10-13",
  "isEdited": false,
  "isPinned": true,
  "isHeartedByCreator": false,
  "isReply": false,
  "parentCommentId": null
}
```

Replies have `"isReply": true` and the `parentCommentId` of the comment they answer, and come right after it.

### Analyze the results with AI

Want to know what viewers feel? Send the comments to [Bulk ChatGPT & Claude for Datasets](https://apify.com/tidydata/ai-dataset-enricher) and get **sentiment** (positive / negative / neutral / mixed), **topics** or your own questions answered for every comment, as new columns.

Run it as an **integration**: in this Actor's *Integrations* tab add **Bulk ChatGPT & Claude** and set its datasets to `{{resource.defaultDatasetId}}`, so every run is analyzed automatically. No API key needed.

### Pricing

**$0.00025 per comment or reply ($0.25 per 1,000).**

| You scrape | You pay |
|---|---|
| 1,000 comments | $0.25 |
| all 5,000 comments of a popular video | $1.25 |
| 100 comments from each of a channel's last 50 videos | $1.25 |
| 100,000 comments | $25 |

Videos with comments turned off, private or deleted videos and invalid inputs are free. Higher Apify plans get an automatic discount. Set a **maximum cost per run** and the Actor stops cleanly at that amount.

### Use it from code

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("tidydata/youtube-comments-scraper").call(run_input={
    "sources": ["https://www.youtube.com/watch?v=NiCgcUTL9_Q"],
    "maxCommentsPerVideo": 500,
    "sortBy": "newest",
    "includeReplies": True,
})
for c in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(c.get("likeCount"), c.get("author"), (c.get("text") or "")[:80])
```

Works with **Make, Zapier, n8n**, Google Sheets, webhooks and schedules, and as a tool for AI agents through the Apify MCP server.

### FAQ

**Are like counts exact?**
YouTube shows big numbers rounded ("28K"), so `likeCount` is the rounded number (28000) and `likeCountText` the original text. Small numbers are exact.

**Why is the date approximate?**
YouTube only shows relative dates ("5 years ago"). `publishedAtApprox` converts them to a date; precision follows the unit (days, months, years).

**Can I get all comments of a video?**
Yes, set *Max comments per video* to 0. YouTube may hide some comments it considers spam, so the total can be a bit lower than the counter.

**Does it work for Shorts and live streams?**
Yes — paste the Shorts or live link, or a channel's `/shorts` or `/streams` tab.

**Do I need a YouTube API key?**
No. And there is no daily quota like the official API's.

**Is it legal?**
The Actor only reads comments that YouTube shows publicly. Comments can contain personal data (usernames): process them for legitimate purposes such as research or brand monitoring and respect privacy laws (e.g. GDPR) and YouTube's terms.

### Related Actors

- [YouTube Transcript Scraper](https://apify.com/tidydata/youtube-transcript-scraper) — what is said in the videos (text, SRT, chapters).
- [Merge, Deduplicate & Transform Datasets](https://apify.com/tidydata/merge-dedupe-datasets) — keep only new comments across scheduled runs (dedupe by `commentId`).

Something doesn't work? Open an issue in the **Issues** tab with the video link — we answer fast.

# Actor input Schema

## `sources` (type: `array`):

One per line: video links (watch, youtu.be, shorts, live) or IDs, playlist links, channel links or @handles (add /shorts or /streams for those tabs), or plain search terms.

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

Top-level comments to take from each video. 0 = all of them.

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

Same as the 'Sort by' menu on YouTube.

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

Also collect the replies to each comment (each reply is a row with isReply = true and parentCommentId).

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

Only used when 'Include replies' is on.

## `maxVideosPerSource` (type: `integer`):

For playlists, channels (newest videos first) and searches. Single video links always count as one.

## Actor input object example

```json
{
  "sources": [
    "https://www.youtube.com/watch?v=iCvmsMzlF7o"
  ],
  "maxCommentsPerVideo": 100,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxVideosPerSource": 10
}
```

# Actor output Schema

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

One row per comment or reply.

# 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 = {
    "sources": [
        "https://www.youtube.com/watch?v=iCvmsMzlF7o"
    ]
};

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

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

```

## MCP server setup

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