# YouTube Comments Scraper & Pain Point Analyzer (`herazur/youtube-comments-analyzer`) Actor

Turn YouTube video, channel and keyword comments into complaints, questions, feature requests, competitor mentions and purchase signals. Export evidence-backed opportunity rankings for product research.

- **URL**: https://apify.com/herazur/youtube-comments-analyzer.md
- **Developed by:** [Furkan Toluç](https://apify.com/herazur) (community)
- **Categories:** Social media, Videos, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 96.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 comment analyzeds

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 & Pain Point Analyzer

Turn public YouTube comments into a structured product-research report. Start with competitor videos, channels or search keywords and analyze **up to 10,000 comments per run**. Find complaints, questions, feature requests, competitor mentions, purchase intent, alternative requests and product problems, with original quotes and source links.

Built for Amazon sellers, SaaS founders, marketing agencies, product managers and YouTubers researching what an audience needs.

### Quick start

1. Enter YouTube video/channel URLs or search keywords.
2. Set the global comment and video limits. The prefilled example analyzes 25 comments from one video; start small to preview the output.
3. Optionally enter competitor names for brand matching.
4. Run the Actor. Download the dataset as JSON, CSV or Excel, or open the **Opportunity report (JSON)** output.

```json
{
  "keywords": ["wireless headphones review"],
  "maxVideos": 3,
  "maxComments": 1000,
  "competitors": ["Sony", "Bose", "Apple"],
  "maxUpstreamCostUsd": 5
}
```

Video URLs and keyword searches can be combined. Direct video URLs are prioritized, followed by channel discovery and keyword discovery. Comments are collected in video order, so the first video can fill the entire limit. This is not a balanced sample across channels. Collection stops at the global limit or source budget. Disabled comments, limited access and low-volume videos can return fewer comments.

### What you get

The default dataset contains three row types (`recordType`):

| Type | Contents |
| --- | --- |
| `summary` | Actual analyzed count, category totals, duplicates removed, source run IDs, warnings and limitations |
| `opportunity` | Theme, suggested improvement, comment count, score, category breakdown and up to five original quotes |
| `comment` | Original text, video and available comment links, likes, multiple signal labels and themes |

The `REPORT` key-value-store record provides the summary and ranked opportunities without individual comment rows. Set `includeComments` to false for a compact dataset. Category and theme counts overlap: one comment may be a question, an alternative request, and a pricing signal at the same time.

### Seven signal categories

| Signal | Example |
| --- | --- |
| Complaints | “This is too expensive.” |
| Questions | “Does this work with Android?” |
| Feature requests | “Please add offline support.” |
| Competitor mentions | “I prefer Notion.” — when Notion is supplied |
| Purchase intent | “Where can I buy this?” |
| Alternative requests | “Is there a cheaper alternative?” |
| Product problems | “Battery dies too quickly.” |

### Analysis method and scores

This version uses transparent **English and Turkish rules**, not an LLM. It does not require an AI API key. Nine predefined themes cover battery/charging, price, compatibility, reliability, speed, usability, support, quality and privacy. Other signals are grouped for manual review. Competitor mentions require user-supplied names; the Actor does not infer brands automatically.

The **Pain Point Score (0–100)** is a research prioritization heuristic:

`40 × theme share of all analyzed comments + 30 × complaint share within theme + 20 × buying/alternative share within theme + 10 × min(1, log10(1 + theme comment count) / 3)`

Scores use actual counts, are rounded to integers, and are not a purchase probability or proof of market demand. Example quotes are selected by likes. Suggested opportunities are fixed recommendations for each theme, not generated market forecasts. Sarcasm, complex negation, context and unsupported languages can lead to false positives or missed signals. Inspect the quotes before making decisions.

Deduplication uses comment ID when available, otherwise normalized text within a video. Equal text with different IDs is retained because distinct commenters can express the same need. YouTube ranking and source availability affect the sample; results do not represent all customers.

### Pricing and permissions

This Actor charges **$0.001 per comment analyzed** (`comment-analyzed` event) on the Apify Free plan, with lower prices on paid Apify plans (down to $0.0007). For example, 1,000 analyzed comments cost $1.00 on the Free plan. Only comments that are collected and classified are charged; duplicates and empty comments are not. Results are saved before the charge, and nothing is charged when collection fails. The Actor never collects more comments than your maximum charge per run allows: if the limit covers fewer comments than `maxComments`, the limit is lowered automatically and a warning is added to the summary.

**Live collection has additional costs.** It calls [YouTube Scraper](https://apify.com/streamers/youtube-scraper) for channel/keyword discovery and [YouTube Comments Scraper](https://apify.com/streamers/youtube-comments-scraper) for comments. Those Actors charge your Apify account separately at their current rates, plus applicable platform usage. `maxUpstreamCostUsd` defaults to $5 for source runs; it is separate from this Actor's fee. This is a source-spending guard, not a guarantee of collecting 10,000 comments for $5. Check source pricing before large runs.

The Actor starts the source Actors on your behalf with the run's own Apify token and reads only their results; never put your token in the input. Imported comments skip source Actors and their fees. No YouTube or AI API key is required.

This Actor's own platform usage is included in the per-comment fee. Discovery runs are individually capped at $0.50 within your source budget. If a source's billing has not settled, its budget is reserved conservatively and `upstreamCostUsd` is `null`; the source run's Billing tab shows final charges. This may stop collection early. Account concurrency limits are retried for up to five minutes.

#### Reliability

Each source run is bounded by the remaining run time, and collection stops about 90 seconds before this run's timeout so the analysis is always saved. If one video's comment run fails, times out or returns nothing, the Actor records a warning and continues with the next video; comments a timed-out source run already saved are still analyzed. Discovery failures for one channel or keyword do not stop other sources. The run fails only when no comments at all could be collected, with the first source error in the message. Warnings are listed in the `summary` row and the `REPORT` record.

### Import your existing comments

When `comments` is provided, the Actor analyzes only the imported comments: YouTube URLs (including the prefilled one) and keywords are ignored, and no source Actors are started. Items without text are skipped with a warning.

```json
{
  "comments": [
    {"id":"example-1","text":"Battery dies too quickly.","likes":12},
    {"id":"example-2","text":"Is there a cheaper alternative?","likes":4},
    {"id":"example-3","text":"Does this work with Android?","likes":2}
  ],
  "maxComments": 10000
}
```

These are illustrative comments, not measured research. Imported objects accept `text` (or `comment`/`commentText`), optional `id`, `videoUrl`, `commentUrl`, `likes` and `publishedAt`.

### Troubleshooting

- **No comments collected:** check that comments are enabled, try another video, and inspect linked source runs. A run where no comments at all can be collected fails explicitly; if only some videos fail, the run succeeds with warnings.
- **Fewer comments than requested:** increase source budget or videos; requested limits are maxima, not promised counts.
- **Source start or payment error:** ensure your account can run both paid source Actors and has enough credit and free memory (each source run uses 1 GB).
- **Fewer comments than `maxComments`:** your maximum charge per run may be lower than `maxComments` × the per-comment price; the summary warnings show the adjusted limit.
- **Few detected signals:** the audience may not discuss product issues, or comments may use unsupported languages or wording. Unclassified comments remain in the export.

Only public comments are collected. The Actor omits commenter profile fields from its output. Use the data responsibly and comply with applicable platform terms. For bugs, open an issue on this Actor with a run ID and a non-sensitive sample.

# Actor input Schema

## `startUrls` (type: `array`):

Video, Shorts, live video, or channel URLs. Provide URLs and/or keywords. Leave empty when importing comments.

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

Discover videos for product names, competitor brands, or niche keywords.

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

Global collection/analysis limit across all videos, up to 10,000. Actual count depends on accessible comments and budget. Each analyzed comment is one billable event.

## `maxVideos` (type: `integer`):

Global video discovery limit. Videos are processed in order until the comment limit is reached.

## `competitors` (type: `array`):

Exact brand/product names, e.g. Notion, Evernote, Samsung. Case insensitive, whole-name matching. No names are assumed.

## `sortCommentsBy` (type: `string`):

Top comments for established concerns, newest first for recent feedback.

## `maxUpstreamCostUsd` (type: `number`):

Total budget passed to paid discovery/comment source runs. Separate from this Actor's per-comment fee. A small budget can return fewer comments. Source prices are controlled by their publishers.

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

Include individual comment rows alongside summary and opportunity rows in the dataset.

## `comments` (type: `array`):

Alternative to live collection: an array of objects with text and optional id, videoUrl, commentUrl, likes. When comments are provided, YouTube URLs and keywords are ignored and no source Actors run. Max 10,000 comments.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=xObhZ0Ga7EQ"
    }
  ],
  "maxComments": 25,
  "maxVideos": 10,
  "sortCommentsBy": "TOP_COMMENTS",
  "maxUpstreamCostUsd": 5,
  "includeComments": true
}
```

# Actor output Schema

## `report` (type: `string`):

No description

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=xObhZ0Ga7EQ"
        }
    ],
    "maxComments": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("herazur/youtube-comments-analyzer").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 = {
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=xObhZ0Ga7EQ" }],
    "maxComments": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("herazur/youtube-comments-analyzer").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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=xObhZ0Ga7EQ"
    }
  ],
  "maxComments": 25
}' |
apify call herazur/youtube-comments-analyzer --silent --output-dataset

```

## MCP server setup

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

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/y3eGDs61k98KhPAqa/builds/JjB9TnSuTaVKJ00P7/openapi.json
