# YouTube Comments Scraper & Monitor – New Comments + Alerts (`kirozhang/youtube-comments-monitor`) Actor

Scrape YouTube comments from videos or a channel's latest uploads. Monitor new comments only, flag questions the creator has not answered, negative comments and keywords, with Slack/webhook alerts and a shareable report.

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

## Pricing

from $0.80 / 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?

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 & Monitor – New Comments + Alerts

Scrape **YouTube comments** from any video, Short or live replay – or from the **latest uploads of a channel** – and turn them into a daily to-do list: **only new comments**, **questions the creator has not answered**, **negative comments** and **keyword mentions**, delivered to **Slack or any webhook** with a shareable report.

- ✅ Videos, Shorts and **channels** (`@handle`, channel URL or ID) – new uploads are picked up automatically.
- ✅ **Only new comments** mode: schedule it and get just what was posted since the last run. With the newest sort it stops at known comments, so monitoring runs cost cents.
- ✅ **Unanswered questions**: question comments without a reply, pin or heart from the channel owner (`creatorReplied`, `isHeartedByCreator`).
- ✅ **Sentiment** (`positive` / `negative` / `neutral`) and your own **alert keywords** and **topics** (product names, "refund", "broken", a sponsor, a competitor…).
- ✅ Likes, reply count, pinned, hearted, verified and creator flags, approximate `publishedAt`, direct comment link.
- ✅ Optional **replies** (one row each) and optional commenter handles (off by default).
- ✅ **Slack / webhook** summary after each run and an optional fixed **report link** with 7- and 30-day trends.

### Who uses it

| You are | You get |
|---|---|
| **Creators & community managers** | Every morning: the questions you have not answered yet and the comments that need moderation. |
| **Brands with a YouTube channel** | Customer questions, complaints and product feedback from the comment section in Slack. |
| **Agencies** | One report link per client channel, updated automatically. |
| **Marketers & researchers** | Comments of competitor or influencer videos with sentiment and topics, ready for analysis or AI. |

### How to use it

1. Add **channels** (`@mkbhd`) and/or **videos** (any YouTube link).
2. Choose how many latest videos per channel and how many comments per video.
3. Optional: alert keywords and topics, include replies, commenter handles.
4. For monitoring, turn on **Only new comments**, set a **Tracking name**, add a Slack webhook and schedule the run (e.g. every 6 hours).

```json
{
    "channelUrls": ["@yourchannel"],
    "videosPerChannel": 5,
    "maxVideoAgeDays": 30,
    "onlyNew": true,
    "trackingId": "my-channel",
    "alertKeywords": ["refund", "broken", "discount code"],
    "slackWebhookUrl": "https://hooks.slack.com/services/…"
}
```

### Output

One row per comment:

```json
{
    "videoId": "jNQXAC9IVRw",
    "videoTitle": "Me at the zoo",
    "channelName": "jawed",
    "commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
    "commentUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg",
    "text": "Why does YouTube recommend me this today?",
    "publishedTimeText": "3 minutes ago",
    "publishedAt": "2026-10-25T04:04:58.570Z",
    "likes": 0,
    "replyCount": 0,
    "isPinned": false,
    "isHeartedByCreator": false,
    "authorIsCreator": false,
    "creatorReplied": false,
    "isQuestion": true,
    "sentiment": "neutral",
    "matchedKeywords": [],
    "isAlert": true,
    "alertReasons": ["unanswered question"],
    "isNew": true
}
```

The `OUTPUT` record has one summary per video (comments, new, questions, unanswered, negative, alerts, keyword hits) and the `REPORT` record is a ready-to-share HTML page.

### Pricing

| Event | Price |
|---|---|
| Comment (or reply) saved | **$1.00 per 1,000 comments** ($0.80 on Gold and higher Apify plans) |
| Video checked | $0.002 per video per run |

Examples: 10,000 comments from 20 videos ≈ **$10.04**. Monitoring a channel's 5 latest videos 4× a day in "only new comments" mode ≈ **$1.20 / month** for the checks plus $1 per 1,000 new comments. The Apify free plan checks up to 5 videos per run.

### FAQ

**Do I need a YouTube API key or login?** No.

**How exact is `publishedAt`?** YouTube only shows relative times ("3 days ago"); `publishedAt` is calculated from it, so it is exact to the minute for fresh comments and approximate for old ones. `publishedTimeText` keeps the original text.

**How is "creator replied" detected?** For flagged comments with replies, the Actor reads the reply thread and checks for the channel owner's badge. Pinned and hearted comments count as answered.

**Is sentiment accurate?** It is a fast, rule-based English word list – good for sorting and alerts, not a replacement for a language model. Export the comments to your AI tool for deeper analysis.

**Is it legal?** The Actor reads public comments only, never logs in, and leaves commenter names out unless you turn them on. Use the data in line with YouTube's terms and privacy laws that apply to you.

# Actor input Schema

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

Channel URLs, @handles or channel IDs, e.g. <code>https://www.youtube.com/@mkbhd</code>, <code>@mkbhd</code> or <code>UCBJycsmduvYEL83R_U4JriQ</code>. The latest uploads of each channel are checked.

## `videosPerChannel` (type: `integer`):

How many of the newest uploads of each channel to check.

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

Video URLs or IDs (watch, youtu.be, Shorts and live links work), e.g. <code>https://www.youtube.com/watch?v=jNQXAC9IVRw</code>.

## `includeShorts` (type: `boolean`):

Also check the latest Shorts of each channel (same number as above).

## `maxVideoAgeDays` (type: `integer`):

Optional (0 = no limit). Channel uploads older than this are skipped – handy for monitoring only fresh videos.

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

Upper limit of top-level comments read per video in one run.

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

Order in which comments are read.

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

Also save replies (one row each, with <code>parentCommentId</code>).

## `maxRepliesPerComment` (type: `integer`):

Used with Include replies.

## `includeAuthorNames` (type: `boolean`):

Off by default (privacy-friendly). When on, rows include the commenter's public @handle and channel ID.

## `onlyNew` (type: `boolean`):

Off by default (every comment read is returned, each with <code>isNew</code>). When on, the first run with a Tracking name saves the baseline and later runs return – and charge – only comments that were not returned before. With the newest sort the Actor stops reading as soon as it reaches known comments, so monitoring runs are fast and cheap.

## `trackingId` (type: `string`):

Optional. A stable name for this list of videos/channels (e.g. <code>my-channel</code>). Runs with the same name share history. Default: derived from the input.

## `alertOnQuestions` (type: `boolean`):

Questions ("How do you…", "Where can I…?") that the creator has not replied to, pinned or hearted are flagged with <code>isAlert</code> and listed in the report and notification.

## `alertOnNegative` (type: `boolean`):

Comments with negative sentiment (basic English word list: "scam", "broken", "waste of time", "refund"…) are flagged. Every row has <code>sentiment</code> and <code>sentimentScore</code>.

## `checkCreatorReplies` (type: `boolean`):

For flagged comments that have replies, read the replies to see if the channel owner answered (<code>creatorReplied</code>). Up to 25 threads per video per run; no extra charge.

## `alertKeywords` (type: `array`):

Optional. A comment that mentions any of these words or phrases is flagged as an alert, e.g. <code>refund</code>, <code>broken</code>, <code>sponsor</code>, your product or competitor names. Case- and accent-insensitive.

## `customTopics` (type: `array`):

Optional. One topic per line: <code>Topic name: word, phrase, word</code>, e.g. <code>Audio: mic, sound, audio</code>. Matching comments get the topic in <code>customTopics</code>.

## `slackWebhookUrl` (type: `string`):

Optional. A Slack <a href="https://api.slack.com/messaging/webhooks" target="_blank">Incoming Webhook</a> URL (https://hooks.slack.com/services/…). After a run you get one summary message in that channel. Stored encrypted.

## `webhookUrl` (type: `string`):

Optional. Any https endpoint (Make, Zapier, n8n, a Microsoft Teams workflow or your own server). Receives one JSON POST per run with counts, items and the report link. Stored encrypted.

## `notifyOn` (type: `string`):

When the Slack / webhook message is sent.

## `publicReport` (type: `boolean`):

Off by default. When on, the HTML report (videos, comments that need attention, 7- and 30-day trends) is kept at one fixed link per Tracking name (OUTPUT.reportUrl) – share it with your team or a client. Anyone with the link can open it; commenter names are never included.

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

Apify Proxy (datacenter) works well for YouTube. Switch to residential only if you see repeated errors.

## Actor input object example

```json
{
  "channelUrls": [
    "https://www.youtube.com/@mkbhd"
  ],
  "videosPerChannel": 2,
  "includeShorts": false,
  "maxCommentsPerVideo": 50,
  "sortBy": "newest",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "includeAuthorNames": false,
  "onlyNew": false,
  "alertOnQuestions": true,
  "alertOnNegative": true,
  "checkCreatorReplies": true,
  "notifyOn": "alerts",
  "publicReport": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `report` (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 = {
    "channelUrls": [
        "https://www.youtube.com/@mkbhd"
    ],
    "videosPerChannel": 2,
    "maxCommentsPerVideo": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("kirozhang/youtube-comments-monitor").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 = {
    "channelUrls": ["https://www.youtube.com/@mkbhd"],
    "videosPerChannel": 2,
    "maxCommentsPerVideo": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("kirozhang/youtube-comments-monitor").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 '{
  "channelUrls": [
    "https://www.youtube.com/@mkbhd"
  ],
  "videosPerChannel": 2,
  "maxCommentsPerVideo": 50
}' |
apify call kirozhang/youtube-comments-monitor --silent --output-dataset

```

## MCP server setup

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

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/8IxGELxba81jTq0fq/builds/iN8075ezBjo8q1R0s/openapi.json
