# YouTube Comments Scraper (`logiover/youtube-comments-scraper`) Actor

Scrape all YouTube comments and replies from any video in bulk. Get author, comment text, like count, reply count, published time and verified/creator flags. No login, no API key. Export to JSON, CSV, Excel for sentiment analysis & research.

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

## Pricing

from $3.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## YouTube Comments Scraper 🗨️ — Export All Comments & Replies (No Login, No API Key)

**Scrape all YouTube comments** from any video in bulk and export them to **JSON, CSV or Excel**. This **YouTube comment scraper** pulls every comment *and* reply — with the **author, comment text, like count, reply count, published time** and verified / creator flags — without a YouTube login, cookie, or Google API key.

One run can return **tens of thousands of comments** from a single popular video. Use it for **sentiment analysis, audience research, brand monitoring, content moderation** and **AI / LLM training datasets**.

> ✅ No login · No cookies · No YouTube Data API key · No Google quota · Unlimited comments per video

---

### Why use this YouTube comments scraper?

- **Every comment, not just page one.** Auto-paginates the entire comment section — thousands of comments per video.
- **Replies included.** Optionally pull replies under each thread, linked to the parent via `parentCommentId`.
- **Top or newest.** Sort by `top` (highest engagement) or `newest` to catch fresh feedback.
- **Bulk videos.** Drop in a whole list of video URLs or IDs and scrape them all in one go.
- **Analysis-ready numbers.** Like counts are normalized to integers (`243K` → `243000`).
- **No YouTube API limits.** The official YouTube Data API caps comments and burns quota fast — this actor has neither problem.

---

### How to scrape YouTube comments (step by step)

You don't need to write code. Here's how to **extract YouTube comments** in under a minute:

1. **Open the actor** on Apify and click **Try for free**.
2. **Paste your video URLs or IDs** into the `videos` field — full `youtube.com/watch?v=…` links, `youtu.be/…` short links, Shorts URLs, or bare 11-character IDs.
3. *(Optional)* Set `sortBy` to `top` or `newest`, toggle `includeReplies`, and set `maxCommentsPerVideo`.
4. Click **Start** and watch comments stream into the dataset.
5. **Export** to JSON, CSV, Excel, or pull them via the Apify API into your app.

**Prefer the API?** Start a run with a single POST to the Apify [Run Actor endpoint](https://docs.apify.com/api/v2) and read results from the dataset — perfect for automating a **YouTube comment export** on a schedule.

---

### What data can you extract from YouTube comments?

| Data point | Field | Example |
|------------|-------|---------|
| Comment text | `text` | `"can confirm: he never gave us up"` |
| Author name | `author` | `"@YouTube"` |
| Author channel ID | `authorChannelId` | `"UCBR8-60-B28hp2BmDPdntcQ"` |
| Verified badge | `authorIsVerified` | `true` |
| Posted by the creator | `authorIsCreator` | `false` |
| Like count | `likeCount` | `243000` |
| Reply count | `replyCount` | `960` |
| Published (relative) | `publishedTime` | `"1 year ago"` |
| Reply vs top-level | `isReply` | `false` |
| Parent comment (replies) | `parentCommentId` | `"Ugz…AaABAg"` |
| Source video | `videoTitle`, `videoId`, `videoUrl` | — |

---

### Use cases

- **Sentiment analysis** — export every comment on a product launch, trailer or review and run NLP / LLM sentiment scoring.
- **Brand & reputation monitoring** — track what audiences say under your own or a competitor's videos.
- **Audience & market research** — mine feature requests, complaints and the exact language your customers use.
- **Creator & influencer analytics** — measure real engagement quality, not just view counts.
- **Content moderation** — pull comments for spam, abuse and policy filtering.
- **AI / LLM training data** — assemble large, real-world conversational datasets.
- **Academic & social research** — study discourse, virality and community dynamics at scale.

---

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `videos` | `string[]` | — | Video URLs or 11-char IDs (watch, `youtu.be`, Shorts all supported). |
| `maxCommentsPerVideo` | `integer` | `1000` | Cap per video (top-level + replies). `0` = unlimited. |
| `sortBy` | `string` | `top` | `top` or `newest`. |
| `includeReplies` | `boolean` | `false` | Also fetch replies (tagged with `parentCommentId`). |
| `maxResults` | `integer` | `0` | Global cap across all videos. `0` = unlimited. |

#### Example input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/9bZkp7q19f0"
  ],
  "maxCommentsPerVideo": 5000,
  "sortBy": "newest",
  "includeReplies": true
}
````

#### Example output

```json
{
  "videoId": "dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up",
  "commentId": "UgxKfM…",
  "text": "This song is timeless 🔥",
  "author": "@musicfan",
  "authorIsVerified": false,
  "likeCount": 1240,
  "replyCount": 7,
  "publishedTime": "2 months ago",
  "isReply": false,
  "parentCommentId": null,
  "scrapedAt": "2026-05-22T07:30:00Z"
}
```

***

### How it works

This **YouTube comment extractor** talks to YouTube's internal data layer (the same the website uses), fetching a fresh access key on each run so it keeps working as YouTube changes. It loads the comment section, paginates with continuation tokens until the video is exhausted or your cap is hit, and resolves replies through the `PARENT.REPLY` comment-ID convention. Built-in retries handle hiccups; videos with comments disabled are skipped gracefully.

***

### Frequently asked questions

**Do I need a YouTube API key or login to scrape comments?**
No. There's no login, no cookie, and no YouTube Data API key — and none of the official API's comment quota limits.

**How many YouTube comments can I scrape?**
As many as the video has publicly. Viral videos return tens of thousands. Use `maxCommentsPerVideo` to cap cost.

**Can I scrape YouTube comments without coding?**
Yes — paste video URLs in the Apify Console, click Start, and download CSV/Excel/JSON. No code required.

**Does it scrape replies too?**
Yes. Set `includeReplies: true`; replies carry `isReply: true` and a `parentCommentId`.

**Can I scrape comments from a whole channel?**
Use the **YouTube Channel Scraper** (or **YouTube Search Scraper**) to collect video IDs, then feed them here.

**Is scraping YouTube comments legal?**
This actor only collects **publicly visible** comment data. You are responsible for using the data in line with YouTube's Terms and applicable privacy laws (e.g. GDPR/CCPA) — avoid using personal data for unsolicited contact.

**Why is the date "2 years ago" instead of an exact date?**
YouTube only exposes a relative time on comments. Use `scrapedAt` as the reference point to convert it.

**What export formats are supported?**
JSON, CSV, Excel, HTML table, and RSS — plus the Apify API and integrations (Make, Zapier, n8n, Google Sheets).

***

### Limits & notes

- Published time is **relative** (`"2 years ago"`), and like counts are abbreviated by YouTube (parsed to integers in `likeCount`).
- Only **public** comments are returned; disabled/members-only comments yield nothing for that video.
- `includeReplies` can multiply volume on threads with thousands of replies — cap with `maxCommentsPerVideo`.

***

### The complete YouTube scraping toolkit

- **[YouTube Channel Scraper](https://apify.com/logiover/youtube-channel-scraper)** — every video of a channel
- **[YouTube Search Scraper](https://apify.com/logiover/youtube-search-scraper)** — find videos by keyword
- **[YouTube Video Details Scraper](https://apify.com/logiover/youtube-video-details-scraper)** — exact views, likes, tags
- **[YouTube Influencer Discovery](https://apify.com/logiover/youtube-influencer-discovery-scraper)** — creators, engagement & emails

***

### 💰 Pricing

Pay-per-result — you only pay for the comments you actually get. No proxy fees, no YouTube API costs.

### 🆘 Support

Need a whole channel's comments in one click, exact timestamps, or built-in sentiment scoring? Open an issue on the actor's page and we'll help.

# Actor input Schema

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

YouTube videos to scrape comments from. Accepts full watch URLs (https://www.youtube.com/watch?v=...), youtu.be short links, Shorts URLs, or bare 11-character video IDs. Add as many as you like.

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

Hard cap on comments saved per video (top-level + replies combined). Set 0 for unlimited (scrapes every comment — popular videos can have tens of thousands).

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

'top' = highest-engagement comments first (YouTube default). 'newest' = most recent first.

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

Also fetch replies under each comment thread (tagged with parentCommentId). Increases volume and run time substantially on threads with many replies.

## `maxResults` (type: `integer`):

Global cap across all videos in the run. 0 = unlimited.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 1000,
  "sortBy": "top",
  "includeReplies": false,
  "maxResults": 0
}
```

# Actor output Schema

## `author` (type: `string`):

Comment author name

## `text` (type: `string`):

Comment text

## `likeCount` (type: `string`):

Like count

## `replyCount` (type: `string`):

Reply count

## `publishedTime` (type: `string`):

Relative publish time

## `isReply` (type: `string`):

Reply vs top-level

## `videoTitle` (type: `string`):

Source video title

## `videoId` (type: `string`):

Source video ID

## `videoUrl` (type: `string`):

Source video URL

## `scrapedAt` (type: `string`):

Scrape timestamp

# 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"
    ],
    "sortBy": "top"
};

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

# Run the Actor and wait for it to finish
run = client.actor("logiover/youtube-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ],
  "sortBy": "top"
}' |
apify call logiover/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/youtube-comments-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Comments Scraper",
        "description": "Scrape all YouTube comments and replies from any video in bulk. Get author, comment text, like count, reply count, published time and verified/creator flags. No login, no API key. Export to JSON, CSV, Excel for sentiment analysis & research.",
        "version": "1.0",
        "x-build-id": "qOAraNizba7Gmz28I"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~youtube-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-youtube-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~youtube-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-youtube-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~youtube-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-youtube-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "videos"
                ],
                "properties": {
                    "videos": {
                        "title": "Video URLs or IDs",
                        "type": "array",
                        "description": "YouTube videos to scrape comments from. Accepts full watch URLs (https://www.youtube.com/watch?v=...), youtu.be short links, Shorts URLs, or bare 11-character video IDs. Add as many as you like.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxCommentsPerVideo": {
                        "title": "Max comments per video",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Hard cap on comments saved per video (top-level + replies combined). Set 0 for unlimited (scrapes every comment — popular videos can have tens of thousands).",
                        "default": 1000
                    },
                    "sortBy": {
                        "title": "Sort comments by",
                        "enum": [
                            "top",
                            "newest"
                        ],
                        "type": "string",
                        "description": "'top' = highest-engagement comments first (YouTube default). 'newest' = most recent first.",
                        "default": "top"
                    },
                    "includeReplies": {
                        "title": "Include replies",
                        "type": "boolean",
                        "description": "Also fetch replies under each comment thread (tagged with parentCommentId). Increases volume and run time substantially on threads with many replies.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max results (all videos)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Global cap across all videos in the run. 0 = unlimited.",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
