# YouTube Comments Scraper + AI Sentiment Analysis & Insights (`vidlens/youtube-comments-ai-analyzer`) Actor

YouTube video URL in, audience report out: every comment labeled with sentiment and category, plus recurring themes, top viewer questions, requests, complaints, what viewers love, content ideas and recommended actions. Optional translation. No login, no API key.

- **URL**: https://apify.com/vidlens/youtube-comments-ai-analyzer.md
- **Developed by:** [Brain Spice](https://apify.com/vidlens) (community)
- **Categories:** AI, Social media
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

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 AI Analyzer — sentiment, viewer questions, content ideas

> 🎁 **Free trial until Nov 20, 2026: your first video report is free** (up to 1,000+ comments analyzed, no charge). After that, $0.02 per report + $0.001 per comment.

Paste a YouTube video (or Shorts) link and get an **audience-research report** from its comments in about 2–3 minutes — no login, no API key, no coding.

| You get | Details |
|---|---|
| 😀 Sentiment breakdown | % positive / neutral / negative, also **weighted by likes** (what the crowd agrees with) |
| 🗂️ Every comment labeled | sentiment, category (praise, question, request, complaint, criticism, story, joke, discussion, spam) and topic |
| 🧭 Themes | 4–8 recurring themes with share of comments, a one-line insight and real example comments |
| ❓ Top viewer questions | deduplicated, most-liked first — ready for an FAQ or a follow-up video |
| 💡 Requests & content ideas | what this audience wants to see next |
| ⚠️ Complaints | audio, ads, length, product issues — the things to fix |
| ❤️ What viewers love | what to keep doing |
| ✅ Recommended actions | practical next steps for the creator or brand |
| 🌐 Translation (optional) | the whole report in ja, es, de, fr, pt-BR, zh, ko … |

Use it for **creator strategy, competitor research, product feedback from review videos, brand monitoring, influencer vetting, or market research** — and as a tool for AI agents (works through Apify MCP).

### Why this one

- **Insights, not just a dump of comments.** Scrapers give you 1,000 rows; this gives you the 10 things that matter, with the evidence.
- **Privacy-friendly.** Commenter names, handles and profile links are **never** included in the output — only the comment text, likes and labels.
- **Any language.** Comments in Japanese, Spanish, Hindi, etc. are understood; the report is in English (translation optional).
- **Simple pricing.** $0.02 per video report + $0.001 per comment analyzed. 1,000 comments ≈ **$1.02**, 300 comments ≈ $0.32. Failed videos are free.

### Input

```json
{ "videoUrls": ["https://www.youtube.com/watch?v=MiUHjLxm3V0"], "maxComments": 1000, "sortBy": "top", "includeComments": true, "translateTo": "" }
```

### Output (one item per video, real example shortened)

```json
{
  "source": "https://www.youtube.com/watch?v=MiUHjLxm3V0",
  "status": "ok",
  "meta": {"title": "The Closest Thing We Have to Alien Technology", "channel": "…", "view_count": 0, "comment_count": 0},
  "comments_analyzed": 1000,
  "sentiment_pct": {"pos": 47.8, "neu": 49.6, "neg": 2.6},
  "like_weighted_sentiment_pct": {"pos": 43.0, "neu": 52.6, "neg": 4.4},
  "categories_pct": {"praise": 43.4, "discussion": 22.8, "joke": 11.3, "question": 5.4, "complaint": 0.9},
  "top_topics": [{"topic": "video quality", "count": 57}, {"topic": "machine cost", "count": 6}],
  "summary": ["Viewers express awe at the complexity of EUV lithography …", "Many industry professionals shared first-hand stories …"],
  "themes": [{"theme": "Awe and Technical Complexity", "sentiment": "positive", "share_pct": 25,
              "insight": "Many users are mesmerized by the scale of engineering required …",
              "examples": ["I'm an engineer, and every single solution ASML had to a problem is …"]}],
  "top_questions": ["Why did the technology change from X-ray lithography to EUV?", "How do they manage vibration at such a microscopic scale?"],
  "requests_and_ideas": ["A deep dive into Zeiss optics", "The history of DUV technology"],
  "complaints": ["Repetitive and intrusive advertisements", "Caption errors ('sea crystal' instead of 'seed crystal')"],
  "what_viewers_love": ["…"], "content_ideas": ["…"], "recommended_actions": ["…"],
  "comments": [{"text": "\"How often do you miss?\" \"We don't\" damn", "likes": 48000, "sentiment": "neu", "category": "other", "topic": "quote", "by_creator": false, "pinned": false}],
  "translation": {"lang": "ja", "summary": ["…"], "themes": ["…"]}
}
```

### Pricing (pay per event)

- **Video report**: $0.02 per successfully analyzed video
- **Comment analyzed**: $0.001 per comment (you control the number with `maxComments`)
- **Report translation** (only if `translateTo` is set): +$0.01 per video

### Notes

- Top-level comments are analyzed (replies are not). Up to 5,000 per video.
- Videos with comments turned off, private or removed videos return `status: "error"` and are not charged.
- Typical speed: 1,000 comments in about 2–3 minutes.

### More tools from Brain Spice

- [Video Transcript + On-screen Text + Hook & Summary AI](https://apify.com/vidlens/video-understanding) — TikTok / Reels / Shorts breakdown, $0.01 per video
- [Podcast & Audio Transcript with Speakers, Chapters, SRT](https://apify.com/vidlens/podcast-transcript-speakers-chapters) — who said what + chapters, $0.008 per minute
- [YouTube Comments AI Analyzer](https://apify.com/vidlens/youtube-comments-ai-analyzer) — sentiment, viewer questions, content ideas, $1 per 1,000 comments

### Use it from code, n8n, Make or an AI agent

**API (one call, waits for the result):**

```bash
curl -X POST "https://api.apify.com/v2/acts/vidlens~youtube-comments-ai-analyzer/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.youtube.com/watch?v=..."]}'
```

**Python:**

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("vidlens/youtube-comments-ai-analyzer").call(run_input={"videoUrls": ["https://www.youtube.com/watch?v=..."]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

- **n8n:** use the *Apify* node → "Run actor and get dataset", actor `vidlens/youtube-comments-ai-analyzer`.
- **Make / Zapier:** use the Apify app → "Run an Actor", then "Get dataset items".
- **AI agents (Claude, ChatGPT, Cursor):** available through the Apify MCP server (`https://mcp.apify.com`) — add `vidlens/youtube-comments-ai-analyzer` as a tool.

# Actor input Schema

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

YouTube videos or Shorts (youtube.com/watch?v=…, youtu.be/…, youtube.com/shorts/…).

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

How many top-level comments to analyze per video (10–5000). You pay per comment actually analyzed.

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

Top = most relevant/liked first (best for insights). Newest = latest reactions first.

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

Adds the full list of comments with sentiment, category and topic. Turn off for report only.

## `translateTo` (type: `string`):

Language code such as ja, es, de, fr, pt-BR, zh, ko. Leave empty for English only.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=MiUHjLxm3V0"
  ],
  "maxComments": 300,
  "sortBy": "top",
  "includeComments": true,
  "translateTo": ""
}
```

# Actor output Schema

## `results` (type: `string`):

One item per video: sentiment and category breakdown, themes with example comments, top questions, requests, complaints, what viewers love, content ideas, recommended actions, labeled comments, optional translation, and status/error.

# 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=MiUHjLxm3V0"
    ],
    "maxComments": 300
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vidlens/youtube-comments-ai-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/u6P50bp8PTiMOb0e9/builds/e9Aj5fahpCdyodNhy/openapi.json
