# YouTube Comments Scraper - Likes, Replies & Dates (`cheapapi/youtube-comments-scraper`) Actor

YouTube comments scraper: export comments from any video or Short by link or ID - text, likes, reply count, date, video title. Filters, no login.

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

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Comments Scraper - Likes, Dates & Filters

Export the comments of one or hundreds of YouTube videos and Shorts — text, likes, reply count, publish date and video title — as JSON, CSV or Excel, just by pasting the video links.

> **Runs usually take 1–5 minutes.** Comments are collected through a processing queue, so even a one-video run is not instant: typically about 1–2 minutes in fast mode and up to ~5 minutes in economy mode (used automatically for runs of 1,000+ comments). When the queue is busy it can take longer: the Actor waits up to 20 minutes (fast) or 40 minutes (economy) for a batch before stopping with a clear message.

### Why this Actor

> **Top-level comments only — reply text is not included** (each comment carries its `replyCount`). If you need the replies themselves, see the alternatives marked ✓ in the [comparison](#compared-with-alternatives).

- **$0.35 per 1,000 comments** on the Free, Bronze and Silver plans and **$0.21 per 1,000 on Gold and above** — no start fee, no per-video fee, no monthly fee. Apify platform usage is billed separately by Apify (usually $0.001–$0.005 for a small run). See the [comparison](#compared-with-alternatives) for how that stacks up.
- **Bulk input:** paste any number of video links at once (one per line, or straight from a spreadsheet column); duplicates are removed automatically.
- **Up to 700 comments per video**, in YouTube's "Top comments" order.
- **15 fields per comment** out of the box, including a stable comment `id`, plus 5 optional commenter fields (name, @handle, channel ID, channel link, avatar).
- **Built-in filters:** minimum likes, minimum replies, keywords, date range and a rolling **"last N days"** window — you pay for comments that pass (plus a small per-page minimum when a page yields very few, see [Pricing](#pricing)).
- **Only new comments since the last run** (`onlyNewComments`) for scheduled monitoring — repeats are skipped and not charged as comments.
- **Privacy by default:** commenter details are only added when you switch them on. No YouTube account, API key, browser or proxy needed.

### Compared with alternatives

Typical run: **50 videos × 100 comments = 5,000 comments**, all Actor fees included (start and per-query fees too). For this Actor, Apify platform usage is billed separately by Apify on top of the prices shown ("+ usage"; at the default 256 MB usually a few tenths of a cent to a few cents per run).

| Alternative (Apify Store) | Free plan | Gold plan | Reply text | Built-in filters |
|---|---|---|---|---|
| Most-used YouTube comments Actor (~24,000 users), $2.00 / 1,000 on Free, $0.90 on Gold | $10.00 | $4.50 (Platinum $3.00, Diamond $1.50) | ✗ no replies option in its input (reply count; its sample output has a `replyToCid` field and a creator-heart flag) | date |
| Second most-used (~3,100 users), $0.001 per video (includes ~20 comments) + $0.0005 per further comment | $2.05 | $2.05 | ✓ (advertised option, reply threads billed as extra queries) | ✗ (sort only) |
| Third (~730 users), $2.00 / 1,000 on Free ($1.70 on Gold) + $0.0025 per video + $0.005 per run | ≈ $10.13 | ≈ $8.62 | ✗ (its FAQ: first-level comments only) | date |
| Fourth (~570 users), $4.00 / 1,000 on Free, $0.40 on paid plans + $0.01 per run | $20.01 | $2.01 | ✓ (option, about 10 replies per comment) | ✗ |
| Fifth (~460 users), $0.25 / 1,000 ($0.20 on paid plans) + $0.0005 per run | **$1.25** | **$1.00** | ✗ not advertised (reply count) | ✗ |
| Tiered Actor with reply threads (~185 users), $0.35 / 1,000 on Free, $0.24 on Gold | $1.75 | $1.20 | ✓ (option) | ✗ |
| Actor sold "with replies" (~140 users), $0.40 / 1,000 + $0.005 per run | $2.01 | $2.01 | ✓ | date |
| **This Actor** | $1.75 + usage | $1.05 + usage | ✗ (reply count only) | likes, replies, keywords, date range, last N days, only new |

Prices from public Apify Store listings, checked September 2026 (per-video fees counted once per video; with replies switched on, the alternatives that offer them charge for the extra reply rows or threads too). On the most-used Actor the Platinum and Diamond prices are lower than its Gold price; our Platinum and Diamond price equals our Gold price ($1.05 here), still below both.

- **Reply text is not available here** (see the note at the top). The data source returns top-level comments with a reply count only and has no option to fetch reply threads. At least four of the alternatives above offer replies (as an option or by default); the most-used one lists a reply count and a creator-heart flag but no option to collect replies — choose one of them if replies matter to you. The Actor with reply threads at ~185 users costs the same as this one on Free ($1.75) and a little more on Gold ($1.20 vs. $1.05).
- **One alternative is cheaper** for plain exports: $1.25 vs. $1.75 on the Free plan and $1.00 vs. $1.05 on Gold (plus our platform usage). What you get here in addition: likes and reply counts as real numbers (that Actor's sample output has text like `"5.3K"`), filters that you only pay for when a comment passes, an "only new since last run" mode, a stable comment `id`, and commenter data off by default. A few very new listings with only a handful of users advertise even lower prices.

### Not included

- **Reply text** — only `replyCount` (see above).
- **More than 700 comments per video**, or the full comment history of very busy videos. Filters, sorting and "only new" work on the top comments collected.
- **Playlist and channel links** — paste the video links. To collect video links for a topic or channel name, use [YouTube Search Scraper](https://apify.com/cheapapi/youtube-search-scraper).
- **Video statistics** (views, duration, channel) beyond the title and comment count — [YouTube Search Scraper](https://apify.com/cheapapi/youtube-search-scraper) returns those for search results.
- **Transcripts / subtitles** — use [YouTube Transcript Scraper](https://apify.com/cheapapi/youtube-transcript-scraper).
- **Sentiment scores or translations** — export the text and run your own model; the output is ready for it.

### What data you get

One row per top-level comment:

| Field | Type | Example |
|---|---|---|
| `id` | string | `bc8ba623a3076ba9` (stable comment ID: same comment, same `id` in every run) |
| `input` | string | `https://youtu.be/vQXvyV0zIP4` (as you entered it) |
| `videoId` | string | `vQXvyV0zIP4` |
| `videoUrl` | string | `https://www.youtube.com/watch?v=vQXvyV0zIP4` |
| `videoTitle` | string | `The first-ever BMW M5 CS.` |
| `videoCommentsCount` | integer | `4958` (total comments on the video) |
| `position` | integer | `4` (rank in YouTube's "Top comments") |
| `text` | string | `And after 2 years, this is still my favorite car commercial` |
| `likesCount` | integer | `1500` |
| `replyCount` | integer | `10` (number of replies; reply text is not collected) |
| `publishedAt` | string (ISO date) | `2023-09-26T13:15:09.000Z` (approximate, see FAQ) |
| `publishedTimeText` | string | `3 years ago` (as YouTube shows it) |
| `country` | string | `US` |
| `language` | string | `en` |
| `scrapedAt` | string (ISO date) | `2026-09-29T09:12:41.508Z` |
| `authorName` \* | string | `@Chaos7554` |
| `authorHandle` \* | string | `@Chaos7554` |
| `authorChannelId` \* | string or null | usually `null` — YouTube mostly links commenters by @handle; `UC…` only when the link contains the ID. Use `authorHandle` / `authorChannelUrl` to identify commenters |
| `authorChannelUrl` \* | string | `https://www.youtube.com/@Chaos7554` |
| `authorAvatarUrl` \* | string | `https://yt3.ggpht.com/…` |

\* Only when **Include commenter details (personal data)** is on.

### How to use

1. Open the Actor in Apify Console.
2. Paste your video links (or IDs) into **Videos** (`videos`) — `watch?v=`, `youtu.be/`, `/shorts/` and `/live/` links all work. For many videos, use the **Bulk edit** button of the list and paste a whole column of links (one per line); commas and spaces also work as separators.
3. Set **Max comments per video** (`maxCommentsPerVideo`, default 100, up to 700).
4. Optional: switch on **Include commenter details** (`includeAuthorInfo`) if you need names and channel links, or open the advanced sections for sorting and filters (e.g. **Only comments from the last N days**).
5. Click **Start**, then download the results as JSON, CSV, Excel or HTML from the **Output** tab.

Ready-to-paste input:

```json
{
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/9bZkp7q19f0",
        "https://www.youtube.com/shorts/aqz-KE-bpKQ"
    ],
    "maxCommentsPerVideo": 100,
    "includeAuthorInfo": false
}
```

#### Run it via API

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/cheapapi~youtube-comments-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"videos":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"maxCommentsPerVideo":100,"publishedWithinDays":30}'
```

JavaScript (`apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_TOKEN>' });
const run = await client.actor('cheapapi/youtube-comments-scraper').call({
    videos: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'https://youtu.be/9bZkp7q19f0'],
    maxCommentsPerVideo: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Python (`apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_TOKEN>")
run = client.actor("cheapapi/youtube-comments-scraper").call(run_input={
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://youtu.be/9bZkp7q19f0"],
    "maxCommentsPerVideo": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Use cases

- **Audience research:** read what viewers ask, praise and complain about on your own or competitors' videos.
- **Sentiment analysis & AI pipelines:** feed clean comment text with likes and dates into an LLM or classifier.
- **Product & brand feedback:** collect reactions to launches, reviews and unboxing videos — e.g. only the last 30 days.
- **Influencer vetting:** check engagement quality (likes, replies, spam) across a creator's recent videos before a sponsorship.
- **Content ideas:** find the most-liked questions to turn into new videos or FAQ pages.
- **Giveaways & contests:** export all entries with commenter handles (opt-in personal data).

### Advanced options

| Option | Default | Meaning |
|---|---|---|
| **Sort comments by** (`sortBy`) | `top` | `top` (YouTube's order), `newest`, `oldest`, `most_liked`, `most_replies` — re-orders the collected comments |
| **Minimum likes** (`minLikes`) | `0` | Only comments with at least this many likes (0 = no filter; 0–10,000,000) |
| **Minimum replies** (`minReplies`) | `0` | Only comments with at least this many replies (0 = no filter; 0–10,000,000) |
| **Only comments containing** (`keywords`) | empty | Only comments containing at least one of these words/phrases (not case-sensitive) |
| **Only comments from the last N days** (`publishedWithinDays`) | `0` | Rolling window, e.g. `7`, `30`, `365` (0 = off, max 3650). Ideal for scheduled runs. Combined with `dateFrom`, the later start date wins |
| **Comments published from** (`dateFrom`) | empty | Fixed start date, `YYYY-MM-DD` |
| **Comments published until** (`dateTo`) | empty | Fixed end date, `YYYY-MM-DD` |
| **Only new comments since the last run** (`onlyNewComments`) | `false` | Skip (and don't charge as comments) comments already delivered in an earlier run with this option on; a page that yields too few new comments pays the page minimum. See [Monitoring](#monitoring-new-comments) |
| **Monitoring store name** (`monitoringStoreName`) | `youtube-comments-monitor` | Named key-value store that remembers delivered comment IDs; use one name per project |
| **Country** (`country`) | `US` | 2-letter ISO country code YouTube is opened from, e.g. `US`, `GB`, `DE`, `FR`, `TR`, `BR`, `IN`, `JP` (common English names like `Germany` also work); can change which comments rank as "Top" |
| **Interface language** (`language`) | `en` | Language code (`en`, `de`, `fr`, `pt-BR`, …); affects `publishedTimeText` wording |
| **Operating system** (`operatingSystem`) | `windows` | `windows` or `macos` desktop view; rarely needs changing |
| **Processing speed** (`processingSpeed`) | `auto` | `fast`, `economy` (slower, for runs of 200+ comments) or `auto` (economy from 1,000 comments). Same price |

Sorting and filters are applied to the comments collected for each video (the top ones, up to **Max comments per video**). To find more matches, raise the maximum. Date filters are approximate, because YouTube shows relative dates ("3 weeks ago").

```json
{
    "videos": ["https://youtu.be/dQw4w9WgXcQ"],
    "maxCommentsPerVideo": 700,
    "includeAuthorInfo": true,
    "sortBy": "most_liked",
    "minLikes": 5,
    "minReplies": 0,
    "keywords": ["price", "battery"],
    "publishedWithinDays": 30,
    "country": "DE",
    "language": "de",
    "operatingSystem": "windows",
    "processingSpeed": "auto"
}
```

### Monitoring new comments

Schedule the Actor (e.g. daily) with **Only new comments since the last run** on:

```json
{
    "videos": ["https://youtu.be/dQw4w9WgXcQ", "https://youtu.be/9bZkp7q19f0"],
    "maxCommentsPerVideo": 200,
    "onlyNewComments": true,
    "monitoringStoreName": "my-brand-videos"
}
```

- The first run delivers the comments as usual and remembers their `id`s (per video, in the named key-value store `my-brand-videos` in your account).
- Later runs deliver and charge only comments whose `id` was not delivered before; `RUN_SUMMARY` shows `repeatsSkipped`. When a page has fewer new comments than its minimum (6 on Free, 9 on Gold), the page adds one `page-checked` fee ($0.0018), so a quiet video costs about $0.0018 per check.
- Each run still reads the top comments up to **Max comments per video**, so on very busy videos a new comment is found once it ranks among those. For small and medium videos (fewer comments than the maximum) every new comment is caught.
- An edited comment counts as new (its text changed). Delete the store, or use a new name, to start over.

### Output example

Example output (commenter details switched on; note `authorChannelId` is `null`, as for most commenters):

```json
{
    "id": "bc8ba623a3076ba9",
    "input": "https://youtu.be/vQXvyV0zIP4",
    "videoId": "vQXvyV0zIP4",
    "videoUrl": "https://www.youtube.com/watch?v=vQXvyV0zIP4",
    "videoTitle": "The first-ever BMW M5 CS.",
    "videoCommentsCount": 4958,
    "position": 4,
    "text": "And after 2 years, this is still my favorite car commercial",
    "likesCount": 1500,
    "replyCount": 10,
    "publishedAt": "2023-09-26T13:15:09.000Z",
    "publishedTimeText": "3 years ago",
    "authorName": "@Chaos7554",
    "authorHandle": "@Chaos7554",
    "authorChannelId": null,
    "authorChannelUrl": "https://www.youtube.com/@Chaos7554",
    "authorAvatarUrl": "https://yt3.ggpht.com/fPkVn5a60cUVN9e62d_L-nj26nnGVa6MgB9G_UmDZyuEMsJ6ajFwaWxemjbOO9PF-3kswUAB=s88-c-k-c0x00ffffff-no-rj",
    "country": "US",
    "language": "en",
    "scrapedAt": "2026-09-29T09:12:41.508Z"
}
```

The dataset has two views: **Comments** and **Video context**. The key-value store holds **RUN_SUMMARY** (videos and comments collected, repeats skipped in "only new" mode, and which inputs were skipped and why — e.g. comments turned off, or a playlist link).

### Pricing

**Apify Free plan:** Apify does not pay developers for usage on its Free plan, so on the Free plan this Actor can be used for up to **$0.25 of results per calendar month** — enough to try it on a small input. When the allowance is used up, the run ends with a clear message (not an error). Any paid Apify plan removes the limit; prices are the same.

Pay per comment delivered, plus a page minimum that only applies when a page yields very few comments:

| Event | Free / Bronze / Silver | Gold / Platinum / Diamond | When |
|---|---|---|---|
| `comment` | **$0.00035** ($0.35 per 1,000) | **$0.00021** ($0.21 per 1,000) | Each comment delivered |
| `page-checked` | $0.0018 | $0.0018 | Only for a fetched page of up to 20 comments that delivered too few comments to pay for itself |

**How the page minimum works.** Comments are fetched in pages of 20, and every page we fetch for a video must bring in at least $0.0018. The comments delivered for that video count toward it: on Free every 6 delivered comments cover one page, on Gold every 9. Only pages that are not covered add one `page-checked` each. With no filters that happens only for videos with fewer than 6 (Gold: 9) comments, videos with comments turned off, and videos that return no data (one page each). Filters, date ranges and `onlyNewComments` are applied after the page is fetched, so a page where almost nothing passes also pays the minimum. Links that are not videos (playlists, channels, typos) and requests the data source rejects are never charged. A request that was accepted but could not be collected in time, or whose submission got no answer because of a network problem, may already have been paid, so its video pays the minimum for every page requested. No start fee, no monthly fee.

Apify platform usage is billed separately by Apify (at the default 256 MB a small run typically uses about $0.001–$0.005). The prices and examples below are event fees only.

Worked examples:

| Run | Free / Bronze / Silver | Gold+ |
|---|---|---|
| 1 video × 100 comments | $0.035 | $0.021 |
| 50 videos × 100 comments (5,000 comments) | $1.75 | $1.05 |
| 5 videos × 700 comments (3,500 comments) | $1.225 | $0.735 |
| 1 video, 40 comments checked, only 2 new (`onlyNewComments`) | 2 × $0.00035 + 2 pages × $0.0018 = **$0.0043** | 2 × $0.00021 + 2 × $0.0018 = **$0.0040** |
| 1 video, 100 comments checked, 10 match `keywords` (5 pages) | 10 × $0.00035 + 4 × $0.0018 = **$0.0107** | 10 × $0.00021 + 4 × $0.0018 = **$0.0093** |
| 1 video with comments turned off | 1 × $0.0018 = **$0.0018** | **$0.0018** |

The amount a video can cost is set aside from your **Maximum cost per run** before it is requested, so fees never push a run over your limit.

Set **Maximum cost per run** in the run options and the Actor stops cleanly at your budget.

### Integrations

- **Make, Zapier, n8n:** start runs and pull the dataset with the Apify modules.
- **Google Sheets:** export the dataset directly or sync it with the Apify–Google Sheets integration.
- **Webhooks:** get notified (or trigger your pipeline) when a run finishes.
- **Schedules:** run daily or weekly with `onlyNewComments` (see [Monitoring](#monitoring-new-comments)), or with `publishedWithinDays` (e.g. `7`) and de-duplicate by `id`.
- **API & MCP:** JavaScript and Python clients, plain HTTP (see above), or use the Actor as a tool for AI agents through the Apify MCP server.

### FAQ

**Is there a limit on the Apify Free plan?** Yes: up to $0.25 of this Actor's results per calendar month, enough to try it. Apify pays developers nothing for Free-plan usage while our data costs are real, so this keeps the Actor sustainable. Runs that reach the allowance stop cleanly and keep everything collected so far; the allowance resets on the 1st of the month. Any paid Apify plan has no limit.

**Is it legal to scrape YouTube comments?** The Actor collects publicly visible comments only. Comments and commenter details can be personal data, which is why commenter fields are off by default. Make sure your use complies with GDPR, CCPA and other laws that apply to you, and with YouTube's terms.

**Is Apify platform usage included?** No. Apify platform usage (compute) is billed separately by Apify, on top of the event fees. At the default 256 MB memory a small run typically uses about $0.001–$0.005; long runs over many videos use more. Each run's usage is shown in Apify Console.

**How fresh is the data?** Every run collects the comments live from YouTube at the time of the run — nothing is served from an old cache.

**Why did I get fewer results than "Max comments per video"?** The video has fewer comments, comments are turned off, or your filters (likes, replies, keywords, dates) removed some. Filters work on the collected top comments; raise the maximum to find more matches. You're charged for comments delivered, plus the page minimum for pages that yielded too few (see [Pricing](#pricing)).

**Are replies included?** No. Each row is a top-level comment with its `replyCount`; the data source has no option for reply threads. See [Compared with alternatives](#compared-with-alternatives) for Actors that include replies.

**Can I scrape many videos at once?** Yes — paste as many links as you like (one per line, or a whole spreadsheet column via **Bulk edit**). Videos are processed in batches of 50; duplicates are skipped.

**Can I paste a playlist or channel link?** Not yet. Such links are skipped with a clear reason in the log and `RUN_SUMMARY`; paste the individual video links instead.

**How do I get only recent comments?** Set **Only comments from the last N days** (`publishedWithinDays`), e.g. `30`. It is relative to each run, so it works well on schedules. To get only comments you have not received before, use `onlyNewComments`.

**How exact is `publishedAt`?** YouTube only shows relative dates ("5 years ago"), so `publishedAt` is an estimate; the original text is in `publishedTimeText`.

**Why was I charged `page-checked`?** A page of comments was fetched for a video but delivered too few comments to pay for itself — because the video has only a handful of comments or none, returned no data, or your filters / "only new comments" removed most of them. You pay $0.0018 per page not covered by the comments delivered (6 per page on Free, 9 on Gold). `RUN_SUMMARY` shows `pagesChecked`. To keep it low with filters, use a lower **Max comments per video** so fewer pages are checked.

**How do I control my budget?** Set **Maximum cost per run** in the run options; the Actor never charges more and stops early when it's reached (noted in the log and `RUN_SUMMARY`).

**Which export formats are available?** JSON, CSV, Excel, XML, HTML and RSS from the Output tab or the API.

**I found a problem or need a feature — who do I contact?** Open an issue on the Actor's **Issues** tab in Apify Console; include the run link so we can help quickly.

### Limitations

- Up to 700 top-level comments per video per run, in YouTube's "Top comments" order; reply texts are not collected (only their count).
- Playlist and channel links are not expanded; paste video links.
- Publish dates, and therefore date filters, are approximate (derived from YouTube's relative dates).
- Sorting and filters apply to the collected comments, not to all comments of the video.
- Private, deleted, age-restricted or comment-disabled videos return no comments (no comment charges; one `page-checked` for the page that was checked).
- "Only new comments" compares with the comments delivered before, within the top comments collected per run.
- Commenter channel IDs are only present when YouTube links to the channel by ID; most links use the @handle.

### Privacy

Commenter names, handles, channel links and avatars are personal data. They are excluded unless you turn on **Include commenter details**; process them only with a lawful basis, and delete what you no longer need. The Actor stores nothing beyond your own run's dataset and key-value store, plus — only with `onlyNewComments` — a named key-value store in your account holding comment IDs (hashes, no text or names).

# Actor input Schema

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

YouTube videos to collect comments from - paste as many as you like, one per line (you can paste a whole list copied from a spreadsheet at once; commas and spaces also work). Accepts youtube.com/watch?v=…, youtu.be/…, /shorts/…, /live/… links or the 11-character video ID. Duplicates are removed. Playlist and channel links are not supported: paste the individual video links.

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

How many comments to collect for each video, in YouTube's "Top comments" order. Up to 700 per video per run. You pay for comments delivered; a page of 20 that yields fewer than 6 (Gold: 9) comments adds a $0.0018 page-checked fee.

## `includeAuthorInfo` (type: `boolean`):

Off by default. Turn on to add the commenter's name, @handle, channel link and avatar to each comment. The channel ID (authorChannelId) is often empty, because YouTube usually links commenters by @handle; use authorHandle or authorChannelUrl instead. These are personal data: only enable it if you have a lawful reason to process them (e.g. GDPR).

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

Order of the delivered comments. Top = YouTube's own ranking. The other options re-order the collected comments.

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

Only comments with at least this many likes. 0 = no filter. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.

## `minReplies` (type: `integer`):

Only comments with at least this many replies (reply count). 0 = no filter. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.

## `keywords` (type: `array`):

Only comments that contain at least one of these words or phrases (not case-sensitive). Leave empty for all comments. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.

## `publishedWithinDays` (type: `integer`):

Relative date filter: only comments published in the last N days, counted from the start of the run (e.g. 7 = last week, 30 = last 30 days, 365 = last year). 0 = no filter. Works together with the dates below (the stricter start date wins). Approximate, like YouTube's own dates. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.

## `dateFrom` (type: `string`):

Only comments published on or after this date (YYYY-MM-DD). YouTube shows approximate dates ("3 weeks ago"), so the boundary is approximate too. For a rolling window use "Only comments from the last N days" instead. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.

## `dateTo` (type: `string`):

Only comments published on or before this date (YYYY-MM-DD). Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.

## `onlyNewComments` (type: `boolean`):

For scheduled runs: comments already delivered in an earlier run with this option on are skipped and not charged as comments; a page of 20 that yields fewer new comments than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee. The comment IDs seen so far are kept per video in a named key-value store in your account (see below). Each run still looks at the top comments up to "Max comments per video", so on busy videos a new comment is only found once it ranks among those.

## `monitoringStoreName` (type: `string`):

Name of the key-value store that remembers which comments were already delivered. Use a different name per project to keep separate histories. Letters, digits and hyphens only.

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

The 2-letter ISO 3166 country code YouTube is opened from, for example US (United States), GB (United Kingdom), DE (Germany), FR (France), ES (Spain), IT (Italy), TR (Turkey), BR (Brazil), IN (India), JP (Japan) or CA (Canada). Common English country names such as "Germany" also work; an unknown code stops the run with a clear message before anything is charged.

## `language` (type: `string`):

Language code, e.g. en, de, fr, es, pt, tr, ja. Affects texts such as "2 years ago" (publishedTimeText); comments are always delivered in the language they were written in.

## `operatingSystem` (type: `string`):

The desktop operating system YouTube is viewed from. Rarely needs changing.

## `processingSpeed` (type: `string`):

Fast: results usually within 1–2 minutes. Economy: usually up to ~5 minutes, for large runs (200+ comments). Automatic: fast for normal runs, economy for runs of 1,000+ comments. The price is the same.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 100,
  "includeAuthorInfo": false,
  "sortBy": "top",
  "minLikes": 0,
  "minReplies": 0,
  "publishedWithinDays": 0,
  "onlyNewComments": false,
  "monitoringStoreName": "youtube-comments-monitor",
  "country": "US",
  "language": "en",
  "operatingSystem": "windows",
  "processingSpeed": "auto"
}
```

# Actor output Schema

## `comments` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxCommentsPerVideo": 100
};

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

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 100
}' |
apify call cheapapi/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cheapapi/youtube-comments-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/cvcW359H6ZtejlB3U/builds/qT4v3zsYUiKfdFEqG/openapi.json
