# YouTube Comments Scraper API - Channel, Playlist & Video (`vonsensey/youtube-comments-scraper`) Actor

Scrape YouTube comments from whole channels, playlists and search results, not just one video. Full nested reply threads, like counts flagged when YouTube rounds them, optional sentiment and keyword scoring, and delta-only re-runs for daily monitoring. Pay per comment, no run-start fee.

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

## Pricing

from $2.00 / 1,000 comments

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

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

## What's an Apify Actor?

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 Comments Scraper API - Channel, Playlist & Video

**More from this account:** [YouTube Transcript Suite](https://apify.com/vonsensey/youtube-transcript-scraper) · [Website Contact & Email Suite](https://apify.com/vonsensey/website-contact-email-extractor) · [Career Site & ATS Jobs Suite](https://apify.com/vonsensey/career-page-job-postings-scraper-api) · [Google News Suite](https://apify.com/vonsensey/google-news-scraper-api) · [Keyword Research Suite](https://apify.com/vonsensey/google-keyword-ideas-scraper) · [Shopify Store Intelligence Suite](https://apify.com/vonsensey/shopify-store-leads-scraper) · [eBay Data Suite](https://apify.com/vonsensey/ebay-scraper-api) · [Amazon Reviews Suite](https://apify.com/vonsensey/amazon-reviews-scraper-api) · [Reddit](https://apify.com/vonsensey/reddit-scraper-posts-comments-api) · [Meta Ad Library](https://apify.com/vonsensey/facebook-ads-library-scraper-meta-ad-api) · [Vinted](https://apify.com/vonsensey/vinted-scraper-api) · [Trustpilot Review Intelligence Suite](https://apify.com/vonsensey/trustpilot-reviews-scraper) · [App Store & Google Play Reviews Suite](https://apify.com/vonsensey/app-store-google-play-reviews-scraper) · [Business Reviews Suite](https://apify.com/vonsensey/business-reviews-aggregator-scraper-api) · [Amazon Product Data Suite](https://apify.com/vonsensey/amazon-product-scraper-api)

Scrape YouTube comments from whole channels, playlists and search results, not just one video. Full nested reply threads, like counts flagged when YouTube rounds them, optional sentiment and keyword scoring, and delta-only re-runs for daily monitoring. Pay per comment, no run-start fee.

**No run-start fee, and failures are free.** Videos with comments turned off, videos that no
longer exist, per-video rows, the coverage report and every error row all cost nothing. A video
that was read but had no new comment is billed once as a video checked ($0.004) — twice a single
comment, and a fraction of what a busy video costs.

### What most YouTube comment scrapers make you do

Feed them one video URL at a time. If you want a channel's last fifty videos you write the
loop yourself, find the video ids yourself, and stitch the results together yourself.

**This one takes the channel.** Paste an `@handle`, a playlist link, a search phrase or a
Shorts tab and it finds the videos and returns every comment underneath them, in one
dataset, deduplicated on YouTube's own comment id.

| You paste | You get |
|---|---|
| `@handle` or a channel URL | Comments from every video on the channel |
| A playlist URL | Comments from every video in the playlist |
| A search phrase | Comments from every video the search returns |
| A `/shorts` tab | Comments from the creator's Shorts |
| A video URL, id, `youtu.be` or `/live` link | Comments from that video |

Mix as many as you like in a single run.

### What you get

| Field | What it is |
|---|---|
| `text` | The comment itself, exactly as written |
| `author`, `authorChannelId`, `authorChannelUrl` | Who wrote it, and a link straight to their channel |
| `authorIsVerified`, `authorIsCreator` | Verified badge, and whether the video's own channel wrote it |
| `likeCount` | Numeric likes — **exact below 1,000** |
| `likeCountIsApproximate` | `true` when YouTube rounded the number, so a filter is never silently wrong |
| `likeCountText` | What YouTube actually rendered, verbatim: `"306K"`, `"201"` |
| `replyCount` | How many replies the comment has |
| `isReply`, `replyLevel` | Whether this is a reply, and how deep |
| `threadId`, `parentCommentId` | Rebuild the conversation exactly — every reply points at its parent |
| `isHearted` | The creator hearted this comment |
| `publishedTimeText` | YouTube's own wording: `"1 year ago"` |
| `publishedAtApprox` | That resolved to an ISO timestamp, so it sorts and filters |
| `commentId` | YouTube's own id — stable, and what deduplication keys on |
| `videoId`, `videoUrl`, `videoTitle`, `channelName`, `channelId` | Which video and channel it came from |
| `sortedBy`, `scrapedAt` | Which order was requested, and when it was read |

Turn on `enrichComments` and every comment also carries:

| Field | What it is |
|---|---|
| `sentiment` | `positive`, `negative` or `neutral` |
| `sentimentScore` | Normalised `-1` to `1`, so comments sort by strength of feeling |
| `toxicityScore` | `0` to `1` triage signal for surfacing abuse to a human |
| `keywords` | Content words, stopwords and @mentions stripped out |
| `isQuestion` | The comment asks something — the fastest route to FAQ and content ideas |
| `mentionedTimestamps` | Timestamps viewers cite, like `["1:23"]` |
| `language` | Dominant writing system (`latin`, `cyrillic`, `han`, …), or `null` when too short to tell |

#### Four kinds of row, and only one of them costs anything

| Row | `type` | Costs |
|---|---|---|
| A comment or reply | `comment` | $2.00 per 1,000 (+$2.00 per 1,000 if enriched) |
| One row per video, with its title, views and how many comments came back | `video` | **free** |
| What each input produced, and whether the source ran out or your cap stopped it | `coverage` | **free** |
| Anything that could not be served, with the reason | `error` | **free** |

### Pricing

| Your Apify plan | comment / 1,000 | enrichment / 1,000 |
|---|---:|---:|
| Free | $4.00 | $4.00 |
| Bronze | $3.35 | $3.40 |
| Silver | $2.55 | $2.60 |
| Gold | $2.00 | $2.00 |
| Platinum | $2.00 | $1.90 |
| Diamond | $2.00 | $1.80 |

You are charged **per comment delivered**, once. A comment reached through two different
inputs is billed a single time, and on a scheduled re-run with `onlyNewSinceLastRun` the
comments you already have are neither delivered nor charged again.

Filters run **before** billing. `minLikes`, `filterKeywords`, `onlyQuestions` and
`excludeAuthorReplies` all reduce the bill rather than filtering something you paid for.

Set `maxCostUsd` for a hard ceiling in dollars, or `maxComments` for one in rows.

### Try it

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

### Worked recipes

#### Every comment on a whole channel

Paste a handle. It sweeps the channel's video tab and returns comments from every video in one dataset.

```json
{ "videoUrls": ["@MrBeast"], "maxVideosPerSource": 50, "maxCommentsPerVideo": 200, "maxComments": 10000 }
```

#### A whole playlist, in order

Course feedback, a conference track, a review series — one URL, every video's comments.

```json
{ "videoUrls": ["https://www.youtube.com/playlist?list=PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj"], "maxVideosPerSource": 40, "maxComments": 5000 }
```

#### Everything people say about a product

A search phrase becomes a corpus: every review and unboxing video on the topic, and every comment under them.

```json
{ "videoUrls": ["sony wh-1000xm5 review"], "maxVideosPerSource": 15, "maxCommentsPerVideo": 200, "enrichComments": true, "emitSummary": true }
```

#### Full conversations, not a flat list

Replies come back linked to their parents, so threads rebuild exactly.

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

#### Watch a channel daily and pay only for new comments

Put it on a schedule with `onlyNewSinceLastRun`. It remembers what it already returned, so tomorrow's run delivers — and bills — only what is genuinely new.

```json
{ "videoUrls": ["@MrBeast"], "onlyNewSinceLastRun": true, "monitorName": "mrbeast-watch", "sortBy": "newest", "maxComments": 2000 }
```

#### Only the questions viewers ask

Every question under a channel's videos, which is a content calendar and an FAQ in one run.

```json
{ "videoUrls": ["@MrBeast"], "onlyQuestions": true, "maxVideosPerSource": 30, "maxComments": 3000 }
```

#### Only comments mentioning a word you care about

Refunds, a competitor, a bug, a feature request — filtered before billing, so you never pay for the rest.

```json
{ "videoUrls": ["@MrBeast"], "filterKeywords": ["refund", "broken", "scam"], "maxComments": 2000 }
```

#### Score the lot and summarise it

Sentiment, keywords and question intent on every comment, plus one summary row with the split and the top phrases.

```json
{ "videoUrls": ["@MrBeast"], "enrichComments": true, "emitSummary": true, "maxComments": 5000 }
```

#### Only the comments that got traction

Skip the noise: a like floor filters before billing, so you pay for signal only.

```json
{ "videoUrls": ["@MrBeast"], "minLikes": 50, "maxVideosPerSource": 50, "maxComments": 2000 }
```

#### Shorts as well as long-form

A creator's whole Shorts tab, in the same shape as their regular uploads, so the two compare directly.

```json
{ "videoUrls": ["https://www.youtube.com/@MrBeast/shorts"], "maxVideosPerSource": 40, "maxComments": 3000 }
```

#### Cap the spend, not just the rows

A hard ceiling in dollars. The run stops the moment it would exceed it.

```json
{ "videoUrls": ["@MrBeast"], "maxComments": 100000, "maxCostUsd": 5 }
```

### Honest limits

These are measured, and stated because a listing that hides them wastes your first run.

- **Like counts above about 1,000 are rounded by YouTube itself.** There is no exact source
  for them. Rather than quietly present a rounded number as exact, every row carries
  `likeCountIsApproximate`, plus `likeCountText` with what YouTube actually rendered.
  Below 1,000 the count is exact, and zero is reported as a real `0`.
- **Comment timestamps are relative.** YouTube publishes `"1 year ago"`, not a date.
  `publishedAtApprox` resolves that against the run clock so it sorts, but it is an
  approximation and is named like one.
- **The sentiment layer is a triage signal, not a verdict.** It is a lexicon, it runs
  locally, and it is very good at sorting ten thousand comments into piles worth reading
  first. No accuracy figure is claimed for it, because none was measured. Do not use it as
  a moderation decision.
- **Commenter email addresses are not available.** YouTube does not expose them. Nothing
  here infers them.
- **Videos with comments switched off return a free error row**, not a failed run. Same for
  deleted videos and ones YouTube will not serve.

### Legal and privacy

Not affiliated with, endorsed by, or sponsored by YouTube or Google. "YouTube" is a
trademark of Google LLC and is used here only to describe what this Actor reads.

It collects **publicly visible comment data only** — nothing behind a login, nothing
private. Comments are personal data under GDPR: you are the controller for whatever you
collect, and you are responsible for having a lawful basis, honouring deletion requests and
not using it to contact people who have not agreed to hear from you.

### Use it from n8n, MCP, the API or a schedule

Built to be called by a workflow, not only from the Store form. The Actor is `vonsensey/youtube-comments-scraper`; every snippet below sends `{}`, which runs the defaults shown on the form — replace it with your own input.

#### n8n

Install the **Apify** community node (`@apify/n8n-nodes-apify` under *Settings → Community Nodes*, or search "Apify" on n8n Cloud). Add **Apify → Run Actor** with Actor `vonsensey/youtube-comments-scraper` and your input JSON, then **Apify → Get Dataset Items** on the run's `defaultDatasetId` and pipe the rows anywhere. For scheduled runs, the **On new Apify Event** trigger fires when a run of this Actor finishes.

#### MCP (Claude, Cursor, VS Code, any MCP client)

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=vonsensey/youtube-comments-scraper",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Your agent then calls `vonsensey/youtube-comments-scraper` as a tool with the same input the form takes and reads the dataset back.

#### REST API (one call, rows in the response)

```bash
curl -X POST "https://api.apify.com/v2/acts/vonsensey~youtube-comments-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" -d '{}'
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("vonsensey/youtube-comments-scraper").call(run_input={})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row)
```

#### JavaScript

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('vonsensey/youtube-comments-scraper').call({});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Make, Zapier, LangChain, CrewAI

The Apify app in **Make** and **Zapier** has a *Run an Actor* module: pick `vonsensey/youtube-comments-scraper`. In **LangChain** and **CrewAI** the Apify tool wrappers take the same Actor id. A daily **schedule** needs nothing but the Console: *Schedules → Create → this Actor → cron*, and the dataset fills on its own.

### Use cases

- **Read a whole channel's audience, not one video's.** Paste an @handle and every comment under every video comes back in one dataset, deduplicated on YouTube's own comment id. Most comment scrapers make you feed them one video URL at a time and stitch the results yourself.
- **Find out what people really think of a product.** A search phrase becomes a corpus: every review and unboxing video on the topic, and every comment underneath. Turn on scoring and the complaints, the questions and the praise separate themselves.
- **Mine the questions for content.** Viewers ask the same things over and over. Filter a channel's comments to questions only and you have a content calendar and an FAQ page, written by the audience, in one run.
- **Watch a channel or a launch daily and pay only for what is new.** Put it on a schedule with only-new-since-last-run and it remembers what it already returned. Tomorrow's run delivers, and bills, only genuinely new comments — so a daily watch stays cheap instead of re-buying the same thread every morning.

### Run it on a schedule

A one-off pull answers a question; a schedule answers it every day without you. Open **Schedules** in the Apify Console, point a cron at this Actor, and the dataset keeps filling on its own — no server, no cron box, no babysitting. Everything here is built to be re-run: you are billed per comment delivered, so a scheduled run that finds nothing new bills one video checked ($0.004) per video instead of a comment — nothing at all for a video that was private, deleted, has comments off, or failed to load.

### FAQ

#### Do I need a YouTube account, an API key or a quota?

No. Paste a video, a channel @handle, a playlist link or a search phrase and press Run. There is nothing to register and no key to paste, and you are not spending anyone's API quota — so there is no daily unit limit to run out of.

#### Can it scrape comments from a whole channel or playlist at once?

Yes, and that is the main reason this suite exists. Give it a channel URL or @handle and it sweeps the channel's video tab; give it a playlist and it takes every video in the list; give it a search phrase and it takes every video the search returns. Mix as many as you like in one run.

#### Does it return replies, and can I rebuild the conversation?

Yes. Reply threads are expanded and every reply carries threadId and parentCommentId, so a thread rebuilds exactly. replyLevel tells you how deep it sits. Set includeReplies to false if you only want top-level comments.

#### Are the like counts exact?

Below about 1,000 they are exact, and a comment with no likes is reported as a real 0. Above that YouTube itself rounds them to "306K" and publishes no exact figure anywhere, so every row carries likeCountIsApproximate telling you which case you are in, plus likeCountText with exactly what YouTube rendered. Be wary of any scraper advertising exact likes — the number is not available to it either.

#### What am I actually charged for?

Comments you keep, once each. There is no run-start fee. Videos with comments turned off, videos that no longer exist, the per-video rows, the coverage report and every error row are all free. Filters like minimum likes, keyword matching and questions-only run before billing, so they lower the bill rather than filtering something you already paid for. A comment reached through two different inputs is charged a single time.

#### How good is the sentiment scoring?

It is a lexicon signal built for triage, and it is described that way deliberately. It is very good at sorting ten thousand comments into piles worth reading first, and at splitting positive from negative in bulk. It is not a moderation verdict and no accuracy figure is claimed for it, because none was measured. It runs locally, which is why it costs a fraction of a per-comment model call.

#### Can I get commenters' email addresses?

No, and nothing here pretends to. YouTube does not expose email addresses on comments. You get the author's display name, channel id and channel URL, which is what is genuinely public.

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

Yes. Every run writes a dataset you can export in one click from the Console, or pull from the API as JSON, CSV, XLSX or XML. Set includeVideoRows to false for a flat one-row-per-comment file that opens straight into a spreadsheet.

***

Something wrong, or a field you need that is missing? Open an issue on the **Issues** tab — it is read and it gets fixed. If this saved you time, a rating on the Store page helps the next person find it.

# Actor input Schema

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

Anything YouTube: a video URL or 11-character id, a channel URL or @handle (its whole video tab is swept), a playlist URL, a /shorts tab, a YouTube search URL, or plain search text. Mix as many as you like in one run.

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

The hard ceiling on billable comments across every video in the run. This is what you pay for; set it and the run cannot cost more than this many comments.

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

Spread the budget evenly when sweeping a channel or playlist. Leave at 0 to let a single video use the whole run budget.

## `maxVideosPerSource` (type: `integer`):

How deep to go into each channel, playlist or search result before moving on. Ignored for single video URLs.

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

Top comments first (YouTube's own ranking), or newest first. Newest is the one to use for monitoring.

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

Expand every reply thread and return replies alongside top-level comments, each linked to its parent by threadId and parentCommentId. Replies count towards your comment budget.

## `maxRepliesPerThread` (type: `integer`):

Caps how deep a single popular thread can go, so one comment with 5,000 replies cannot eat the whole run.

## `enrichComments` (type: `boolean`):

Score every comment for sentiment, a toxicity triage signal, content keywords, writing system, whether it asks a question, and any video timestamps it cites. This is a lexicon signal for sorting comments at volume, not a moderation verdict. Billed as a separate enrichment event, only for comments actually scored.

## `onlyNewSinceLastRun` (type: `boolean`):

For scheduled monitoring. Remembers every comment id already returned under the same monitor name and skips them, so a daily run delivers and bills only what is genuinely new.

## `monitorName` (type: `string`):

Names the saved history used by 'only new since last run'. Use a different name per watch (for example one per brand or channel) so separate schedules do not share state. Not a credential.

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

Skip comments below this many likes. Filtered comments are never delivered and never billed.

## `filterKeywords` (type: `array`):

Case-insensitive. Leave empty to keep everything. Useful for pulling every mention of a product, a competitor or a complaint word out of a whole channel.

## `onlyQuestions` (type: `boolean`):

Keep only comments that read as questions. This is the fastest way to mine a channel for content ideas and FAQ material.

## `excludeAuthorReplies` (type: `boolean`):

Drop comments written by the channel that published the video, so you get the audience and not the host.

## `includeVideoRows` (type: `boolean`):

Adds one free row per video with its title, channel, view count and how many comments were returned. Always free.

## `emitSummary` (type: `boolean`):

One free row at the end with totals, unique authors, top commenters, and — when enrichment is on — the sentiment split and top keywords.

## `maxCostUsd` (type: `string`):

Stop the run once it has charged this much. Leave empty for no ceiling.

## `hl` (type: `string`):

Two-letter language for YouTube's own strings, such as the relative published times.

## `gl` (type: `string`):

Two-letter country YouTube should serve the pages for.

## `useProxy` (type: `boolean`):

Off by default because this Actor does not need one. Turn it on only if you want traffic routed through Apify Proxy anyway.

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

Optional. Left empty the Actor runs direct, which is how it was measured and what it is priced for.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "@MrBeast"
  ],
  "maxComments": 1000,
  "maxCommentsPerVideo": 0,
  "maxVideosPerSource": 25,
  "sortBy": "top",
  "includeReplies": true,
  "maxRepliesPerThread": 50,
  "enrichComments": false,
  "onlyNewSinceLastRun": false,
  "monitorName": "default",
  "minLikes": 0,
  "filterKeywords": [],
  "onlyQuestions": false,
  "excludeAuthorReplies": false,
  "includeVideoRows": true,
  "emitSummary": false,
  "maxCostUsd": "",
  "hl": "en",
  "gl": "US",
  "useProxy": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `comments` (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",
        "@MrBeast"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vonsensey/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 = { "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "@MrBeast",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("vonsensey/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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "@MrBeast"
  ]
}' |
apify call vonsensey/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

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