# YouTube Comment Insights: Questions, Requests & Sentiment (`dofunbiz/youtube-comment-insights`) Actor

Turn YouTube comments into audience insights: viewer questions, video requests, sentiment, feedback themes, referenced moments and top comments. Official API.

- **URL**: https://apify.com/dofunbiz/youtube-comment-insights.md
- **Developed by:** [Scot C](https://apify.com/dofunbiz) (community)
- **Categories:** Social media, Videos, Marketing
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.15 / video report

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?

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 Comment Insights: Questions, Requests & Sentiment

Stop scrolling through thousands of comments. Give it any YouTube video or channel and get a one-page answer to **"what is my audience asking for, and how did this video land?"**

For each video, it produces:

- **Content requests**: "please make a video on…", "can you review…", "we need a part 2". These are your next video ideas, ranked by likes.
- **Top viewer questions**: the questions your audience asks most, ranked by likes. Use them for FAQs, pinned comments or follow-up videos.
- **Sentiment**: share of positive, neutral and negative comments.
- **Feedback themes**: audio, video quality, length and pacing, clickbait or title, sponsors, accuracy, editing. Each comes with example quotes.
- **Referenced moments**: timestamps viewers keep mentioning, which show the parts that landed or didn't.
- **Most-liked comments** and **top phrases**.
- A ready-to-share **Markdown report** per video, plus structured JSON.

It uses the **official YouTube Data API**, so there's no scraping, no proxies and no blocked runs.

### Who it's for

- **Creators**: find your next video ideas and fix what viewers complain about.
- **Agencies and social media managers**: produce audience reports for clients in minutes.
- **Brands and sponsors**: check how an audience actually reacts before you sponsor a channel.
- **Researchers**: compare reactions across a channel's recent uploads.

### Input

| Field | Example |
|---|---|
| Video URLs or IDs | `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `youtu.be/...`, `/shorts/...` |
| Channels | `@mkbhd`, a channel URL, or a `UC...` ID |
| Recent videos per channel | `5` |
| Max comments per video | `500` |
| Comment order | Top comments, or newest first |

### Example report (excerpt)

Tech review video, 366 comments analyzed:

- **Top question:** *"Can it work in headphones and stove fire gas sound?"*
- **Most-liked comments:** *"Very useful for finding tiny leaks in industrial process…"* (2,973 likes), *"Finally able to locate the mosquito in my room at night"* (1,659 likes)
- **Feedback themes:** audio (41 mentions, 2 negative), video quality (5), clickbait or title (2)

### Output

- **Dataset**: one insight report row per video.
- **Key-value store**: `REPORT-<videoId>` Markdown report, `COMMENTS-<videoId>` raw comments as JSON (if enabled).

### Pricing

Pay per event: a small fee per video report, plus a tiny per-comment fee only when you export raw comments.

### Notes

- Comments are fetched through the official YouTube Data API. Videos with comments disabled return an empty report, and you're still charged for it.
- Sentiment and theme detection are keyword based and work best on English comments.
- Raw comment exports leave out commenter names.
- For very large jobs, you can add your own YouTube API key in the input.

# Actor input Schema

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

YouTube video links (watch, youtu.be, shorts) or 11-character video IDs.

## `channels` (type: `array`):

Channel handles (@name), channel URLs or UC... IDs. Analyzes each channel's most recent videos.

## `maxVideosPerChannel` (type: `integer`):

How many of each channel's latest uploads to analyze.

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

Comments to analyze per video.

## `order` (type: `string`):

'relevance' = YouTube's top comments first; 'time' = newest first.

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

Also analyze replies to top-level comments (first few per thread).

## `englishOnly` (type: `boolean`):

Skip comments that don't look English (theme and sentiment detection is English-based).

## `includeRawComments` (type: `boolean`):

Also save every fetched comment as JSON (charged per comment). Off = insight reports only.

## `youtubeApiKey` (type: `string`):

Leave empty to use the built-in key. Supply your own YouTube Data API v3 key for very large jobs.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerChannel": 5,
  "maxCommentsPerVideo": 500,
  "order": "relevance",
  "includeReplies": false,
  "englishOnly": true,
  "includeRawComments": false
}
```

# Actor output Schema

## `reports` (type: `string`):

One row per video: sentiment, questions, content requests, feedback themes, referenced moments, top comments.

## `markdownReports` (type: `string`):

Ready-to-share Markdown report per video.

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

All fetched comments as JSON, one file per video (only when 'Export raw comments' is enabled).

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dofunbiz/youtube-comment-insights").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"] }

# Run the Actor and wait for it to finish
run = client.actor("dofunbiz/youtube-comment-insights").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"
  ]
}' |
apify call dofunbiz/youtube-comment-insights --silent --output-dataset

```

## MCP server setup

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

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/fObSz3bigEBvAsuQz/builds/XLleVhQXvqPEgt87x/openapi.json
