# YouTube Comment Scraper — Comments, Replies, Likes (`blackfalcondata/youtube-comment-scraper`) Actor

Scrape YouTube comments and their reply threads from any video, channel, or search query. Each comment carries author identity and badges, like and reply counts, and timestamps as structured JSON built for sentiment work. Sort by top or newest and re-run for only what is new.

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

## Pricing

from $0.25 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

### What does YouTube Comment Scraper do?

YouTube Comment Scraper pulls comments and their reply threads from [youtube.com](https://youtube.com) as structured JSON. Paste video URLs (watch links, Shorts, youtu.be, embeds, or bare video IDs), point it at a channel, or give it a search query — every matching video's comments come back with text, author, like and reply counts, verified/creator/pinned/hearted flags, YouTube's relative timestamp and an ISO date, plus a permalink to each comment. Sort by top or newest, attach reply threads to their parent comment, and re-run in incremental mode to receive only the comments posted since last time.

**New to Apify?** [Sign up free](https://console.apify.com/sign-up?fpr=1h3gvi) and use the included $5 monthly platform credit to test this actor.

### Key features

- **💬 Comments and their reply threads:** every comment comes back with its text, author, like and reply counts, and both YouTube's relative timestamp and an ISO date. Turn on `includeReplies` and each thread's replies are attached to their parent comment under `replies` — replies are part of that comment's charge, not billed as extra results.
- **🎯 By video, by channel, or by search:** paste video URLs (watch, Shorts, youtu.be, embed, or bare video IDs), or point it at a channel and get comments across its latest videos, or give it a search query and get comments from the top matching videos. Mix all three in one run; `maxVideos` bounds what channels and searches contribute, and pasted video URLs are always processed in full.
- **🏷️ Author and engagement signals:** each comment carries the author's channel URL, avatar, and badges, plus `authorIsVerified`, `authorIsChannelOwner`, `isPinned` and `isHearted` — so you can tell a creator reply, a pinned announcement, and a hearted fan comment apart without a second pass. `commentUrl` links straight back to the comment on YouTube.
- **🔀 Top or newest, with a cost ceiling:** ask YouTube for `top` (its own ranking) or `newest` (chronological). Volume is bounded twice: `maxComments` per video, and `maxItems` as the total the run may deliver — so a channel-wide job cannot surprise you.
- **♻️ Incremental mode:** re-run the same configuration and receive only the comments that appeared since last time. Each record carries `changeType`, `firstSeenAt`, and `lastSeenAt`. Pair it with `sortBy: newest` and a schedule to turn the actor into a new-comment monitor for a video or a channel.
- **🔌 MCP connectors:** export your results into Notion via Apify's MCP connectors — a clean run-summary page, no glue code. Opt-in via the App connector field; deterministic field-mapping, no AI. Built on Apify's connector framework, so more destinations open up as their catalog grows.

### What data can you extract from youtube.com?

Each result includes Core video fields (`datasetType`, `commentId`, `videoId`, `author`, `authorChannelId`, `authorChannelUrl`, `authorAvatarUrl`, and `authorIsVerified`, and more). All fields are always present — unavailable data points are returned as `null`, never omitted.

### Input

Configure the actor through the input schema in Apify Console.

Key parameters:

- **`videoUrls`** — YouTube video URLs to scrape comments from (one per line). Accepts watch links, Shorts, youtu.be short links, embed links, and bare 11-character video IDs. Every URL you paste here is processed — Max Videos only limits videos discovered from channels and search queries. Also accepts the aliases `videoUrl`, `url`, `urls`, and `startUrls`. (default: `[]`)
- **`channelUrls`** — Channel URLs or bare @handles (one per line), e.g. "https://www.youtube.com/@MrBeast" or "@veritasium". The channel's latest videos are collected (up to Max Videos) and their comments are scraped. Default: empty. Also accepts the alias `channelUrl`. (default: `[]`)
- **`searchQueries`** — Keywords to search on YouTube (one per line). The top matching videos (up to Max Videos) are used as comment sources. Default: empty. Also accepts the aliases `query`, `q`, `keyword`, `keywords`, `search`. (default: `[]`)
- **`maxComments`** — Maximum number of top-level comments to scrape per video. YouTube returns comments in pages of roughly 20, so higher values follow more continuation pages and take longer. 0 = no limit of our own, though the walk still stops after 200 pages (roughly 4,000 comments) for one video, and the total cap below always applies. Default: 100. Also accepts the aliases `commentsPerVideo`, `maxCommentsPerVideo`, `commentsCount`, `count`. (default: `100`)
- **`maxItems`** — Hard ceiling on how many comments the whole run delivers (and therefore on what the run costs), across every video. Reached mid-run, the run stops and pushes what it has. 0 = unlimited. Default: 1000. Also accepts the alias `maxTotalComments`. (default: `1000`)
- **`sortBy`** — Comment order requested from YouTube. "Top comments" is YouTube's own ranking (most engagement first); "Newest first" is chronological — use it together with Incremental Mode to monitor fresh comments. Default: top. Also accepts the aliases `commentsSort`, `orderBy`, `sort`, `order`. (default: `"top"`)
- **`includeReplies`** — Fetch each comment's reply thread and attach it to the parent comment under `replies`. Replies are part of the parent comment's record — they are not billed as extra results. Replies are fetched for up to 200 comments per video, and up to the first 20 replies on each of those. Adds one extra request per comment thread, so runs take longer. Default: false. (default: `false`)
- ...and 9 more parameters

### Input examples

**Comments from one video** — undefined

→ undefined

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

**Comments with reply threads** — undefined

→ undefined

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

**Comments across a channel's latest videos** — undefined

→ undefined

```json
{
  "channelUrls": [
    "https://www.youtube.com/@MrBeast"
  ],
  "maxVideos": 5,
  "maxComments": 100,
  "maxItems": 500
}
```

**New comments only, on a schedule** — undefined

→ undefined

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "sortBy": "newest",
  "maxComments": 200,
  "incrementalMode": true
}
```

**Comments from the top videos for a keyword** — undefined

→ undefined

```json
{
  "searchQueries": [
    "iphone 17 review"
  ],
  "maxVideos": 5,
  "maxComments": 50
}
```

### Output

Each run produces a dataset of structured video records. Results can be downloaded as JSON, CSV, or Excel from the Dataset tab in Apify Console.

### Example video record

```json
{
  "datasetType": "comment",
  "commentId": "Ugzge340dBgB75hWBm54AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "author": "@YouTube",
  "authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
  "authorChannelUrl": "https://www.youtube.com/channel/UCBR8-60-B28hp2BmDPdntcQ",
  "authorAvatarUrl": "https://yt3.ggpht.com/3s6evpqAiDU9tQR4sC2siJippbH2RWVPnwHgyl4V0th2iuQz0VDQZbUhQBGmsxLYo-mjG6TqZQ=s88-c-k-c0x00ffffff-no-rj",
  "authorIsVerified": true,
  "authorIsChannelOwner": false,
  "authorBadges": [
    "verified"
  ],
  "text": "can confirm: he never gave us up",
  "likeCount": 309000,
  "likeCountText": "309K",
  "publishedTimeText": "1 year ago",
  "publishedAt": "2025-09-01T13:06:30.869Z",
  "replyCount": 963,
  "isPinned": true,
  "isHearted": true,
  "isReply": false,
  "isEdited": false,
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg",
  "replies": [
    {
      "datasetType": "comment",
      "commentId": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHE9eIiztxR",
      "videoId": "dQw4w9WgXcQ",
      "author": "@linganguliguliwatcha",
      "authorChannelId": "UCjFRISlX-LPxiqViJAE3h6Q",
      "authorChannelUrl": "https://www.youtube.com/channel/UCjFRISlX-LPxiqViJAE3h6Q",
      "authorAvatarUrl": "https://yt3.ggpht.com/AbGqKNjK9k5tyOqdV7cdXx-GgnGuuGQ5wj8RN42U5YCDvYHT0vaOKXGFahR36iaDPseGN08DjQ=s88-c-k-c0x00ffffff-no-rj",
      "authorIsVerified": false,
      "authorIsChannelOwner": false,
      "text": "YOUTUBE AND ONE LIKE WOOHAAAAH",
      "likeCount": 7400,
      "likeCountText": "7.4K",
      "publishedTimeText": "1 year ago",
      "publishedAt": "2025-09-01T13:06:30.869Z",
      "isPinned": false,
      "isHearted": true,
      "parentCommentId": "Ugzge340dBgB75hWBm54AaABAg",
      "isReply": true,
      "isEdited": false,
      "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHE9eIiztxR",
      "scrapedAt": "2026-09-01T19:06:30.869Z"
    },
    {
      "datasetType": "comment",
      "commentId": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEAB_-JmDA",
      "videoId": "dQw4w9WgXcQ",
      "author": "@_bugrabilgin",
      "authorChannelId": "UCg9tPtxMOieUEyhSv63uJ4g",
      "authorChannelUrl": "https://www.youtube.com/channel/UCg9tPtxMOieUEyhSv63uJ4g",
      "authorAvatarUrl": "https://yt3.ggpht.com/LvMpN24GYYr8w43sGoMeYZYejDPJz_skehI6jm_XGGhfM5YeRa9OOsaplj60LnFNehE79ZxImg=s88-c-k-c0x00ffffff-no-rj",
      "authorIsVerified": false,
      "authorIsChannelOwner": false,
      "text": "HEY YOUTUBE",
      "likeCount": 3100,
      "likeCountText": "3.1K",
      "publishedTimeText": "1 year ago",
      "publishedAt": "2025-09-01T13:06:30.869Z",
      "isPinned": false,
      "isHearted": true,
      "parentCommentId": "Ugzge340dBgB75hWBm54AaABAg",
      "isReply": true,
      "isEdited": false,
      "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEAB_-JmDA",
      "scrapedAt": "2026-09-01T19:06:30.869Z"
    },
    {
      "datasetType": "comment",
      "commentId": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEAOCSlaNN",
      "videoId": "dQw4w9WgXcQ",
      "author": "@NashiraArif",
      "authorChannelId": "UCWrbmlBO2iW7jwhSuvLsgXQ",
      "authorChannelUrl": "https://www.youtube.com/channel/UCWrbmlBO2iW7jwhSuvLsgXQ",
      "authorAvatarUrl": "https://yt3.ggpht.com/ytc/AIdro_n1guDiz8iQIUgFGnmh5VA5PJlNSiWQwX3Ik0ywlPv8JUDRXZiF6wxDvbC7F3YSi1BdlA=s88-c-k-c0x00ffffff-no-rj",
      "authorIsVerified": false,
      "authorIsChannelOwner": false,
      "text": "new comment alert",
      "likeCount": 2100,
      "likeCountText": "2.1K",
      "publishedTimeText": "1 year ago",
      "publishedAt": "2025-09-01T13:06:30.869Z",
      "isPinned": false,
      "isHearted": true,
      "parentCommentId": "Ugzge340dBgB75hWBm54AaABAg",
      "isReply": true,
      "isEdited": false,
      "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEAOCSlaNN",
      "scrapedAt": "2026-09-01T19:06:30.869Z"
    },
    {
      "datasetType": "comment",
      "commentId": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEAQwtwdoZ",
      "videoId": "dQw4w9WgXcQ",
      "author": "@jennaortega-m4m",
      "authorChannelId": "UCbHhpa0tTOY_LO-uMH5ZKig",
      "authorChannelUrl": "https://www.youtube.com/channel/UCbHhpa0tTOY_LO-uMH5ZKig",
      "authorAvatarUrl": "https://yt3.ggpht.com/ytc/AIdro_lVdgv6VK0IOScTdHt1R4NdIFdRkvG2Y1jsrCR_otHBLogTg1YjnUt3k9YQBrmAT3VFLg=s88-c-k-c0x00ffffff-no-rj",
      "authorIsVerified": false,
      "authorIsChannelOwner": false,
      "text": "oop 3rd didnt realise youtube was here😄",
      "likeCount": 944,
      "likeCountText": "944",
      "publishedTimeText": "1 year ago",
      "publishedAt": "2025-09-01T13:06:30.869Z",
      "isPinned": false,
      "isHearted": true,
      "parentCommentId": "Ugzge340dBgB75hWBm54AaABAg",
      "isReply": true,
      "isEdited": false,
      "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEAQwtwdoZ",
      "scrapedAt": "2026-09-01T19:06:30.869Z"
    },
    {
      "datasetType": "comment",
      "commentId": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEB5iPJLDp",
      "videoId": "dQw4w9WgXcQ",
      "author": "@TheAngelofBattle99",
      "authorChannelId": "UCCejpvuOWrro8w-YM4SecQQ",
      "authorChannelUrl": "https://www.youtube.com/channel/UCCejpvuOWrro8w-YM4SecQQ",
      "authorAvatarUrl": "https://yt3.ggpht.com/92UP2htp8mRB1oRt7tZ1bmid5hSmtrt-fNUlOH0sgx0zBFEwLSQ7OT0Vo8nuyWC3XSyUxNl3oMQ=s88-c-k-c0x00ffffff-no-rj",
      "authorIsVerified": false,
      "authorIsChannelOwner": false,
      "text": "He's ingrained in our brains at this point. Such a devoted man.",
      "likeCount": 732,
      "likeCountText": "732",
      "publishedTimeText": "1 year ago",
      "publishedAt": "2025-09-01T13:06:30.869Z",
      "isPinned": false,
      "isHearted": true,
      "parentCommentId": "Ugzge340dBgB75hWBm54AaABAg",
      "isReply": true,
      "isEdited": false,
      "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHEB5iPJLDp",
      "scrapedAt": "2026-09-01T19:06:30.869Z"
    },
    "... 5 more items"
  ],
  "scrapedAt": "2026-09-01T19:06:30.869Z",
  "position": 0
}
```

### Incremental fields

When incremental mode is on, each record also carries:

- `changeType` — one of `NEW`, `UPDATED`, `UNCHANGED`, `REAPPEARED`, `EXPIRED`.

### How to scrape youtube.com

1. Go to [YouTube Comment Scraper](https://apify.com/blackfalcondata/youtube-comment-scraper?fpr=1h3gvi) in Apify Console.
2. Configure the input.
3. Set `maxItems` to control how many results you need.
4. Click **Start** and wait for the run to finish.
5. Export the dataset as JSON, CSV, or Excel.

### Use cases

- Extract video data from youtube.com for market research and competitive analysis.
- Monitor new and changed videos on scheduled runs without processing the full dataset every time.
- Export clean, structured data to dashboards, spreadsheets, or data warehouses.

### How much does it cost to scrape youtube.com?

YouTube Comment Scraper uses [pay-per-event](https://docs.apify.com/platform/actors/paid-actors/pay-per-event) pricing. You pay a small fee when the run starts and then for each result that is actually produced.

- **Run start:** $0.001 per run
- **Per result:** $0.00025 per video record

Example costs:

- 10 results: **$0.0035**
- 25 results: **$0.00725**
- 100 results: **$0.026**
- 200 results: **$0.051**
- 500 results: **$0.13**

#### Example: recurring monitoring savings

These examples compare full re-scrapes with incremental runs at different churn rates. Churn is the share of videos that are new or whose tracked content changed since the previous run. Actual churn depends on your query breadth, source activity, and polling frequency — the scenarios below are examples, not predictions.

Example setup: 250 videos per run, daily polling (30 runs/month). Costs scale linearly with the number of videos.

| Churn rate | Full re-scrape run cost | Incremental run cost | Savings vs full re-scrape | Monthly cost after baseline |
|---|---:|---:|---:|---:|
| 5% — stable niche query | $0.06 | $0.00413 | $0.06 (94%) | $0.12 |
| 15% — moderate broad query | $0.06 | $0.01 | $0.05 (84%) | $0.31 |
| 30% — high-volume aggregator | $0.06 | $0.02 | $0.04 (69%) | $0.59 |

Full re-scrape monthly cost at the same cadence: $1.91. First month with incremental costs $0.18 / $0.36 / $0.64 for the 5% / 15% / 30% scenarios because the first run builds baseline state at full cost before incremental savings apply.

Platform usage is included in the per-result fee shown above.

### FAQ

#### How many results can I get from youtube.com?

The number of results depends on the search query and available videos on youtube.com. Use the `maxItems` parameter to control how many results are returned per run.

#### Does YouTube Comment Scraper support recurring monitoring?

Yes. Enable incremental mode to only receive new or changed videos on subsequent runs. This is ideal for scheduled monitoring where you want to track changes over time without re-processing the full dataset.

#### Can I integrate YouTube Comment Scraper with other apps?

Yes. YouTube Comment Scraper works with Apify's [integrations](https://apify.com/integrations?fpr=1h3gvi) to connect with tools like Zapier, Make, Google Sheets, Slack, and more. You can also use webhooks to trigger actions when a run completes.

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

Yes. You can start runs, manage inputs, and retrieve results programmatically through the [Apify API](https://docs.apify.com/api/v2). Client libraries are available for JavaScript, Python, and other languages.

#### Can I use YouTube Comment Scraper through an MCP Server?

Yes. Apify provides an [MCP Server](https://apify.com/apify/actors-mcp-server?fpr=1h3gvi) that lets AI assistants and agents call this actor directly. Use `excludeEmptyFields` to keep payloads manageable for LLM context windows.

#### Is it legal to scrape youtube.com?

This actor extracts publicly available data from youtube.com. Web scraping of public information is generally considered legal, but you should always review the target site's terms of service and ensure your use case complies with applicable laws and regulations, including GDPR where relevant.

#### What counts as a billable result?

A "result" is one comment written to the dataset, billed at the per-comment price.

- **Top-level comments** — 1 result each.
- **Replies** — when `includeReplies` is on, replies are nested under their parent comment's `replies` field and are **not** billed separately. A comment with 40 replies is still 1 result.
- **Videos** — scanning a video to reach its comments is never billed as a result, whether you pasted its URL or it came from a channel or a search.

Two inputs bound what a run can cost: `maxComments` caps comments per video, and `maxItems` caps the total for the whole run. A run that hits the total cap stops and delivers what it collected.

#### Do I need a proxy, and what does it cost?

No. The default proxy setting is what this actor is tuned for, and platform usage (compute and network) is paid by us — the per-event price is the whole price. You can point the Proxy input at your own provider if your setup requires it, but nothing here needs it.

#### What should I know about coverage and limits?

- **Comments can be turned off.** A creator can disable comments on a video; that video contributes no records. This is normal, not an error, and the run reports how many videos came back empty.
- **YouTube pages comments in blocks of roughly 20.** A high `maxComments` follows more continuation pages, so large jobs take proportionally longer.
- **Sort order changes what you get first.** `top` is YouTube's own ranking, so a capped run returns the most-engaged comments. `newest` is chronological — the right choice for monitoring, and the one to pair with incremental mode.
- **Reply threads are capped:** up to 20 replies per comment, and up to 200 threads per video, so one enormous thread cannot consume the whole job. The parent comment always carries YouTube's true `replyCount`, even when fewer replies are attached.
- **`publishedAt` is derived.** YouTube exposes a relative timestamp ("2 months ago"), so the ISO date is an approximation of it, computed against the scrape instant. `publishedTimeText` carries YouTube's original label.
- **`maxVideos` applies to discovery only.** A channel or a search contributes at most that many videos; video URLs you paste are always all processed.

#### Your feedback

If you have questions, need a feature, or found a bug, please [open an issue](https://apify.com/blackfalcondata/youtube-comment-scraper/issues?fpr=1h3gvi) on the actor's page in Apify Console. Your feedback helps us improve.

### You might also like

- [Douyin Hot Search Scraper](https://apify.com/blackfalcondata/douyin-scraper?fpr=1h3gvi) — Scrape douyin.com real-time trending boards — hot search, seeding, entertainment, social.
- [Facebook Ads Library Scraper \[💰$0.05/1k\]](https://apify.com/blackfalcondata/facebook-ads-library-scraper?fpr=1h3gvi) — Scrape facebook.com/ads/library by keyword or advertiser: ad copy, image and video URLs, landing.
- [Meta Ads Library Scraper \[💰$0.05/1k\]](https://apify.com/blackfalcondata/meta-ads-library-scraper?fpr=1h3gvi) — Scrape Meta's Ad Library across Facebook, Instagram, WhatsApp, Threads, Messenger and Audience.
- [Pexels Scraper — Photos, Videos & Engagement Data](https://apify.com/blackfalcondata/pexels-scraper?fpr=1h3gvi) — This Pexels scraper extracts photos and videos by search, curated feed, photo ID, user, collection,.
- [Pinterest Scraper — Pins, Boards, Profiles & Engagement](https://apify.com/blackfalcondata/pinterest-scraper?fpr=1h3gvi) — Scrape Pinterest pins, boards and profiles by keyword or start URL — images, videos, engagement.
- [Reddit Scraper — Posts & Full Comment Threads](https://apify.com/blackfalcondata/reddit-scraper?fpr=1h3gvi) — Scrape Reddit posts with full nested comment threads, or search any subreddit or keyword across.
- [Video & Audio Transcriber](https://apify.com/blackfalcondata/video-audio-transcriber?fpr=1h3gvi) — Transcribe any video, audio or podcast URL to text: full transcript with timestamped segments plus.
- [YouTube Scraper $2/1K — Videos, Channels, Comments, Transcripts](https://apify.com/blackfalcondata/youtube-data-scraper?fpr=1h3gvi) — Scrape YouTube videos, channels, comments, and transcripts in one tool — by keyword or by video,.

### Getting started with Apify

New to Apify? [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=1h3gvi) — no credit card required.

1. Sign up — $5 platform credit included
2. Open this actor and configure your input
3. Click **Start** — export results as JSON, CSV, or Excel

Need more later? [See Apify pricing](https://apify.com/pricing?fpr=1h3gvi).

### Disclaimer

This actor accesses only publicly available data on youtube.com. You are responsible for how you use the extracted data — in particular any personal information such as names, phone numbers, or email addresses — and for complying with YouTube Comment's terms of use, applicable data-protection law (including the GDPR where it applies), and the anti-spam rules of your jurisdiction.

This actor is not affiliated with, endorsed by, or connected to YouTube Comment.

### Search keywords

youtube scraper, youtube api, apify youtube, youtube data extraction, youtube comment scraper, youtube comment api, apify youtube comment, youtube comment data extraction, youtube.com scraper, youtube.com data, youtube.com api, social media scraper, video data, creator data.

# Actor input Schema

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

YouTube video URLs to scrape comments from (one per line). Accepts watch links, Shorts, youtu.be short links, embed links, and bare 11-character video IDs. Every URL you paste here is processed — Max Videos only limits videos discovered from channels and search queries. Also accepts the aliases `videoUrl`, `url`, `urls`, and `startUrls`.

## `channelUrls` (type: `array`):

Channel URLs or bare @handles (one per line), e.g. "https://www.youtube.com/@MrBeast" or "@veritasium". The channel's latest videos are collected (up to Max Videos) and their comments are scraped. Default: empty. Also accepts the alias `channelUrl`.

## `searchQueries` (type: `array`):

Keywords to search on YouTube (one per line). The top matching videos (up to Max Videos) are used as comment sources. Default: empty. Also accepts the aliases `query`, `q`, `keyword`, `keywords`, `search`.

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

Maximum number of top-level comments to scrape per video. YouTube returns comments in pages of roughly 20, so higher values follow more continuation pages and take longer. 0 = no limit of our own, though the walk still stops after 200 pages (roughly 4,000 comments) for one video, and the total cap below always applies. Default: 100. Also accepts the aliases `commentsPerVideo`, `maxCommentsPerVideo`, `commentsCount`, `count`.

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

Hard ceiling on how many comments the whole run delivers (and therefore on what the run costs), across every video. Reached mid-run, the run stops and pushes what it has. 0 = unlimited. Default: 1000. Also accepts the alias `maxTotalComments`.

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

Comment order requested from YouTube. "Top comments" is YouTube's own ranking (most engagement first); "Newest first" is chronological — use it together with Incremental Mode to monitor fresh comments. Default: top. Also accepts the aliases `commentsSort`, `orderBy`, `sort`, `order`.

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

Fetch each comment's reply thread and attach it to the parent comment under `replies`. Replies are part of the parent comment's record — they are not billed as extra results. Replies are fetched for up to 200 comments per video, and up to the first 20 replies on each of those. Adds one extra request per comment thread, so runs take longer. Default: false.

## `maxVideos` (type: `integer`):

Maximum number of videos to take from channels and search queries as comment sources, across the whole run (not per channel or per query). Video URLs you paste are always all processed and are not limited by this. A search contributes at most 200 videos, and a channel contributes its latest page of uploads (around 30), so values above those are bounded by what YouTube returns. On a repeated run with Incremental mode on, the videos it scans rotate: each run starts with the ones it has gone longest without visiting, so a limit smaller than the channel or search behind it still works through all of them over time. Default: 10.

## `country` (type: `string`):

ISO 3166-1 alpha-2 country code used for YouTube's region context (e.g. "US", "GB", "DE"). Affects which comment set and localisation YouTube returns. Default: US. Also accepts the aliases `geo`, `region`, `gl`.

## `proxyConfiguration` (type: `object`):

Network routing for the requests. The default is what this actor is tuned for and needs no change. Usage here is paid by us, not billed to your account.

## `incrementalMode` (type: `boolean`):

On repeat runs with the same input, deliver only comments that are new since the last run, plus any whose text was edited. State is stored in a named key-value store keyed by your input, so a scheduled run returns just the fresh discussion. Default: false.

## `stateKey` (type: `string`):

Optional label for the incremental state bucket, used as a readable prefix. The bucket itself is still keyed by your targets and settings, so two runs with different inputs never share a memory even under the same label — use it to keep runs apart and to recognise them, not to merge them. Leave empty to derive it automatically. Default: empty.

## `maxRunSeconds` (type: `integer`):

Stop the run and push whatever has been collected after this many seconds. Useful as a guard on large channel jobs. 0 or empty = no limit. Default: empty.

## `excludeEmptyFields` (type: `boolean`):

Drop null and empty fields from every output record. Produces leaner JSON for LLM and agent pipelines. Default: false.

## `includeRunMetadata` (type: `boolean`):

Attach a `_meta` block to every output record describing the run (ids, timestamps, a non-sensitive input summary, and per-type counts). Handy for pipelines that need to trace a record back to the run that produced it. The counts describe what the run produced and are stamped on every record before they are saved, so a run cut short by a charge limit can deliver fewer records than the counts name. A run with no results produces no records and therefore no metadata. Default: false.

## `appConnector` (type: `string`):

Optional. Pick a connected app under Settings → API & Integrations to receive your results. Notion is supported today (a run-summary page); other MCP connectors are best-effort as Apify expands its catalog. Up to 500 records are sent to the app; the complete set is always in the dataset.

## `mcpIssueTeam` (type: `string`):

Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/tPEE9ZwTmy0"
  ],
  "channelUrls": [
    "https://www.youtube.com/@MrBeast"
  ],
  "searchQueries": [
    "iphone 17 review"
  ],
  "maxComments": 100,
  "maxItems": 1000,
  "sortBy": "top",
  "includeReplies": true,
  "maxVideos": 5,
  "country": "US",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "incrementalMode": true,
  "stateKey": "mrbeast-comments",
  "maxRunSeconds": 600,
  "excludeEmptyFields": true,
  "includeRunMetadata": true
}
```

# Actor output Schema

## `results` (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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxComments": 100,
    "maxItems": 1000,
    "includeReplies": false,
    "incrementalMode": false,
    "excludeEmptyFields": false,
    "includeRunMetadata": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("blackfalcondata/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 = {
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxComments": 100,
    "maxItems": 1000,
    "includeReplies": False,
    "incrementalMode": False,
    "excludeEmptyFields": False,
    "includeRunMetadata": False,
}

# Run the Actor and wait for it to finish
run = client.actor("blackfalcondata/youtube-comment-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"
  ],
  "maxComments": 100,
  "maxItems": 1000,
  "includeReplies": false,
  "incrementalMode": false,
  "excludeEmptyFields": false,
  "includeRunMetadata": false
}' |
apify call blackfalcondata/youtube-comment-scraper --silent --output-dataset

```

## MCP server setup

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