# YouTube Comments Scraper — Top, Newest & Replies (`zulfi_2026/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies from any video — text, author, likes, reply counts, published time. One result per comment. Uses YouTube's public web API: no login, no API key, no proxy.

- **URL**: https://apify.com/zulfi_2026/youtube-comments-scraper.md
- **Developed by:** [Zulkifal Khan](https://apify.com/zulfi_2026) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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 — Top, Newest & Replies

### What does YouTube Comments Scraper do?

Give it video links and it returns every comment as structured data —
text, author, likes, reply count, published time, and the replies under
each comment. One result per comment, replies included as their own
items linked to their parent.

It reads YouTube's **public InnerTube web API** — the same JSON endpoints
the youtube.com website itself uses to load comments. **No login, no API
key, no proxy, no browser, no CAPTCHA solving.** Comments load in pages
of 20 through YouTube's own continuation tokens, and replies load per
thread the same way.

### 🎯 Professional use cases

- 💬 **Sentiment & audience research** — For brands, agencies, and
  researchers. Read what viewers actually say about a video, a product,
  or a topic — top comments, like counts, and reply threads show what
  the audience cares about in their own words.
- 🔍 **Competitor comment mining** — For creators and marketers. Mine
  rival channels' comments for the questions, complaints, and requests
  their audiences keep repeating — the gaps your content can fill.
- 🎬 **Content ideas from comments** — For creators and editors. The
  most-liked comments on your own and others' videos are a direct list
  of what viewers want next; sort by Top to find them in seconds.
- 🛡️ **Moderation & brand-safety review** — For community managers and
  agencies. Export a video's comments for review workflows — spot spam
  patterns, repeat offenders, and threads that need attention, with
  author and like data attached to every comment.
- 📊 **Social listening & trend spotting** — For analysts and newsrooms.
  Track how the conversation around a topic shifts across videos:
  newest-first comments catch reactions as they happen, top comments
  show what the crowd settled on.
- 🧪 **Product feedback mining** — For product teams. Pull comments
  from review and unboxing videos to hear real user language about a
  product — praise, bugs, and feature requests, with like counts
  ranking what matters most.

### Input

| Icon | Field | What it does |
|---|---|---|
| 🎬 | **Video URLs** | One per line. A video URL (`https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `https://youtu.be/dQw4w9WgXcQ`) or a bare video ID (`dQw4w9WgXcQ`). |
| ↕️ | **Sort comments by** | Top comments (YouTube's featured ranking) or Newest first. |
| 🔢 | **Max comments per video** | Default 100, up to 1,000 top-level comments per video. |
| 💬 | **Include replies** | On by default. Fetches replies under each top-level comment. |
| ↩️ | **Max replies per comment** | Default 10, up to 50 replies per top-level comment. |
| 👍 | **Minimum likes** | Default 0 (keep everything). Set higher to keep only comments with at least that many likes. |

At least one video is required. A video that cannot be loaded (bad URL,
deleted video, comments disabled) fails cleanly and the run continues
with the other videos.

### Output

One dataset item per comment (replies are separate items with
`replyLevel` 1 and `parentCommentId` set):

```json
{
  "commentId": "Ugxzbv_ZeZXNRcfwsSF4AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "text": "Is everyone going to ignore the fact that Rick Astley looks like a twelve year old boy but has a uniquely deep voice?",
  "authorChannelId": "UCNLgzvqrGzFi5SEAbVkFchg",
  "authorName": "@candycake9531",
  "authorUrl": "https://www.youtube.com/channel/UCNLgzvqrGzFi5SEAbVkFchg",
  "authorAvatarUrl": "https://yt3.ggpht.com/ytc/AIdro_mEO82VrM8XtyGrBUkJgbAYgpAmDpUZixd1QvK9kyA=s88-c-k-c0x00ffffff-no-rj",
  "authorIsVerified": false,
  "authorIsCreator": false,
  "likeCount": 293000,
  "replyCount": 736,
  "publishedTimeText": "7 years ago",
  "replyLevel": 0,
  "parentCommentId": null,
  "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
```

#### Output fields

| Field | Description |
|---|---|
| `commentId` | YouTube's unique ID for the comment. |
| `videoId` / `videoTitle` / `videoUrl` | The video the comment belongs to. |
| `text` | The comment text. |
| `authorChannelId` / `authorName` / `authorUrl` | The commenter's channel ID, display name, and link. |
| `authorAvatarUrl` | The commenter's avatar image URL. |
| `authorIsVerified` / `authorIsCreator` | Whether the author is verified, and whether they are the video's creator. |
| `likeCount` | Number of likes on the comment. |
| `replyCount` | Number of replies (top-level comments only). |
| `publishedTimeText` | Publish time as shown on YouTube ("7 years ago"). |
| `replyLevel` | `0` for a top-level comment, `1` for a reply. |
| `parentCommentId` | For replies: the `commentId` of the top-level comment it answers. |
| `source` | The video URL or ID the comment was fetched through. |

A per-video summary (comments found and pushed per video, plus any video
that failed) is saved to the key-value store under the key `SUMMARY`.

### Notes

- Only **public** comment data is collected: text, authors, like counts,
  and timestamps that YouTube itself displays publicly. No private data,
  no user accounts, no login sessions.
- YouTube serves comments 20 per page; large runs page through them
  automatically. YouTube may rate-limit very large runs; the actor
  paces page requests and retries transient failures once.
- You are responsible for complying with YouTube's Terms of Service and
  applicable law when using the data this Actor returns.

# Actor input Schema

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

Also fetch replies to each top-level comment (up to Max replies per comment). Replies are returned as separate dataset items with replyLevel 1 and parentCommentId set.

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

Maximum number of top-level comments returned per video. Replies are counted separately (see Max replies per comment). Higher values return more comments but use more compute.

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

Maximum replies fetched per top-level comment. Only applies when Include replies is on. Set to 0 to skip replies even when Include replies is on.

## `minLikes` (type: `integer`):

Only keep comments with at least this many likes. Set to 0 to keep every comment.

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

How comments are ordered. Top returns YouTube's featured ranking; Newest first returns the most recent comments first.

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

YouTube videos to fetch comments from. One per line. A video URL (https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://youtu.be/dQw4w9WgXcQ) or a bare video ID (dQw4w9WgXcQ).

## Actor input object example

```json
{
  "includeReplies": true,
  "maxComments": 100,
  "maxRepliesPerComment": 10,
  "minLikes": 0,
  "sortBy": "top",
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing one item per comment.

# 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=dQw4w9WgXcQ"
    ]
};

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

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

```

## MCP server setup

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