# YouTube Comments Scraper | Comments & Replies (`atesen-software/youtube-comments-scraper`) Actor

Scrape comments and replies from any YouTube video or Short: text, author, likes, reply count, creator heart and date. Sort by top or newest. No API key, no login, no browser. $0.90 per 1,000 comments. Video info rows are free.

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

## Pricing

from $0.72 / 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

Scrape **YouTube comments and replies** from any **video or Short**: comment text, author, author channel, **likes, reply count, creator heart**, channel-owner and verified flags, and the comment date. Sort by **top** or **newest**, thousands of comments per video. Export to JSON, CSV or Excel, or use the API.

- **$0.90 per 1,000 comments**, less than half the price of the most popular YouTube comments scraper ($2 per 1,000). Video info and status rows are free.
- **No YouTube API key or login**. Reads the normal public watch page and follows its comment continuations with the context supplied by that page. Uses HTTP, no browser, 256 MB. YouTube can still restrict access or change the response format.
- **Replies** included on request (`includeReplies`), each with `parentCommentId`.
- Works with `watch?v=`, `youtu.be`, `/shorts/`, `/live/` URLs and plain video IDs.
- Comments-off, private and deleted videos produce free status rows; the run never fails because of one bad URL.

Comment status and video-info rows do not trigger the comment event. The separate Actor start fee still applies when a run starts. A `blocked`, `parse_error` or `partial` row describes unavailable data; it is not a comment result. HTTP 403 or verification pages are not bypassed with proxies, login or CAPTCHA workarounds. Missing comment data is not automatically described as comments being disabled.

### Use cases

- **Sentiment and audience research**: what viewers say about a product, brand, game or creator.
- **AI and LLM datasets**: real user opinions for topic modelling, classification and RAG.
- **Influencer marketing**: engagement quality of a creator's audience before you sponsor them.
- **Competitor and product feedback**: feature requests and complaints under competitor videos.
- **Giveaways**: export all comments to pick winners.

### Input

| Field | Description |
|---|---|
| `videos` | Video / Shorts URLs or IDs |
| `maxCommentsPerVideo` | Default 100, 0 = all |
| `sort` | `top` or `newest` |
| `includeReplies`, `maxRepliesPerComment` | Replies under comments |
| `includeVideoInfo` | Free row per video with the total comment count |

```json
{
  "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
  "maxCommentsPerVideo": 500,
  "sort": "top",
  "includeReplies": true,
  "maxRepliesPerComment": 10
}
```

### Output

```json
{
  "type": "comment",
  "videoId": "dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "commentId": "UgyEnXfdC-umwvTt8JF4AaABAg",
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgyEnXfdC-umwvTt8JF4AaABAg",
  "text": "Gonna flag this for nudity so I can rick roll the YouTube staff",
  "author": "@Oatman69",
  "authorChannelId": "UCWf34D_s8K_m2vwBISIDWtg",
  "likeCount": 568000,
  "replyCount": 719,
  "heartedByCreator": false,
  "authorIsChannelOwner": false,
  "publishedTimeText": "6 years ago",
  "publishedAtApprox": "2020-10-22T00:00:00.000Z",
  "isReply": false,
  "parentCommentId": null
}
```

YouTube shows comment dates as relative text ("6 years ago"); `publishedAtApprox` converts it to an approximate ISO date. Like counts over 1,000 are rounded by YouTube ("568K").

### FAQ

**How many comments can I get?** As many as YouTube shows in the comment section, often hundreds of thousands for big videos. Set `maxCommentsPerVideo` to 0.

**Is this the official API?** No. It reads the same public data the YouTube website shows, without an API key or quota. Not affiliated with YouTube or Google.

### Pricing

Pay per event: **$0.0009 per comment** ($0.90 per 1,000). Video info rows and status rows are free. Replies are charged as comments when you turn `includeReplies` on. Set a maximum cost per run and the Actor stops there.

# Actor input Schema

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

YouTube video, Shorts or youtu.be URLs, or 11-character video IDs, one per line.

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

Comments plus replies. 0 = all comments YouTube shows.

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

Order of top-level comments.

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

Also scrape replies under each comment (each reply is one comment row with parentCommentId).

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

Only when replies are on. 0 = all replies.

## `includeVideoInfo` (type: `boolean`):

One free row per video with its title and total comment count.

## `maxConcurrency` (type: `integer`):

How many videos are scraped at the same time.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "includeVideoInfo": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

## `allFields` (type: `string`):

No description

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

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

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

```

## MCP server setup

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