# YouTube Comments Scraper API - Extract Video Comments Fast (`apidojo/youtube-comments-scraper`) Actor

YouTube Comments Scraper, the ultimate solution for extensive YouTube comments data retrieval. With its high-speed scraping abilities, it provides unmatched effectiveness and thoroughness. Additionally, its cost-effectiveness is unmatched, priced at just $0.50 per 1000 comments!

- **URL**: https://apify.com/apidojo/youtube-comments-scraper.md
- **Developed by:** [API Dojo](https://apify.com/apidojo) (community)
- **Categories:** Social media, Lead generation, Videos
- **Features:** Limited permissions
- **Stats:** 4,972 total users, 1,125 monthly users, 100.0% runs succeeded, 67 bookmarks
- **User rating**: 4.84 out of 5 stars

## Pricing

from $0.50 / 1,000 dataset items

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

## Fast YouTube Comments Scraper API: Extract Comment Data, Replies & Sentiment at Scale

**The most comprehensive YouTube comment data extractor for sentiment analysis, brand monitoring, and audience research.**

Extract YouTube comments including comment text, author names, like counts, reply threads, and published dates from any video or Shorts URL. This **YouTube comments scraper API** works without login—no proxies, no authentication, no API keys required. Built for researchers, marketers, and analysts who need to **scrape YouTube comments** at scale.

💰 **Transparent Event-Based Pricing**

- **Video Query**: $0.001 per video (~20 comments FREE!)
- **Additional Comments**: $0.0005 each

⚡ **Speed:** Up to 250+ comments/second\
📊 **Coverage:** Videos, Shorts, top comments, newest first, reply threads\
🎯 **Output:** JSON/CSV with comment text, author data, like counts, reply counts, timestamps\
🚀 **Setup:** Zero configuration—no authentication or proxy required

Perfect for **sentiment analysis**, **brand monitoring**, **market research**, and **NLP training data** at a fraction of traditional API costs.

### 📋 Table of Contents

- [⚡ Features & Capabilities](#features--capabilities)
- [💰 Pricing: Transparent Event-Based Costs](#pricing-transparent-event-based-costs)
- [🍚 Input Parameters](#input-parameters)
- [💡 YouTube Comments Scraper Strategy Guide](#youtube-comments-scraper-strategy-guide)
- [📦 Output Format](#output-format)
- [🧩 Custom Map Function](#custom-map-function)
- [🔌 Send Results to Notion, Todoist and More (MCP Connectors)](#send-results-to-notion-todoist-and-more-mcp-connectors)
- [🌴 Related Scrapers & Data Extraction Tools](#related-scrapers--data-extraction-tools)
- [🆓 Demo Mode & Free Testing](#demo-mode--free-testing)
- [🔧 Troubleshooting Common Issues](#troubleshooting-common-issues)
- [🎯 Use Cases & Industries](#use-cases--industries)
- [💡 Quick Start Guide](#quick-start-guide)
- [❓ Frequently Asked Questions](#frequently-asked-questions)
- [📞 Contact](#contact)

##### 🧭 What Does the YouTube Comments Scraper Do?

**YouTube comments scraper** is a tool that automates the process of collecting comment IDs, comment text, author names, author channel IDs, like counts, reply counts, and published dates from public YouTube videos. This **YouTube comment data extractor** enables sentiment analysis, brand monitoring, and large-scale audience research.

The **Api Dojo YouTube Comments Scraper API** retrieves comprehensive comment data—including reply threads, nested replies, pinned comments, creator hearts, and top-level vs reply comments—from any video or Shorts URL. This tool operates at speeds up to 250+ comments per second without requiring proxies, authentication, or official YouTube API quotas.

This **YouTube comments scraper** serves as a practical alternative to the YouTube Data API v3 (Comments resource) for bulk data collection. No quota limits, no API key management—just straightforward data access through Apify's infrastructure. **Download YouTube comments** for thousands of videos in minutes.

#### What You Get From Every Query

When you **extract YouTube comments**, you receive comprehensive engagement data:

**💬 Comment Content**

- Comment ID and comment text (full body)
- Published date and last updated date
- Like count on comment
- Reply count per comment
- Pinned comment indicator

**👤 Author Information**

- Author name and author channel ID
- Author profile URL and thumbnails
- Creator reply indicator
- Heart by creator status

**🔗 Thread Structure**

- Top-level vs reply comments
- Reply threads and nested replies
- Video ID the comment belongs to
- Comment sorting (Top comments vs Newest first)

#### What Data Can You Extract?

This **YouTube comment data extractor** captures all key comment information:

| Entity                   | What You Extract                 | Use Case                                  |
| ------------------------ | -------------------------------- | ----------------------------------------- |
| 💬 **Comment Text**       | Full comment body, edited status | Sentiment analysis, NLP training          |
| 👤 **Author Data**        | Name, channel ID, profile URL    | Influencer identification, user research  |
| 👍 **Engagement Metrics** | Like count, reply count          | Popularity ranking, engagement analysis   |
| 📅 **Timestamps**         | Published date, last updated     | Trend tracking, temporal analysis         |
| 🔗 **Thread Structure**   | Replies, nested comments, pinned | Conversation mapping, discussion analysis |

### ⚡ Features & Capabilities

Complete, structured access to YouTube's public comment data—including comment IDs, author information, engagement metrics, and reply threads. This **YouTube comments scraper API** is built for audience intelligence at scale.

#### 2 Query Types for Complete Coverage

| Query Type       | What It Extracts             | Example Input                         |
| ---------------- | ---------------------------- | ------------------------------------- |
| 🎬 **Video URL**  | All comments from a video    | `https://www.youtube.com/watch?v=...` |
| 📱 **Shorts URL** | Comments from YouTube Shorts | `https://www.youtube.com/shorts/...`  |

#### Core Features

| Feature                    | Description                            | Benefit                                    |
| -------------------------- | -------------------------------------- | ------------------------------------------ |
| 💰 **Event-Based Pricing**  | Pay only for comments you extract      | Cost control: Only pay for what you scrape |
| 🎁 **~20 Free Comments**    | Free tier with every video query       | Budget-friendly: Substantial free data     |
| ⚡ **250+ Comments/Second** | High-speed extraction                  | Time savings: Extract thousands in minutes |
| 🔑 **No Authentication**    | Works without YouTube login            | Simple: Start scraping immediately         |
| 🚀 **No Proxy Required**    | Infrastructure handled on Apify        | Cost savings: No proxy management          |
| 📊 **Sorting Options**      | Top comments or Newest first           | Precision: Get most relevant comments      |
| 🤖 **MCP Compatible**       | Works with AI agents and LLM workflows | Future-ready: AI-native integration        |
| 📥 **JSON/CSV Export**      | Clean structured output for analysis   | Integration-ready: Direct pipeline import  |

#### Competitor Comparison

| Feature                      | 🏯 Api Dojo          | Streamers Scraper | Deeper Scraper  |
| ---------------------------- | ------------------- | ----------------- | --------------- |
| **Comments/Second (Videos)** | **251**             | 11                | 4               |
| **Comments/Second (Shorts)** | **267**             | 9                 | 11              |
| **Pricing**                  | **$0.0005/comment** | $2/1k results     | $1.8/1k results |
| **Sorting Functionality**    | ✅                   | ❌                 | ❌               |
| **Shorts Support**           | ✅                   | ✅                 | ✅               |
| **No Proxy Required**        | ✅                   | ✅                 | ❌               |

### 💰 Pricing: Transparent Event-Based Costs

Pay only for what you scrape—no subscriptions, no hidden fees. Significantly more affordable than traditional YouTube data APIs for bulk comment extraction.

**Free users**: Limited to **5 runs per month**, each capped at **10 items**.

#### 📊 Event Costs by Query Type

| Event Type       | Price       | Free Comments Included | What Triggers It                        |
| ---------------- | ----------- | ---------------------- | --------------------------------------- |
| **Video Query**  | **$0.001**  | **~20 comments FREE**  | Scraping comments from a video          |
| **Dataset Item** | **$0.0005** | N/A                    | Each comment beyond the first free page |

#### � Cost Examples

| Scenario                      | Charges                | Calculation                     | Total Cost |
| ----------------------------- | ---------------------- | ------------------------------- | ---------- |
| **1 video, 20 comments**      | 1 query                | $0.001 × 1                      | **$0.001** |
| **1 video, 100 comments**     | 1 query + 80 items     | $0.001 + ($0.0005 × 80)         | **$0.041** |
| **1 video, 500 comments**     | 1 query + 480 items    | $0.001 + ($0.0005 × 480)        | **$0.241** |
| **1 video, 1,000 comments**   | 1 query + 980 items    | $0.001 + ($0.0005 × 980)        | **$0.491** |
| **5 videos, 500 comments**    | 5 queries + 400 items  | ($0.001 × 5) + ($0.0005 × 400)  | **$0.205** |
| **10 videos, 1,000 comments** | 10 queries + 800 items | ($0.001 × 10) + ($0.0005 × 800) | **$0.410** |

### 🍚 Input Parameters

Flexible input options for targeting YouTube video comments with simple configuration.

| Field               | Type    | Description                                                                             | Default    |
| ------------------- | ------- | --------------------------------------------------------------------------------------- | ---------- |
| `startUrls`         | array   | YouTube Video or Shorts URLs to scrape comments from                                    | `[]`       |
| `sort`              | string  | Sort comments: `top` (most relevant) or `new` (newest first)                            | `top`      |
| `maxItems`          | number  | Maximum number of comments to retrieve                                                  | `Infinity` |
| `includeReplies`    | boolean | When enabled, fetches reply threads for each top-level comment. Charged as a query event per thread. | `false`    |
| `customMapFunction` | string  | JavaScript function to transform each output item. Ignored with a warning if it is not a usable function | `null`     |
| `outputConnector`   | string  | MCP connector to deliver the results to — pick one (see [Send Results to Notion, Todoist and More (MCP Connectors)](#send-results-to-notion-todoist-and-more-mcp-connectors)). | `null`     |
| `deliverTarget`     | string  | Where the connector writes — paste the URL or ID (Notion example: `https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b`); some services need none. | `null`     |
| `deliverMode`       | string  | `perPost` (one record per item) or `summary` (one roll-up per run).                     | `perPost`  |
| `deliverMaxItems`   | number  | Optional cap on how many records `perPost` delivers (ignored in `summary`).             | `null`     |

#### Supported URL Types

| URL Type         | Format                               | Example                                       |
| ---------------- | ------------------------------------ | --------------------------------------------- |
| 🎬 **Video URL**  | `https://www.youtube.com/watch?v=ID` | `https://www.youtube.com/watch?v=dQw4w9WgXcQ` |
| � **Shorts URL** | `https://www.youtube.com/shorts/ID`  | `https://www.youtube.com/shorts/abc123`       |

***

### 💡 YouTube Comments Scraper Strategy Guide

Choose the right extraction approach based on your data needs and budget. Each strategy optimizes for different use cases when you need to **scrape YouTube comments** or **extract YouTube comments** at scale.

#### Strategy 1: Single Video Deep Dive (Sentiment Analysis)

**Best for:** Product feedback, brand monitoring, opinion mining

```json
{
  "startUrls": ["https://www.youtube.com/watch?v=VIDEO_ID"],
  "sort": "top",
  "maxItems": 500
}
```

| Cost Breakdown          | Calculation            |
| ----------------------- | ---------------------- |
| 1 video query           | $0.001                 |
| 480 additional comments | $0.0005 × 480 = $0.240 |
| **Total**               | **$0.241**             |

**Use case:** Analyze top 500 comments on a product review video for **sentiment analysis** and customer feedback patterns.

***

#### Strategy 2: Multi-Video Comparison (Competitor Research)

**Best for:** Competitive analysis, audience intelligence, market research

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=COMPETITOR_1",
    "https://www.youtube.com/watch?v=COMPETITOR_2",
    "https://www.youtube.com/watch?v=COMPETITOR_3"
  ],
  "sort": "top",
  "maxItems": 300
}
```

| Cost Breakdown                | Calculation            |
| ----------------------------- | ---------------------- |
| 3 video queries               | $0.001 × 3 = $0.003    |
| Up to 240 additional comments | $0.0005 × 240 = $0.120 |
| **Total**                     | **$0.123**             |

**Use case:** Compare audience reactions across competitor videos for **competitive intelligence** and content strategy insights.

***

#### Strategy 3: Newest Comments First (Trend Detection)

**Best for:** Social listening, trend detection, real-time monitoring

```json
{
  "startUrls": ["https://www.youtube.com/watch?v=TRENDING_VIDEO"],
  "sort": "new",
  "maxItems": 200
}
```

| Cost Breakdown          | Calculation            |
| ----------------------- | ---------------------- |
| 1 video query           | $0.001                 |
| 180 additional comments | $0.0005 × 180 = $0.090 |
| **Total**               | **$0.091**             |

**Use case:** Monitor newest comments on trending videos for **real-time sentiment** and emerging discussion topics.

***

#### Strategy 4: Shorts Comments (Short-Form Content Analysis)

**Best for:** TikTok-style content research, viral content analysis

```json
{
  "startUrls": [
    "https://www.youtube.com/shorts/SHORT_1",
    "https://www.youtube.com/shorts/SHORT_2"
  ],
  "sort": "top",
  "maxItems": 100
}
```

| Cost Breakdown         | Calculation           |
| ---------------------- | --------------------- |
| 2 video queries        | $0.001 × 2 = $0.002   |
| 60 additional comments | $0.0005 × 60 = $0.030 |
| **Total**              | **$0.032**            |

**Use case:** Analyze engagement patterns on YouTube Shorts for **short-form content strategy**.

***

#### Strategy Comparison Table

| Strategy       | Best For            | Cost per 500 Comments | Free Comments |
| -------------- | ------------------- | --------------------- | ------------- |
| 🎬 Single Video | Sentiment analysis  | $0.241                | ~20           |
| 📊 Multi-Video  | Competitor research | $0.123                | ~60           |
| 📅 Newest First | Trend detection     | $0.091                | ~20           |
| 📱 Shorts       | Short-form analysis | $0.032                | ~40           |

#### Pro Tips for Cost Optimization

##### ✅ Maximize Free Comments

- **Each video query includes ~20 free comments**—batch multiple videos to stack free quotas
- **Start with top comments**—most valuable insights often come from highly-liked comments
- **Use `maxItems` wisely**—set limits based on actual analysis needs

##### ✅ Control Spending

- **Set `maxItems`**—limit total comments to control costs
- **Sort by relevance**—`top` sorting surfaces most engaging comments first
- **Start small**—test with 100-200 comments before scaling

### 📦 Output Format

Clean, structured JSON output with comprehensive YouTube comment data. Each comment object contains comment text, author information, engagement metrics, and timestamps—everything you need to **extract YouTube comments** at scale.

#### Minimal Example (Core Fields)

```json
{
  "text": "This one hit you in the feels? Check out the full video of this, and other wholesome pranks ❤️\nhttps://youtu.be/Y9Um-8nPnVQ",
  "likeCount": "3.4K",
  "replyCount": "8",
  "publishedTime": "5 months ago",
  "author": {
    "id": "UCa90xqK2odw1KV5wHU9WRhg",
    "name": "@TheOffice",
    "thumbnails": [
      {
        "height": 48,
        "url": "https://yt3.ggpht.com/...",
        "width": 48
      }
    ]
  }
}
```

#### Field Availability Guarantees

Understanding which fields are always present vs. conditionally available helps you build reliable integrations when you **scrape YouTube comments**.

| Field               | Availability | Data Type | Notes                    |
| ------------------- | ------------ | --------- | ------------------------ |
| `text`              | ✅ Always     | string    | Full comment body/text   |
| `likeCount`         | ✅ Always     | string    | Likes on the comment     |
| `replyCount`        | ✅ Always     | string    | Number of replies        |
| `publishedTime`     | ✅ Always     | string    | Relative timestamp       |
| `author.id`         | ✅ Always     | string    | Author channel ID        |
| `author.name`       | ✅ Always     | string    | Author display name      |
| `author.thumbnails` | ✅ Always     | array     | Author profile pictures  |
| `isPinned`          | ⚠️ Sometimes  | boolean   | Pinned comment indicator |
| `isHearted`         | ⚠️ Sometimes  | boolean   | Heart by creator status  |

#### Export Options

- **JSON:** Complete datasets with nested objects—ideal for NLP processing and sentiment analysis
- **CSV:** Direct download from Apify Console—perfect for spreadsheets and databases
- **API:** RESTful endpoints for Python, Node.js, or any HTTP client

### 🧩 Custom Map Function

Transform output using the `customMapFunction` parameter. This JavaScript function receives each comment object and returns your desired format—flatten nested data, extract specific fields, or restructure for your pipeline.

**Important:** Custom map function is for data transformation—**not for filtering**. Filtering items may result in automatic restrictions. Returning an empty object does not remove the item from the dataset—it is saved as `{ "noResults": true }` instead.

#### Example: Simplified Output for Sentiment Analysis

```javascript
(object) => ({
  commentText: object.text,
  authorName: object.author?.name || null,
  authorId: object.author?.id || null,
  likes: object.likeCount,
  replies: object.replyCount,
  timestamp: object.publishedTime
})
```

#### Common Transformations

| Use Case                | What to Add                                     |
| ----------------------- | ----------------------------------------------- |
| **Sentiment Analysis**  | `text`, `likeCount`, `publishedTime`            |
| **Author Research**     | `author.id`, `author.name`, `author.thumbnails` |
| **Engagement Analysis** | `likeCount`, `replyCount`, `isPinned`           |
| **NLP Training Data**   | `text` only, flattened for ML pipelines         |

#### Requirements & Error Handling

The value must be a **single JavaScript function** that takes one item and returns the transformed item. Arrow functions and regular functions both work; `async` and generator functions are not supported.

**Limits:** the function runs in an isolated sandbox. It must be synchronous and finish within about 1 second per item, and only plain JavaScript is available (no network requests, `require` or `console`). Each item is passed in as plain JSON data.

**An unusable function never stops your run.** The actor logs a warning, ignores the function, and saves the original, unmodified items instead—so you still get your data:

| Situation | What happens |
| --------- | ------------ |
| Not valid JavaScript (for example, plain text pasted into the field) | Rejected before the first request; original items are saved |
| Valid JavaScript but not a function (for example, an object) | Rejected before the first request; original items are saved |
| `async` or generator function | Rejected before the first request; original items are saved |
| Returns a Promise (for example, `(object) => Promise.resolve(object)`) | Rejected at that point; the remaining items are saved unmodified |
| Returns something other than an object (for example, a number or `null`) | Rejected at that point; the remaining items are saved unmodified |
| Throws while transforming an item | Rejected at that point; the remaining items are saved unmodified |
| Takes longer than about 1 second on one item (for example, an endless loop) | Rejected at that point; the remaining items are saved unmodified |

If your output does not look transformed, check the run log for a warning that starts with `Your "customMapFunction" input was rejected:`—it explains exactly what was wrong.

If you do not need to transform the output, simply leave this field empty.

### 🔌 Send Results to Notion, Todoist and More (MCP Connectors)

Skip the manual exports — the YouTube Comments Scraper can deliver its results directly into the tools you already work in, through [Apify MCP Connectors](https://apify.com/store/collections/mcp-connectors).

1. Authorize a connector (Notion, Todoist, or any service whose MCP server offers non-destructive write tools) once in [Console → Settings → API & Integrations → MCP connectors](https://console.apify.com/settings/integrations).
2. Pick it from the **Send results to Notion, Todoist, …** dropdown.
3. Fill in where and how to write:
   - **Destination target** — paste the URL or ID (Notion example: `https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b`); share it with your connector first via Notion's **•••  → Connections** menu. For structured columns use a **page** URL (the Actor builds the database for you) or a database that **already has columns** — an empty database only receives titles. (Some services need no target.)
   - **Write mode** — `perPost` writes one record per comment; `summary` writes a single roll-up for the run.
   - **Max records to deliver** *(optional)* — cap on how many records `perPost` delivers.

**Notion, structured like a spreadsheet:** for a table of typed columns, point the target at a Notion **page** — the Actor auto-creates a database from the data, one matching, correctly-typed column per field (URL, number, date, text). Pointing at an **existing database** fills the columns it already has (matched by name); an **empty database** receives only the title, and the rest of each record goes to the row body — the connector can't add columns to an existing database without destructive access it never requests. Nested fields are flattened into columns too — an `author` object becomes `author.id` and `author.name` — so everything is sortable and filterable in the grid. Fields that don't fit a column go to the row's page body, so nothing is lost.

Your credentials stay yours: the Actor talks to your services exclusively through your own authorized connector and only ever uses non-destructive write tools — it cannot delete or overwrite anything you already have. Delivery is best-effort and runs after the scrape: if a connector is misconfigured or a delivery fails, your run still finishes normally with all results intact — the failure is reported in the run log, never by failing the run. If the run is about to hit its timeout, delivery stops early so the run still succeeds, and the log tells you how many records were delivered.

### 🌴 Related Scrapers & Data Extraction Tools

Expand your **YouTube data extraction** capabilities with our complete suite of specialized scraper APIs. Each **YouTube comment data extractor** focuses on specific data types for comprehensive video intelligence.

#### 📦 Complete Apidojo YouTube Scraper Ecosystem

| Tool                                                                                                     | What It Extracts                                  | Best For                               |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -------------------------------------- |
| 💬 **YouTube Comments Scraper**                                                                           | Comment text, authors, likes, replies, timestamps | Sentiment analysis **(You are here)**  |
| 📺 **[YouTube Scraper](https://apify.com/apidojo/youtube-scraper?fpr=yhdrb)**                             | Videos, shorts, playlists, view counts            | Content analysis, trend tracking       |
| 🏯 **[YouTube Channel Scraper](https://apify.com/apidojo/youtube-channel-information-scraper?fpr=yhdrb)** | Channel profiles, subscribers, metadata           | Creator discovery, influencer research |

***

#### 🎯 Choose the Right Extractor for Your Use Case

##### 💬 Need Comment & Engagement Data?

→ **YouTube Comments Scraper (You are here)**\
Extract comment text, author names, like counts, reply threads, and timestamps for sentiment analysis

##### 📺 Need Video & Content Data?

→ **[YouTube Scraper](https://apify.com/apidojo/youtube-scraper?fpr=yhdrb)**\
Extract videos, shorts, playlists, view counts, and engagement metrics

##### 🏯 Need Channel & Creator Data?

→ **[YouTube Channel Scraper](https://apify.com/apidojo/youtube-channel-information-scraper?fpr=yhdrb)**\
Extract channel IDs, subscriber counts, descriptions, handles, and profile metadata

#### 🌐 Cross-Platform Social Media Scrapers

| Platform    | Tool                                                                                 | What It Extracts                     |
| ----------- | ------------------------------------------------------------------------------------ | ------------------------------------ |
| 📸 Instagram | **[Instagram Scraper](https://apify.com/apidojo/instagram-scraper?fpr=yhdrb)**       | Posts, reels, profiles, hashtags     |
| 🎵 TikTok    | **[TikTok Scraper](https://apify.com/apidojo/tiktok-scraper?fpr=yhdrb)**             | Videos, profiles, engagement metrics |
| 🐦 Twitter   | **[Twitter Scraper Lite](https://apify.com/apidojo/twitter-scraper-lite?fpr=yhdrb)** | Tweets, profiles, followers          |

### 🆓 Demo Mode & Free Testing

If you run on Apify's Free plan, you can still use this **YouTube comments scraper** in Demo Mode. **Free users can run the actor up to 5 times per month**, with each run capped at a maximum of 10 items — just enough to test it out. For unrestricted usage and to unlock the full power of this **YouTube comments scraper API** at scale, subscribe to a paid Apify plan at [apify.com/pricing](https://apify.com/pricing?fpr=yhdrb).

**Free Plan Benefits:**

- ✅ Test with up to 5 runs per month, each capped at 10 comment extractions
- ✅ Each video query includes ~20 FREE comments
- ✅ Perfect for testing workflows before scaling
- ✅ Validate output format and data quality risk-free

**Upgrade for Full Access:**

- 🚀 Unlimited comment extraction from YouTube
- 🚀 250+ comments per second processing speed
- 🚀 API access for automated workflows and integrations
- 🚀 Enterprise-scale data extraction capabilities

For unrestricted usage, [subscribe to a paid Apify plan](https://apify.com/pricing?fpr=yhdrb).

### 🔧 Troubleshooting Common Issues

Having trouble with your extraction? Here are solutions to common issues when you **scrape YouTube comments**, manage costs, and optimize performance with this **YouTube comment data extractor**.

***

#### ❓ Getting Fewer Comments Than Expected?

**Problem:** Extraction returns fewer comments than anticipated

**Solutions:**

✅ **Check `maxItems` setting**—increase the limit if you need more comments\
✅ **Verify video has comments**—some videos have comments disabled\
✅ **Check sorting option**—`top` vs `new` may surface different comment counts\
✅ **Remember free tiers**—Free users are limited to **5 runs per month**, each capped at **10 items**

***

#### 💰 Unexpected Costs?

**Problem:** Your run cost more than anticipated

**Key pricing differences to remember:**

| Scenario                    | Cost Calculation      | What You Pay      |
| --------------------------- | --------------------- | ----------------- |
| 1 video, 20 comments        | 1 video query         | $0.001 (all free) |
| 1 video, 100 comments       | 1 query + 80 items    | $0.041            |
| 5 videos, 100 comments each | 5 queries + 400 items | $0.205            |

**Cost control tips:**

✅ **Each video creates a separate query**—10 videos = 10 separate charges\
✅ **Use `maxItems` to cap spending**—set hard limits on total extraction\
✅ **Video queries are cost-effective**—~20 free comments per video

***

#### ❓ No Results Returned?

**Problem:** Extraction completes but returns empty dataset

**Solutions:**

✅ **Verify URL format**—must be valid YouTube video or Shorts URLs\
✅ **Check video availability**—video may be private or deleted\
✅ **Don't use `customMapFunction` for filtering**—this can cause automatic blocks\
✅ **Confirm comments are enabled**—some videos have comments disabled

***

#### ❓ Missing Data Fields?

**Problem:** Some expected fields are missing from output

**Solutions:**

✅ **Open Storage tab**—full datasets available in Apify Console\
✅ **Check comment type**—some fields only appear on certain comments\
✅ **Verify field availability**—`isPinned` and `isHearted` are conditional

### 🎯 Use Cases & Industries

This **YouTube comments scraper** serves professionals who need fast, structured audience insights—from sentiment analysis to brand monitoring and competitive intelligence. Use it to **download YouTube comments** for any business intelligence need.

***

#### 📊 Sentiment Analysis & Opinion Mining

Analyze audience sentiment and extract customer opinions at scale.

- Extract thousands of comments for NLP processing
- Build **sentiment analysis** pipelines with structured data
- Identify positive, negative, and neutral sentiment patterns
- Train machine learning models on real audience feedback

**Example:** Scrape 1,000 comments from product review videos for **voice of customer (VoC)** analysis.

***

#### 🏢 Brand Monitoring & Reputation Management

Track brand mentions and monitor public perception across YouTube.

- Monitor comments on brand-related videos
- Track **reputation management** metrics over time
- Identify emerging PR issues before they escalate
- Analyze competitor brand sentiment

**Example:** Monitor comments on 50 videos mentioning your brand for **social listening** insights.

***

#### 📈 Market Research & Consumer Behavior

Understand audience preferences and market trends through comment analysis.

- Research **consumer behavior** patterns in specific niches
- Identify audience pain points and feature requests
- Analyze competitor audience engagement
- Discover content ideas from audience discussions

**Example:** Extract comments from top 10 competitor videos for **audience intelligence** research.

***

#### 🤖 NLP Training Data & Machine Learning

Build datasets for natural language processing and AI applications.

- Collect **NLP training data** for sentiment classifiers
- Build **machine learning datasets** with real-world text
- Create toxic comment detection training sets
- Generate conversation datasets for chatbot training

**Example:** Scrape 10,000 comments across 100 videos for **toxic comment detection** model training.

***

#### 🎬 Influencer Vetting & Engagement Quality

Evaluate influencer authenticity and audience engagement quality.

- Analyze comment quality and authenticity
- Check for bot activity and fake engagement
- Evaluate **engagement quality** before partnerships
- Research audience demographics through comment analysis

**Example:** Scrape comments from 5 influencer videos to verify **engagement quality** before sponsorship.

### 💡 Quick Start Guide

Simple setup—whether extracting comments from a single video or building a database of thousands. This **YouTube comments scraper API** makes it easy to **extract YouTube comments** in minutes.

#### Copy-Paste Examples by Persona

**For Analysts (Video → CSV):**

```json
{
  "startUrls": ["https://www.youtube.com/watch?v=VIDEO_ID"],
  "sort": "top",
  "maxItems": 500
}
```

→ Run, then export to CSV from Storage tab.

**For Developers (API → JSON):**

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("apidojo/youtube-comments-scraper").call(run_input={
    "startUrls": ["https://www.youtube.com/watch?v=VIDEO_ID"],
    "maxItems": 100
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

**For AI Agents (MCP pattern):**

```python
## Fetch YouTube comment data, then pass to LLM for sentiment analysis
comment_data = client.dataset(run["defaultDatasetId"]).list_items().items
context = json.dumps(comment_data[:50])  # First 50 comments as context
## Pass context to your AI agent for sentiment analysis
```

#### 3 Steps to Get Started

1. **Add video URLs:** Paste YouTube video or Shorts URLs
2. **Configure:** Set sorting preference and `maxItems`
3. **Run & Export:** Click Start, then download JSON/CSV from Storage tab

***

#### 📋 Method 1: Scrape by Video URL

**Best for:** Single video deep dive, sentiment analysis

```json
{
  "startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
  "sort": "top",
  "maxItems": 500
}
```

***

#### 📋 Method 2: Scrape Multiple Videos

**Best for:** Competitor research, multi-video analysis

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=VIDEO_1",
    "https://www.youtube.com/watch?v=VIDEO_2",
    "https://www.youtube.com/watch?v=VIDEO_3"
  ],
  "sort": "top",
  "maxItems": 300
}
```

***

#### 🔧 Best Practices for YouTube Comment Scraping

##### ✅ DO:

- **Start with test runs**—use 100-200 comments to validate output format
- **Use top sorting**—most valuable insights come from highly-liked comments
- **Batch multiple videos**—stack free quotas across multiple queries
- **Set `maxItems`**—control costs by limiting total extraction

##### ❌ DON'T:

- **Use customMapFunction for filtering**—this causes automatic blocking
- **Scrape videos with few comments**—minimum 10 comments per video
- **Ignore sorting options**—`top` vs `new` surfaces different insights

### ❓ Frequently Asked Questions

#### What is a YouTube Comments Scraper API?

A **YouTube comments scraper API** is a tool that programmatically extracts comment data—comment text, author names, like counts, reply threads, and timestamps. This **YouTube comment data extractor** serves as an alternative to the YouTube Data API v3 without quota limits or API key requirements.

#### How much does it cost to scrape 1,000 YouTube comments?

**$0.49 total** ($0.001 video query + $0.0005 × 980 comments)—significantly cheaper than most alternatives. Each video query includes ~20 free comments.

#### Can I scrape YouTube comments without login?

Yes! This **YouTube comments scraper** requires **no authentication** or login. Start extracting comment data immediately without any YouTube account or API key.

#### What YouTube comment data can I extract?

Extract **comment text**, **author names**, **author channel IDs**, **like counts**, **reply counts**, **published dates**, **pinned comment status**, **creator hearts**, and **author thumbnails**—all in structured JSON or CSV format.

#### Can I export scraped YouTube comments to CSV?

Yes. **Download YouTube comments** directly from Apify Console in JSON, CSV, or Excel format. Perfect for spreadsheet analysis and NLP processing.

#### Can I use Python to scrape YouTube comments?

Yes! Full Python support via the Apify Client library. See the [copy-paste examples](#copy-paste-examples-by-persona) above for **YouTube comments scraper Python** integration.

#### Is this faster than the YouTube Data API?

Yes. 250+ comments/second without quota limits. The official YouTube Data API v3 has strict rate limits and requires complex OAuth setup.

#### Can I scrape comments from YouTube Shorts?

Yes. This tool supports both regular video URLs and Shorts URLs—extract comments from any public YouTube content.

#### Can I bulk scrape comments from multiple videos?

Yes. Add multiple URLs to `startUrls` for **bulk YouTube comment extraction**. Each video is processed efficiently with ~20 free comments per query.

#### Can I sort comments by newest first?

Yes. Use `sort: "new"` to get newest comments first, or `sort: "top"` for most relevant/liked comments.

#### Can I scrape reply threads and nested comments?

Yes. This **YouTube comments scraper** extracts reply threads, nested replies, and top-level vs reply comment indicators.

#### Can I use this for sentiment analysis?

Yes. Perfect for **sentiment analysis**, **opinion mining**, and **NLP training data**. Export structured comment text for machine learning pipelines.

#### Can I scrape pinned comments?

Yes. Pinned comments are included in the output with an `isPinned` indicator when available.

#### Can I detect creator replies and hearts?

Yes. Creator replies and heart indicators are included in the output when available.

#### Is this a real-time YouTube scraping API?

Yes. Extract current YouTube comment data in real-time with 250+ comments/second processing speed. Data reflects the latest publicly available information.

### 📞 Contact

If you need any sort of support, please send an email to **apidojo10@gmail.com**. You name it, we get it.

***

**Ready to start extracting YouTube comment data?** With transparent event-based pricing, lightning-fast performance (250+ comments/sec), and support for videos and Shorts, this **YouTube Comments Scraper API** is the perfect **YouTube comment data extractor** for sentiment analysis, brand monitoring, and audience research. Start scraping today! 🏯

# Actor input Schema

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

Paste the Youtube URLs, and get the results immediately. Video and Shorts URLs are supported.

## `sort` (type: `string`):

Sorts comments by the given option.

## `maxItems` (type: `integer`):

Maximum number of items that you want as output.

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

When enabled, fetches reply threads for each top-level comment. Each reply thread is charged as a separate query event.

## `customMapFunction` (type: `string`):

JavaScript function to transform each output comment. Use to add computed fields, modify values, or remove unnecessary data. NOT intended for filtering - filtering may result in automatic bans. Must be a single synchronous function, e.g. (object) => { return {...object} }. It runs in a sandbox with plain JavaScript only (no network or require) and about 1 second per item. Leave empty if you do not need to transform the output - an unusable function is ignored and the original items are saved instead.

## `outputConnector` (type: `string`):

Pick an MCP connector you authorized in Console → Settings → API & Integrations → MCP connectors (e.g. Notion, Todoist — any service whose MCP server offers non-destructive write tools works best-effort). The scraped results are written through your own connector — the Actor never sees your third-party credentials. Only non-destructive write tools are used; it can never delete or overwrite your existing data.

## `deliverTarget` (type: `string`):

Where to write into the connector — paste the URL or ID. Notion example: https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b. Leave empty for services that need no target (e.g. Todoist Inbox, Slack). For Notion, share the page or database with your connector first (Notion's ••• → Connections menu), and point at a PAGE for structured columns (the Actor builds the database for you) — an empty database receives only the title (the rest of each record goes to the row's body).

## `deliverMode` (type: `string`):

perPost writes one record per scraped item; summary writes a single roll-up for the run.

## `deliverMaxItems` (type: `integer`):

Cap on how many records perPost mode writes to the connector; ignored in summary mode. Leave empty to deliver everything scraped.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=xuCn8ux2gbs",
    "https://www.youtube.com/shorts/vVTa1_hm4n4"
  ],
  "sort": "top",
  "maxItems": 1000,
  "includeReplies": false,
  "customMapFunction": "(object) => { return {...object} }",
  "deliverMode": "perPost"
}
```

# Actor output Schema

## `overview` (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": [
        "https://www.youtube.com/watch?v=xuCn8ux2gbs",
        "https://www.youtube.com/shorts/vVTa1_hm4n4"
    ],
    "sort": "top",
    "maxItems": 1000,
    "customMapFunction": (object) => { return {...object} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apidojo/youtube-comments-scraper").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": [
        "https://www.youtube.com/watch?v=xuCn8ux2gbs",
        "https://www.youtube.com/shorts/vVTa1_hm4n4",
    ],
    "sort": "top",
    "maxItems": 1000,
    "customMapFunction": "(object) => { return {...object} }",
}

# Run the Actor and wait for it to finish
run = client.actor("apidojo/youtube-comments-scraper").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": [
    "https://www.youtube.com/watch?v=xuCn8ux2gbs",
    "https://www.youtube.com/shorts/vVTa1_hm4n4"
  ],
  "sort": "top",
  "maxItems": 1000,
  "customMapFunction": "(object) => { return {...object} }"
}' |
apify call apidojo/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

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

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/mExYO4A2k9976zMfA/builds/rHnPAuQ0ni928lrz9/openapi.json
