# YouTube Comment Insights — Questions, Requests & Complaints (`youfuxu/youtube-comment-insights`) Actor

Scrape YouTube comments and get what the audience is asking for: top questions, video requests, complaint themes, recurring phrases and most-liked comments per video.

- **URL**: https://apify.com/youfuxu/youtube-comment-insights.md
- **Developed by:** [Youfu Xu](https://apify.com/youfuxu) (community)
- **Categories:** Social media, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 saved rows

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 & Complaints

Comment scrapers give you a spreadsheet of thousands of comments. This Actor also reads them for you and tells you **what the audience is asking for**: the questions they keep asking, the videos they want next, what annoys them, and which comments got the most love.

Built for creators planning their next video, agencies researching a niche, brands checking how a sponsored video landed, and anyone mining content ideas from a competitor's audience.

### What you get

**One insight row per video** (`type: "video_summary"`):

| Field | Meaning |
|---|---|
| `title`, `channel`, `totalCommentsShown`, `views` | Video basics (`views` only when YouTube returns it for the run) |
| `questionShare`, `topQuestions` | % of comments that ask a question, and the most-liked ones |
| `requestShare`, `videoRequests` | "Make a video on…", "part 2", "can you review…" — ready-made content ideas |
| `praiseShare` | % of comments that thank or praise |
| `complaintThemes` | Audio, too long / slow, clickbait title, sponsor & ads, wrong or outdated info, price, beginner confusion — with counts and examples |
| `topPhrases` | Two-word phrases that keep coming up |
| `mostLikedComments` | The 5 comments people agreed with most |
| `creatorReplies` | How many comments the creator answered |

**One row per comment** (`type: "comment"`, optional): text, likes, reply count, posted time, author, pinned / hearted / creator flags.

### How to use it

- Paste video links into `videoUrls`, **or**
- give `channels` (URL, `@handle` or channel ID) to analyze each channel's latest uploads — the fastest way to see what a whole audience wants.
- Choose top or newest comments and how many per video.
- Turn off `includeComments` if you only want the insights.

### Example insight (Jeff Su, "6 Insanely Practical AI Tips")

```json
{
  "type": "video_summary",
  "title": "6 Insanely Practical AI Tips (in 18 minutes)",
  "commentsAnalyzed": 67,
  "questionShare": 23.9,
  "requestShare": 4.5,
  "praiseShare": 26.9,
  "topQuestions": [{ "text": "Do I need Obsidian to manage all the .md files or is it ok i…", "likes": 3 }],
  "complaintThemes": [{ "theme": "beginner_confusion", "comments": 2 }]
}
```

### Good to know

- **Rule-based, not AI** — fast, cheap and consistent. The question / request / theme rules are written for English; comments in other languages are still collected.
- **Top-level comments only.** Reply counts are included, reply threads are not collected.
- **Public data only** — read through YouTube's own web client, no login, no proxies. Videos with comments turned off are reported in the run's `RUN_SUMMARY` and not charged.

### Pricing

Pay per event: a small start fee per run, one fee per analyzed video, and a per-row fee for each saved comment.

# Actor input Schema

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

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

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

Channel URLs, @handles or UC... IDs. The latest uploads of each channel are analyzed.

## `latestVideosPerChannel` (type: `integer`):

How many of the newest uploads to analyze per channel.

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

Top-level comments (replies are counted, not collected).

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

Top comments (most engaged) or newest first.

## `includeComments` (type: `boolean`):

Turn off to get only the per-video insight summary.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=9Hwanevuhd8"
  ],
  "latestVideosPerChannel": 5,
  "maxCommentsPerVideo": 200,
  "sortBy": "top",
  "includeComments": true
}
```

# Actor output Schema

## `datasetItemsJson` (type: `string`):

All scraped records as a JSON array.

## `datasetItemsCsv` (type: `string`):

All scraped records as a CSV file.

## `datasetItemsXlsx` (type: `string`):

All scraped records as an Excel workbook.

## `dataset` (type: `string`):

The default dataset of this run in Apify Console.

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

// Run the Actor and wait for it to finish
const run = await client.actor("youfuxu/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=9Hwanevuhd8"] }

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

```

## MCP server setup

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