# YouTube Comment Scraper (`myagizm/youtube-comment-scraper`) Actor

Scrape YouTube video comments — author, text, likes, replies, timestamps. No login, no API key.

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

## Pricing

from $0.78 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Comment Scraper — Scrape YouTube Comments at Scale (No API Key, No Login)

<p align="center">
Scrape YouTube comments from any public video — author, comment text, like counts, reply counts, timestamps, thread level, channel ID, avatar and verification status — as clean, structured data. No API key, no login, no cookies or account required. Export scraped data to JSON, CSV, Excel, or XML, schedule runs via API, and integrate with your tools and AI workflows.
</p>

<p align="center">
<strong>Built for AI agents:</strong> call this Actor directly from Claude, ChatGPT / Codex, and Cursor through the <a href="https://apify.com/apify/actors-mcp-server">Apify MCP server</a> — hand your assistant a YouTube link and get back ready-to-use comment data.
</p>

<p align="center">
<a href="https://apify.com/myagizm/youtube-comment-scraper"><img src="https://img.shields.io/badge/▶-Try%20Now-2ea44f?style=for-the-badge" alt="Try Now"></a>
<a href="https://apify.com/myagizm/youtube-comment-scraper/input-schema"><img src="https://img.shields.io/badge/⚙-Input%20Schema-blue?style=for-the-badge" alt="Input Schema"></a>
<a href="https://apify.com/myagizm/youtube-comment-scraper/api"><img src="https://img.shields.io/badge/{}-API%20Docs-orange?style=for-the-badge" alt="API Docs"></a>
</p>

<p align="center">
<a href="#what-can-youtube-comment-scraper-do">What it does</a> ·
<a href="#use-with-ai-agents-mcp">AI agents (MCP)</a> ·
<a href="#how-to-scrape-youtube-comments">How to use</a> ·
<a href="#what-data-can-you-scrape-from-youtube-comments">Output data</a> ·
<a href="#limits">Limits</a> ·
<a href="#output-example">Example</a> ·
<a href="#how-much-does-scraping-youtube-comments-cost">Pricing</a> ·
<a href="#integrations">Integrations</a> ·
<a href="#faq">FAQ</a> ·
<a href="#want-other-youtube-data">Other Actors</a>
</p>

***

### What can YouTube Comment Scraper do? {#what-can-youtube-comment-scraper-do}

**YouTube Comment Scraper** lets you scrape YouTube comments from any public video and returns them as structured, analysis-ready data. Drop in one or more video links (or a channel, a Shorts tab, a search-results page, or plain search keywords) and the Actor gathers the comment threads for you — no scrolling, no browser extensions, no Google account, and no developer API key.

Every comment comes back with the author, the full comment text, like counts, reply counts, the thread level (top-level comment vs. reply), the published timestamp, the author's channel ID and avatar, and whether the author is a verified channel. It works with only **publicly available data**, goes beyond the limitations of the official YouTube API, and lets you scrape YouTube comments **at scale**. Export scraped data to JSON, CSV, Excel, or XML, schedule runs via API, and integrate with your tools and AI workflows.

#### 💬 Scrape comments from any public YouTube video

Paste a `watch?v=…` link, a `youtu.be` short link, or a Shorts URL. The Actor reads the comment section and returns each comment as its own record — ready for sentiment analysis, moderation, or research. **Get your first results free in under 2 minutes.**

#### 🗂️ Scrape YouTube comments across channels, Shorts tabs & search pages

Pass a **channel URL**, a channel's **/shorts** tab, or a **YouTube search-results URL** and the Actor expands it into the underlying videos, then scrapes comments from each one. One input, many videos — scrape YouTube comments from a bunch of videos at once.

#### 🔎 Search YouTube by keyword

Provide plain search terms like `best places of england` and the Actor finds matching videos and scrapes their comments alongside anything you linked directly — great when you don't already have specific URLs.

#### 🔁 Capture replies, not just top-level comments

Replies are included in the results and marked with a `replyLevel` field so you can tell a top-level comment (`0`) from a reply. The per-video comment budget counts replies too, so you always know your ceiling.

#### 📊 Rich engagement metadata

Each record carries `likeCount` and `replyCount` (in YouTube's human-readable form, e.g. `269K`), plus `publishedTime`, `authorIsVerified`, `authorChannelId` and `authorAvatar` — enough to rank, filter, and profile commenters.

#### ↕️ Sort by Top or Newest

Choose whether to pull the most-engaged comments first (`top`) or the latest ones (`new`) — perfect for tracking reactions to a fresh upload or surfacing the most-liked takes.

#### ⚡ Zero setup — no API key, no login, we handle it for you

No cookies to paste, no proxies to configure, no rate-limit juggling. The Actor manages access and formatting internally and returns clean, fresh records every time — fast response times deliver data in seconds. 🚀

***

### Use with AI agents — Claude, ChatGPT & Cursor (MCP) {#use-with-ai-agents-mcp}

This Actor is fully compatible with the [Apify MCP server](https://apify.com/apify/actors-mcp-server), so AI assistants can run it as a tool and reason over the results.

- **Claude** (Desktop, Code, or the API) — add the Apify MCP server and let Claude fetch and analyze comments on demand.
- **ChatGPT / Codex** — expose the Actor as a tool and have the model summarize sentiment or extract themes.
- **Cursor** — call the scraper from your editor while building comment-analysis features.

Because output is clean JSON, it drops neatly into downstream **MCP connectors and automation platforms** — Slack, Notion, Airtable, Google Sheets, Zapier, Make, and n8n — so an agent can scrape YouTube comments, summarize, and file the results without you writing glue code.

> Example agent prompt: *"Use the YouTube Comment Scraper to pull the top 100 comments from this video, then give me the five most common complaints and the overall sentiment."*

***

### How to scrape YouTube comments {#how-to-scrape-youtube-comments}

1. Click **Try Now** (or open the Actor at [apify.com/myagizm/youtube-comment-scraper](https://apify.com/myagizm/youtube-comment-scraper)).
2. Add one or more **Video URLs** under `startUrls` — or paste channel / Shorts / search-result links.
3. *(Optional)* Add plain **Search terms** to discover videos by keyword.
4. Choose a **Sort** order — `top` or `new`.
5. Set **Max comments per video** and the overall **Max total comments** cap.
6. Click ▶ **Save & Start**.
7. When the run finishes, open the **Dataset** tab and export as JSON, CSV, Excel, or XML — or grab it via API.

That's it. No API key, no login, no configuration files — and no limitations on the number of videos you queue.

***

### What data can you scrape from YouTube comments? {#what-data-can-you-scrape-from-youtube-comments}

Each item in the dataset is a single comment (top-level or reply). When you scrape YouTube comments, these fields are returned:

| Field | Type | Description |
|-------|------|-------------|
| `text` | string | The full comment text |
| `author` | string | Commenter's handle, e.g. `@YouTube` |
| `authorChannelId` | string | The commenter's YouTube channel ID |
| `authorAvatar` | string | URL of the commenter's profile picture |
| `authorIsVerified` | boolean | Whether the commenter's channel is verified |
| `commentId` | string | Unique ID of the comment |
| `likeCount` | string | Likes in human-readable form, e.g. `269K` |
| `replyCount` | string | Number of replies, e.g. `961` |
| `replyLevel` | integer | `0` for a top-level comment, higher for replies |
| `publishedTime` | string | Relative timestamp, e.g. `1 year ago` |
| `videoUrl` | string | URL of the video the comment belongs to |
| `videoTitle` | string | Title of the source video |

***

### Use cases for scraping YouTube comments

- **Sentiment & opinion analysis** — measure how an audience reacts to a launch, trailer, or announcement.
- **Brand & product research** — mine feedback, feature requests, and complaints from your own or competitors' videos.
- **Content strategy** — find the questions and topics your viewers care about most.
- **Community moderation** — export comments for keyword and spam review.
- **Influencer vetting** — inspect engagement quality and the audience behind a creator's videos.
- **Competitor analysis & campaign tracking** — monitor how audiences respond across rival channels over time.
- **Academic & social research** — build datasets of public discourse around a topic or event.
- **Lead & audience discovery** — surface verified and highly-engaged commenters for outreach.

***

### Input examples for scraping YouTube comments

All examples use the Actor's real input fields. Only the fields you need are required — everything else has sensible defaults.

#### Scrape comments from a single video

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top"
}
```

#### Scrape comments from several videos at once

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
    { "url": "https://youtu.be/9bZkp7q19f0" },
    { "url": "https://www.youtube.com/shorts/abc1234XYZ" }
  ],
  "maxCommentsPerVideo": 50,
  "sort": "new",
  "maxItems": 100
}
```

#### Expand a channel or Shorts tab

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/@YouTube" },
    { "url": "https://www.youtube.com/@MrBeast/shorts" }
  ],
  "maxCommentsPerVideo": 40,
  "sort": "top"
}
```

#### Discover videos by keyword

```json
{
  "searchTerms": [
    "best places of england",
    "iphone 16 review"
  ],
  "maxCommentsPerVideo": 30,
  "maxItems": 100,
  "sort": "top"
}
```

#### Scrape from a YouTube search-results URL

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/results?search_query=machine+learning" }
  ],
  "maxCommentsPerVideo": 25,
  "sort": "new"
}
```

***

### Input reference

| Field | Key | Type | Default | Notes |
|-------|-----|------|---------|-------|
| Video URLs | `startUrls` | array of URLs | `watch?v=dQw4w9WgXcQ` | Video, channel, `/shorts`, or search-result URLs; each is expanded automatically |
| Max comments per video | `maxCommentsPerVideo` | integer | `100` | Upper bound per video, replies included (1–100) |
| Sort | `sort` | string | `top` | `top` or `new` |
| Max total comments | `maxItems` | integer | `100` | Hard cap across all videos (1–100) |
| Search terms | `searchTerms` | array of strings | `[]` | Plain YouTube search queries; Shorts results keep only Shorts |

***

### Limiting results {#limits}

Two fields keep your runs fast and predictable:

- **`maxCommentsPerVideo`** *(default 100)* — the ceiling on comments fetched **per video**, replies included.
- **`maxItems`** *(default 100)* — a hard cap on the **total** number of comment records across every video in the run.

Whichever limit is reached first stops that portion of the run. A single run lasts at most about ten minutes, so set your caps to match how many comments you actually need.

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
  ],
  "maxCommentsPerVideo": 25,
  "maxItems": 50,
  "sort": "top"
}
```

***

### Output example {#output-example}

A single record from the dataset:

```json
{
  "text": "can confirm: he never gave us up",
  "author": "@YouTube",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentId": "Ugzge340dBgB75hWBm54AaABAg",
  "likeCount": "269K",
  "replyCount": "961",
  "replyLevel": 0,
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "authorAvatar": "https://yt3.ggpht.com/3s6evpqAiDU9tQR4sC2siJippbH2RWVPnwHgyl4V0th2iuQz0VDQZbUhQBGmsxLYo-mjG6TqZQ=s88-c-k-c0x00ffffff-no-rj",
  "publishedTime": "1 year ago",
  "authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
  "authorIsVerified": true
}
```

Each run produces a dataset of records like this one — export the whole set as JSON, CSV, Excel, XML, HTML, or RSS from the **Dataset** tab or via API.

***

### How much does scraping YouTube comments cost? {#how-much-does-scraping-youtube-comments-cost}

Scraping YouTube comments runs on a simple **pay-per-result** model — you pay for the comments you collect, nothing more. There are no monthly platform fees to use it and no separate YouTube API costs, because no developer API key is involved.

Because it fetches comments efficiently and caps each run, costs stay low and predictable. New Apify accounts include free monthly usage credits, so you can **get your first results free in under 2 minutes** at no cost. See the **Pricing** tab on the Actor page for current per-result rates.

***

### Integrate with n8n, Zapier, and Make {#integrations}

Run the Actor from anywhere via the Apify API. The Actor path is `myagizm~youtube-comment-scraper`.

#### Run synchronously and get the dataset items

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-comment-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [ { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } ],
    "maxCommentsPerVideo": 100,
    "sort": "top"
  }'
```

#### Start a run asynchronously

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-comment-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": [ "iphone 16 review" ],
    "maxItems": 100,
    "sort": "new"
  }'
```

#### Fetch results from a finished run

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_APIFY_TOKEN&format=json"
```

Native connectors are available for **Make, Zapier, n8n, Slack, Airbyte, Gumloop, CrewAI, IFTTT, Lindy, GitHub, Google Sheets, and Google Drive**, plus webhooks that fire when a run finishes — so you can push comments downstream automatically.

***

### Support {#support}

Questions, feature requests, or a video that isn't scraping as expected? Open an **Issue** on the Actor page and include your input configuration and the video URL. Feedback directly shapes updates, and reproducible reports are handled quickly.

***

### FAQ — scraping YouTube comments {#faq}

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

No. There is no API key, no login, and no OAuth — no cookies or account required. Just add a link or a search term and run it.

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

This Actor collects only **publicly available** comments — the same content anyone can see without logging in. As with any scraping, you are responsible for how you use the data. Avoid collecting personal data unlawfully and follow YouTube's terms and applicable regulations such as GDPR.

#### Can I use YouTube Comment Scraper with the Apify API?

Yes. Start runs and fetch results through the Apify API using the Actor path `myagizm~youtube-comment-scraper` — see the API snippets above for synchronous and asynchronous examples.

#### Can I get YouTube comment data through an MCP server (AI agents)?

Yes. It works as a tool through the Apify MCP server, so AI agents like Claude, ChatGPT, and Cursor can run it and analyze the results.

#### Do I need proxies to scrape YouTube comments?

No. Access and formatting are handled internally, so there's nothing to set up — no proxies, no cookies.

#### Can I integrate YouTube comment data with other apps?

Yes. Native connectors cover Make, Zapier, n8n, Slack, Google Sheets, and more, plus webhooks — so scraped comments flow into your stack automatically.

#### Can I export YouTube comments to CSV, Excel, or JSON?

Yes — JSON, CSV, Excel, XML, HTML, and RSS, from the Dataset tab or via the API.

#### Can I scrape comments from multiple videos at once?

Yes. Add several links to `startUrls`, or pass a channel URL, a `/shorts` tab, a search-results URL, or `searchTerms` — each is expanded into videos automatically, with no limitations on how many you queue.

#### Can I schedule the YouTube Comment Scraper?

Yes. Use Apify **Schedules** to run it hourly, daily, or on any cron pattern, and webhooks to deliver new comments downstream.

#### Can I scrape comments from private videos?

No. Only publicly available comments are collected — private or unlisted content requiring a login is not accessible.

#### Does it include replies or only top-level comments?

Replies are included and marked with `replyLevel` (top-level comments are `0`). Replies also count toward the per-video comment budget.

#### How many comments can I get per video?

Up to `maxCommentsPerVideo` (default and maximum 100 per video, replies included), bounded by the overall `maxItems` cap.

#### What's the difference between `sort: top` and `sort: new`?

`top` returns the most-engaged comments first; `new` returns the most recent comments first.

#### Why are `likeCount` and `replyCount` strings like "269K"?

They're returned in YouTube's human-readable abbreviated form. Convert them to numbers in your own pipeline if you need exact integers.

#### How long does a run take?

A single run lasts at most about ten minutes. Set your `maxCommentsPerVideo` and `maxItems` caps to match the volume you need — fresh data, no caching.

#### What happens if a video has comments disabled?

Videos with disabled comments simply return no comment records; the run continues with the remaining inputs.

***

### Want other YouTube data? {#want-other-youtube-data}

Scraping comments is just one piece. Explore the rest of the **myagizm** YouTube toolkit to scrape everything else YouTube exposes:

- [YouTube Channel Scraper](https://apify.com/myagizm/youtube-channel-scraper) — list a channel's videos with stats and metadata.
- [YouTube Video Info Scraper](https://apify.com/myagizm/youtube-video-info) — pull views, likes, description, and details for any video.
- [YouTube Transcript Scraper](https://apify.com/myagizm/youtube-transcript-scraper) — extract full video transcripts and subtitles.
- [YouTube Video Downloader](https://apify.com/myagizm/youtube-video-downloader) — download videos in multiple resolutions.
- [YouTube Shorts Downloader](https://apify.com/myagizm/youtube-shorts-downloader) — download Shorts quickly.
- [YouTube to MP3](https://apify.com/myagizm/youtube-mp3-downloader) — grab audio from any YouTube video.

***

### Related searches {#related-searches}

youtube comment scraper · export youtube comments · youtube comments to excel · youtube comment sentiment analysis · youtube feedback mining · scrape youtube comments without api key · youtube comment export tool · youtube comments csv · product feedback from youtube · x402 actor · ai agent scraper no account · pay with usdc api · mcp scraper for agents

***

### Run it from an AI agent — no Apify account needed (x402) {#x402}

This actor accepts **agentic payments** over the open [x402 protocol](https://docs.apify.com/integrations/x402). An AI agent can pay for a run in **USDC on Base** and get the data without an Apify account, a credit card, or an API key:

```bash
## one-time: wallet + prepaid token (agent side)
npx -y awal auth login <email>
npx awal x402 pay 'https://agi.apify.com/protocols/x402/prepaid-tokens?amount=1&currency=usd' --max-amount 1000000 --json
## then use the returned token exactly like an Apify API token
curl "https://api.apify.com/v2/acts/myagizm~youtube-comment-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $PREPAID_TOKEN" -H 'Content-Type: application/json' -d '{INPUT}'
```

Why it works here: this actor is **pay per event** and runs with **limited permissions**, the two conditions x402 requires. You are charged per result, so an agent pays only for the rows it receives. The prepaid token is a hard spending cap and expires 14 days after purchase.

***

### Disclaimer

This is an independent tool and is not affiliated with, endorsed by, or sponsored by YouTube. All product names, logos, and brands are property of their respective owners. This Actor is intended for collecting publicly available data and should be used in compliance with YouTube's terms of service and applicable laws, including data-protection regulations such as GDPR.

***

### Resources {#resources}

- [Actor input schema](https://apify.com/myagizm/youtube-comment-scraper/input-schema)
- [Actor API reference](https://apify.com/myagizm/youtube-comment-scraper/api)
- [Apify API documentation](https://docs.apify.com/api/v2)
- [Apify MCP server](https://apify.com/apify/actors-mcp-server) — use Actors as AI-agent tools
- [Exporting dataset results](https://docs.apify.com/platform/storage/dataset) — JSON, CSV, Excel and more
- [Scheduling Actor runs](https://docs.apify.com/platform/schedules)

***

## 中文说明 —— YouTube 评论抓取工具

**免登录抓取 YouTube 公开数据** —— 抓取视频评论及作者、点赞与回复数。不需要 API Key、不需要 OAuth 应用、不需要登录或 Cookie。结果可导出为 JSON、CSV、Excel、XML，也可通过 Apify API 定时运行并接入 n8n、Zapier、Make 等工具。

> **两分钟内免费拿到第一批数据** —— 填入内容、点击 Start 即可。无需配置，试用不需要信用卡。

### 能做什么

- 💬 **抓取视频评论**，可按 `top` 或 `new` 排序。
- 👤 **评论者名称与频道链接**。
- ❤️ **评论点赞数与回复数**。
- 🔎 **可按搜索词批量抓取命中视频的评论**。
- 🚫 **无需 API Key、无配额限制**。
- 📤 **导出** JSON / CSV / Excel / XML。

### 谁在用

- 😀 **情感分析** —— 评论区是最直接的用户反馈。
- 🛒 **产品团队** —— 挖掘功能请求与吐槽。
- 🧑‍💻 **NLP 团队** —— 构建多语种评论语料。
- 📣 **内容团队** —— 从评论中找下一个视频选题。

### 可以抓取哪些数据

| 字段 | 类型 | 说明 |
|------|------|------|
| `text` | string | 正文 |
| `author` | string | 作者 |
| `authorChannelId` | string | The commenter's YouTube channel ID |
| `authorAvatar` | string | URL of the commenter's profile picture |
| `authorIsVerified` | boolean | Whether the commenter's channel is verified |
| `commentId` | string | Unique ID of the comment |
| `likeCount` | string | 点赞数 |
| `replyCount` | string | 回复数 |
| `replyLevel` | integer | `0` for a top-level comment, higher for replies |
| `publishedTime` | string | Relative timestamp, e.g. `1 year ago` |
| `videoUrl` | string | URL of the video the comment belongs to |
| `videoTitle` | string | Title of the source video |

> 字段取决于该条目公开了什么；不存在的值返回 `null`，数据结构保持稳定。

### 输入示例

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top"
}
```

### 输出示例

```json
{
  "text": "can confirm: he never gave us up",
  "author": "@YouTube",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentId": "Ugzge340dBgB75hWBm54AaABAg",
  "likeCount": "269K",
  "replyCount": "961",
  "replyLevel": 0,
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "authorAvatar": "https://yt3.ggpht.com/3s6evpqAiDU9tQR4sC2siJippbH2RWVPnwHgyl4V0th2iuQz0VDQZbUhQBGmsxLYo-mjG6TqZQ=s88-c-k-c0x00ffffff-no-rj",
  "publishedTime": "1 year ago",
  "authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
  "authorIsVerified": true
}
```

### 价格

采用**按结果计费**：只为真正拿到的数据付费，不按运行时间收费。

- 💸 成本 = 结果数量 × 单价，预算可提前算清。
- 📉 Apify 的 Bronze / Silver / Gold / Platinum / Diamond 套餐享阶梯折扣。
- 🆓 新账号自带每月免费额度，第一次运行不花钱。
- 🚫 无代理附加费、无单次请求费、无最低消费。

实时价格见 [Apify 商店页面](https://apify.com/myagizm/youtube-comment-scraper)。

### 使用建议

- 🔀 **`top` 看代表性意见，`new` 看最新反馈**。
- ❤️ 按点赞排序快速抓住主流观点。
- 📏 单视频上限 100 条，需要更多请分多次或换排序。
- 🤖 批量送入大模型做情感与主题标注。

### 其他YouTube数据

- 📺 **[YouTube 频道抓取](https://apify.com/myagizm/youtube-channel-scraper)** —— 频道视频目录与统计。
- 💬 **[YouTube 评论抓取](https://apify.com/myagizm/youtube-comment-scraper)** —— 评论、作者与点赞。
- 📝 **[YouTube 字幕抓取](https://apify.com/myagizm/youtube-transcript-scraper)** —— 带时间戳的逐行字幕。
- ℹ️ **[YouTube 视频信息](https://apify.com/myagizm/youtube-video-info)** —— 标题、观看数、点赞、简介等元数据。
- ⬇️ **[YouTube 视频下载](https://apify.com/myagizm/youtube-video-downloader)** —— 按清晰度下载完整视频。
- 🎬 **[YouTube Shorts 下载](https://apify.com/myagizm/youtube-shorts-downloader)** —— 批量保存 Shorts。
- 🎵 **[YouTube 转 MP3](https://apify.com/myagizm/youtube-mp3-downloader)** —— 提取音频。

其他平台同样是免登录、按结果计费：**[Instagram](https://apify.com/myagizm/instagram-profile-scraper-v2)** ·
**[TikTok](https://apify.com/myagizm/tiktok-profile-scraper-v2)** · **[X（推特）](https://apify.com/myagizm/x-tweets-scraper)** ·
**[Reddit](https://apify.com/myagizm/reddit-scraper-v2)** · **[Google 地图](https://apify.com/myagizm/google-maps-scraper)** ·
**[Google 新闻](https://apify.com/myagizm/google-news-scraper)**。完整家族见 **[myagizm 商店主页](https://apify.com/myagizm)**。

### 配合 AI 智能体使用（MCP）

本 Actor 已接入 **Apify MCP 服务器**，Claude、ChatGPT、Cursor 等助手可以把它当作工具直接调用，用自然语言提问即可拿到结构化结果，无需写胶水代码。

### 集成与 API

支持 **Make、Zapier、n8n、Slack、Airbyte、Gumloop、CrewAI、IFTTT、Lindy、GitHub、Google Sheets、Google Drive**，以及 Webhook、定时任务与 MCP 服务器。

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~youtube-comment-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top"
}'
```

把 `format` 改成 `json`、`csv`、`xlsx` 或 `xml` 即可导出不同格式。

### 常见问题

**需要 API Key 或登录吗？**
不需要。没有 API Key、没有 OAuth 应用、不登录、不用 Cookie，也不会使用你的账号。

**抓取YouTube合法吗？**
只采集公开可见的数据，即任何未登录访客都能看到的内容，不登录、不绕过访问控制。合规责任由使用者承担：如涉及个人数据请遵守 GDPR / CCPA 与平台条款。

**能抓私密内容吗？**
不能，需要登录或已删除的内容会被跳过并记录在日志中。

**需要配置代理吗？**
不需要，已内置托管。

**支持导出 CSV / Excel / JSON 吗？**
支持 JSON、CSV、Excel、XML。

**可以通过 Apify API 调用吗？**
可以，见上方示例。

**支持 AI 智能体（MCP）吗？**
支持，Claude、ChatGPT、Cursor 均可当作工具调用。

**可以定时运行吗？**
可以，支持 Apify Schedules、API 与 Webhook。

**数据有多新？**
不缓存，每次运行都读取当前公开页面。

### 让 AI 代理直接调用 —— 无需 Apify 账号（x402）

本工具支持基于开放 [x402 协议](https://docs.apify.com/integrations/x402) 的**代理支付**：AI 代理可以用 **Base 链上的 USDC** 直接付费运行，无需 Apify 账号、信用卡或 API 密钥。

```bash
npx -y awal auth login <邮箱>
npx awal x402 pay 'https://agi.apify.com/protocols/x402/prepaid-tokens?amount=1&currency=usd' --max-amount 1000000 --json
curl "https://api.apify.com/v2/acts/myagizm~youtube-comment-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $PREPAID_TOKEN" -H 'Content-Type: application/json' -d '{INPUT}'
```

之所以可用：本工具采用**按事件计费**且以**受限权限**运行，这正是 x402 的两个前提条件。按结果计费，代理只为拿到的数据付费；预付令牌本身就是消费上限，购买后 14 天到期。

***

### 免责声明

本工具为独立第三方工具，与 YouTube / Google LLC 无任何隶属、认可或赞助关系，所有商标归各自所有者。

本 Actor 只采集**公开可见**的数据，不登录、不绕过访问控制、不获取私密内容。数据使用的合规责任由使用者承担。

### 相关搜索

youtube 评论抓取 · youtube 评论导出 csv · youtube 情感分析 · 免 api key 抓取评论 · youtube 用户反馈挖掘 · 评论数据集 · x402 支付 · ai 代理抓取 · usdc 付费 api

# Actor input Schema

## `startUrls` (type: `array`):

YouTube video URLs to scrape comments from, e.g. <code>https://www.youtube.com/watch?v=dQw4w9WgXcQ</code>. You can also pass channel/profile URLs (incl. the <code>/shorts</code> tab, e.g. <code>https://www.youtube.com/@MrBeast/shorts</code>) and YouTube search-result URLs (e.g. <code>https://www.youtube.com/results?search\_query=machine+learning</code>); each is expanded automatically.

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

Upper bound on comments fetched per video (includes replies). For example, set <code>50</code> to collect up to 50 comments from each video.

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

Comment order. Choose <code>top</code> to get the most-engaged comments first, or <code>new</code> for the most recent — e.g. use <code>new</code> to track reactions to a fresh upload.

## `maxItems` (type: `integer`):

Hard cap across all videos in the run. For example, set <code>100</code> to stop once 100 comment records have been collected in total. A run lasts at most ~10 minutes.

## `searchTerms` (type: `array`):

Plain YouTube search queries (e.g. <code>best places of england</code> or <code>iphone 16 review</code>). Matching videos are processed alongside any links above. For Shorts, only Shorts among the results are kept.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top",
  "maxItems": 100,
  "searchTerms": []
}
```

# Actor output Schema

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

All scraped items as structured JSON.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        }
    ],
    "maxCommentsPerVideo": 100,
    "sort": "top",
    "maxItems": 100,
    "searchTerms": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("myagizm/youtube-comment-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 = {
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
    "maxCommentsPerVideo": 100,
    "sort": "top",
    "maxItems": 100,
    "searchTerms": [],
}

# Run the Actor and wait for it to finish
run = client.actor("myagizm/youtube-comment-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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxCommentsPerVideo": 100,
  "sort": "top",
  "maxItems": 100,
  "searchTerms": []
}' |
apify call myagizm/youtube-comment-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/wP7UXgZIRog9Z7gYA/builds/PsEcLmWVrr4WknukR/openapi.json
