# YouTube Comments Scraper - Comments and Replies by Video (`datasignalslab/youtube-comments-scraper`) Actor

Scrape YouTube comments for any video: text, author, likes, reply count and pinned flag as clean JSON. Top or newest first, with or without replies. $0.30 per 1,000 comments, no API key, no quota, no login.

- **URL**: https://apify.com/datasignalslab/youtube-comments-scraper.md
- **Developed by:** [DataSignals Lab](https://apify.com/datasignalslab) (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

$0.30 / 1,000 comment returneds

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 and replies for any video, no API key

Get the comments under any YouTube video as clean JSON: text, author, likes, reply count, pinned flag and a link to the comment. Paste video URLs or ids, choose top comments or newest first, and switch replies on to get the whole conversation. Built for marketing, research and community teams that need comment text at scale without the quota of the official API.

No API key, no quota, no login. It reads the same public data the YouTube page loads for a visitor who is not signed in.

**Run it with the default input to see it work.** It returns the top 100 comments of the first video ever uploaded to YouTube.

### What you get

One row per comment or reply:

| field | meaning |
|---|---|
| `comment_id` | YouTube's id for the comment, stable across runs |
| `video_id` | The video the comment belongs to |
| `video_title` | Title of the video |
| `channel_name` | Channel that published the video |
| `text` | Full comment text |
| `author` | Handle of the commenter |
| `author_channel_id` | Channel id of the commenter |
| `author_is_verified` | True when the commenter has a verified badge |
| `author_is_creator` | True when the commenter is the creator of the video |
| `likes` | Number of likes. YouTube rounds large numbers, so 4.8M becomes 4800000 |
| `reply_count` | Number of replies to this comment |
| `published` | Age as YouTube shows it, for example "6 years ago". YouTube does not show an exact date |
| `is_reply` | True for a reply to another comment |
| `parent_id` | For a reply, the id of the comment it answers |
| `is_pinned` | True when the creator pinned the comment |
| `url` | Link that opens the video with this comment highlighted |

Example row:

```json
{
  "comment_id": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "video_id": "jNQXAC9IVRw",
  "video_title": "Me at the zoo",
  "channel_name": "jawed",
  "text": "We're so honored that the first ever YouTube video was filmed here!",
  "author": "@SanDiegoZoo",
  "author_channel_id": "UC4QobU6STFB0P71PMvOGN5A",
  "author_is_verified": true,
  "author_is_creator": false,
  "likes": 4800000,
  "reply_count": 985,
  "published": "6 years ago",
  "is_reply": false,
  "parent_id": null,
  "is_pinned": true,
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg"
}
```

### How to scrape YouTube comments with this Actor

1. Open the Actor in the Apify Console and click Try for free. The input is prefilled with one video URL.
2. Replace `videos` with the video URLs or ids you want, one per line. Watch URLs, youtu.be links, Shorts links and plain 11 character ids all work.
3. Set `maxCommentsPerVideo`, pick `sort`, and switch `includeReplies` on if you want the replies. Use `maxRepliesPerComment` to stop one popular thread from using the whole cap.
4. Click Start. Rows appear in the Dataset tab during the run. Export as JSON, CSV or Excel, or read them through the Apify API.
5. From code: `POST https://api.apify.com/v2/acts/datasignalslab~youtube-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN` with the same JSON input as the body.

### Input

| field | what it does |
|---|---|
| `videos` | video URLs (watch, youtu.be or Shorts) or 11 character video ids, one per line |
| `maxCommentsPerVideo` | cap per video, default 100. Replies count toward it |
| `sort` | `top` (default, as YouTube ranks them) or `newest` |
| `includeReplies` | also return the replies under each comment, default off |
| `maxRepliesPerComment` | cap per thread, default 20, only with replies on |
| `maxComments` | hard stop across the run, 0 means no limit, also your budget cap |

Minimal input:

```json
{ "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"] }
```

The newest 500 comments of two videos, with replies:

```json
{ "videos": ["jNQXAC9IVRw", "https://youtu.be/dQw4w9WgXcQ"], "sort": "newest", "maxCommentsPerVideo": 500, "includeReplies": true }
```

Whole conversations, 50 replies per thread, with a budget cap for the run:

```json
{ "videos": ["https://www.youtube.com/shorts/jNQXAC9IVRw"], "includeReplies": true, "maxRepliesPerComment": 50, "maxCommentsPerVideo": 5000, "maxComments": 10000 }
```

### Pricing

Pay per comment returned: **$0.30 per 1,000 comments**, charged only for rows that land in the dataset. A reply counts as a comment. No start fee. A video without comments, or a video that cannot be read, costs nothing. Apify's free monthly credit covers thousands of comments, so you can evaluate without paying.

Example: 10,000 comments cost $3.00. The default run of 100 comments costs $0.03. A daily schedule for the 200 newest comments on 10 videos is 2,000 comments a day, about $18 a month.

#### More from DataSignals Lab

This Actor is one of the pay-per-result data Actors of [DataSignals Lab](https://datasignalslab.com): job listings per ATS platform and job board, app and company reviews, YouTube comments and transcripts, website contacts and tech stacks. Every Actor returns the same clean JSON style and charges only for rows that land in the dataset, so you can combine feeds without remapping fields. All Actors and prices are listed on [datasignalslab.com](https://datasignalslab.com).

### Use cases

- Marketing and brand teams: what viewers say under their own videos and those of competitors, with `likes` to weight the loudest opinions.
- Creators and agencies: questions and content ideas in the comments, found by filtering `text` on a question mark and sorting on `likes`.
- Researchers and NLP teams: comment text at scale without the daily quota of the official API, with `is_reply` and `parent_id` to rebuild threads.
- Community managers: a scheduled run with `sort` set to `newest` that pushes new comments into Slack, with `author_is_creator` to skip their own replies.
- Product teams: the reaction to a launch video, split into top level comments and replies, with `is_pinned` to find the creator's own note.
- AI agents that answer "what do viewers think of this video" from live data through MCP.

Need reviews instead of comments? See [Trustpilot Reviews Scraper](https://apify.com/datasignalslab/trustpilot-reviews-scraper), [App Store Reviews Scraper](https://apify.com/datasignalslab/app-store-reviews-scraper) and [Google Play Reviews Scraper](https://apify.com/datasignalslab/google-play-reviews-scraper).

### YouTube API alternative: how it compares

- The official YouTube Data API needs a Google project, an API key and a daily quota that a few large videos exhaust. This Actor has no key and no quota. In return it returns the relative age and rounded likes that the YouTube page shows, not the exact values the API gives.
- Replies are included, with `parent_id` to link them to their comment, and both sort orders YouTube offers are supported. Some alternatives return top level comments only.
- Each video is tried through up to three connections, the last one a residential proxy. A video that still fails is logged, costs nothing and does not stop the other videos in the run.
- The price is $0.30 per 1,000 comments with no start fee and no charge per video. Several alternatives charge more per comment, a fee per video or a start fee per run.

### Limits

- YouTube shows the age of a comment, such as "6 years ago", not an exact date. `published` is that text. If you need exact timestamps, the official API is the only source.
- Large like counts are rounded by YouTube. 4.8M is returned as 4800000. Small counts are exact.
- A pinned comment stays on top, also when you sort by newest.
- Videos with comments switched off, private videos, members-only videos and live chats return nothing and cost nothing.
- Comments only. Video details beyond title and channel, transcripts, channel pages and search are out of scope. For transcripts see [YouTube Transcript Scraper](https://apify.com/datasignalslab/youtube-transcript-scraper).
- No channel URL or playlist input. List the video URLs you want, one per line.
- No date filter. To track new comments over time, run it on a schedule with `sort` set to `newest` and de-duplicate on `comment_id`.
- YouTube serves 20 comments per request and 10 replies per request, so a run for 10,000 comments with replies takes several minutes. The Actor saves and charges per page, so a run that stops early keeps what it has.

### FAQ

#### Is it legal to scrape YouTube comments?

The Actor reads only what YouTube shows to any visitor who is not signed in: the comment text, the public handle, likes and the reply count. Respect YouTube's terms of service and the privacy laws that apply to you, and do not use handles or channel ids beyond the comment itself. If you are unsure about your use case, ask a lawyer.

#### Do I need a YouTube API key or a Google account?

No. There is no API key, no quota and no login. Paste the video URL and run.

#### Can the YouTube Comments Scraper get replies too?

Yes. Switch `includeReplies` on. Each reply is its own row with `is_reply` set to true and `parent_id` pointing to the comment it answers. `maxRepliesPerComment`, default 20, keeps one thread from using the whole cap.

#### Why is the date "6 years ago" instead of a timestamp?

Because that is what YouTube shows on the page for a visitor who is not signed in. The exact publish time is only in the official API. For a timeline, record the run time together with `published`.

#### How much do 10,000 YouTube comments cost?

$3.00. Replies count as comments. There is no start fee and nothing is charged for videos that return nothing.

#### Can I schedule it to track new comments?

Yes. Create a schedule in the Apify Console, set `sort` to `newest` and `maxCommentsPerVideo` a little above the number of comments the video gets per interval, and skip any `comment_id` you already stored. The id is stable across runs.

#### Can an AI agent (MCP) call the YouTube Comments Scraper?

Yes. Add the Apify MCP server to Claude, ChatGPT or another agent and the Actor shows up as a tool. The agent passes a video URL and gets the comments back as JSON.

#### What happens when YouTube blocks a video or stops mid-way?

Each video gets up to three attempts, the first two through Apify's datacenter proxy and the third through a residential proxy. If a page fails after comments were already saved, the run keeps and charges only what it saved, logs the error and continues with the next video. If every video in a run is refused, the run is marked failed, nothing is charged and you can simply run it again.

### Integrations

- Apify API, including `run-sync-get-dataset-items` for one call that returns the rows.
- Schedules and webhooks from the Apify Console, for feeds and for triggering your own processing when a run finishes.
- Apify MCP server, so Claude, ChatGPT and other agents call this Actor as a tool.
- Make, Zapier, n8n and Google Sheets through the Apify integrations, or CSV and Excel export from the Dataset tab.

### Support

Use the Issues tab on this page, or email support@datasignalslab.com. You get an answer within one working day. Built and maintained by [DataSignals Lab](https://datasignalslab.com).

### Changelog

- 2026-10: README rewritten with a step-by-step guide, what happens when a video fails, honest limits and a FAQ. No change to the output fields or the price.
- 2026-10: First release. Comments and replies per video, top or newest, three attempts per video with a residential fallback, saved and charged per page. Daily health check in place.

# Actor input Schema

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

One per line: a YouTube video URL (watch, youtu.be or Shorts) or the 11 character video id.

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

Cap per video. Replies count toward this cap.

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

Top comments first, as YouTube ranks them, or newest first.

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

Also return the replies under each comment. Each reply is a row and is charged like a comment.

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

Only with replies switched on. A popular comment can have thousands of replies, this keeps one thread from using the whole cap.

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

Hard stop across all videos, also your budget cap. 0 means no limit.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxComments": 0
}
```

# Actor output Schema

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

All comments from this run as JSON, one object per comment.

## `commentsCsv` (type: `string`):

The same comments as a CSV download.

# 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("datasignalslab/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=jNQXAC9IVRw"] }

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

```

## MCP server setup

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