# YouTube Comments Scraper: Replies, Likes & Hearts (`wulfcare/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies from any video or Short, or from a channel, playlist or search. Text, author, likes, reply count, creator heart, pinned, date and exact comment total. No API key or quota. Same input and output as the popular YouTube Comments Scraper. $0.25 per 1,000 comments.

- **URL**: https://apify.com/wulfcare/youtube-comments-scraper.md
- **Developed by:** [Wulfcare Data](https://apify.com/wulfcare) (community)
- **Categories:** Videos, Social media, Marketing
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 comments

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

### What does YouTube Comments Scraper do?

**YouTube Comments Scraper** extracts the comments and replies of YouTube videos and Shorts: the comment text, author, likes, reply count, creator heart, pinned and edited flags, date, the author's channel, and the video's exact total comment count.

- Works with **video URLs, Shorts, video IDs, channels, playlists, search URLs and plain search terms**
- **Replies** on request, each placed right after its comment
- **Top comments** or **Newest first**, with an optional **date cut-off**
- **No YouTube API key, no quota, no login**
- **$0.25 per 1,000 comments**, nothing charged for errors or failed videos
- **Fast**: about 1,000 comments in 20 seconds per video, several videos in parallel
- **Drop-in**: the same input and output field names as the most used YouTube comments scraper on Apify, so existing runs, scripts and integrations keep working

### What can I use YouTube comments for?

- **Sentiment analysis** and opinion mining on videos about your brand, product or topic
- **Brand and competitor monitoring**: what viewers say under reviews, ads and launches
- **Audience research** for creators: questions, requests and the comments that got hearted or pinned
- **AI and LLM datasets**: real conversations for RAG, classification and fine-tuning
- **Moderation and research**: find spam, abuse or recurring topics across many videos

### How to scrape YouTube comments

1. Open the **Input** tab and paste one or more YouTube video URLs.
2. Set **Maximum comments per video** (0 = all) and the sort order.
3. Turn on **Include replies** if you want replies too.
4. Click **Start**, then download the data as JSON, CSV, Excel or HTML, or get it by API.

### Input examples

Comments of one video (fast, good first test):

```json
{
  "startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
  "maxComments": 100
}
```

Top comments with their replies (up to 5 replies each), from a video and a Short:

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/vVTa1_hm4n4"
  ],
  "sortCommentsBy": "TOP_COMMENTS",
  "includeReplies": true,
  "maxRepliesPerComment": 5,
  "maxComments": 500
}
```

The last week's comments on a channel's 5 newest videos:

```json
{
  "startUrls": ["https://www.youtube.com/@mkbhd"],
  "maxVideos": 5,
  "maxComments": 0,
  "sortCommentsBy": "NEWEST_FIRST",
  "oldestCommentDate": "7 days"
}
```

What people say about a product, from the top 10 search results:

```json
{
  "searchQueries": ["iphone 17 review"],
  "maxVideos": 10,
  "maxComments": 200
}
```

Also accepted, for compatibility with other comment scrapers: `sort` (`top` / `latest`), `maxItems` (cap for the whole run), `videoUrls`, `videoIds`, and start URLs as plain strings or `{ "url": ... }` objects.

### Output example

Each comment or reply is one row:

```json
{
  "comment": "My algebra teacher said that this was a link to the test answers",
  "cid": "UgwPwTibxdgqCHZxktd4AaABAg",
  "author": "@bdr8823",
  "videoId": "dQw4w9WgXcQ",
  "pageUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentsCount": 2461284,
  "replyCount": 664,
  "voteCount": 70000,
  "authorIsChannelOwner": false,
  "hasCreatorHeart": false,
  "type": "comment",
  "replyToCid": null,
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "publishedTimeText": "7 years ago",
  "publishedAt": "2019-11-05T20:45:44Z",
  "isEdited": false,
  "isPinned": false,
  "replyLevel": 0,
  "authorChannelId": "UCdi6tGxvFvTRGe-7dAn7m7w",
  "authorChannelUrl": "https://www.youtube.com/@bdr8823",
  "authorAvatarUrl": "https://yt3.ggpht.com/...",
  "authorIsVerified": false,
  "authorIsArtist": false,
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelUrl": "https://www.youtube.com/@RickAstleyYT",
  "input": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "order": 1,
  "error": null
}
```

A reply has `"type": "reply"`, `"replyLevel": 1` and `replyToCid` set to its comment's `cid`.

If a video can't be read (unavailable, private, comments turned off), you get one row with `error` explaining why. Error rows are **free**.

### How much does it cost to scrape YouTube comments?

**$0.25 per 1,000 comments or replies** ($0.00025 each). No start fee, no monthly rent, and Apify platform usage is included. Error rows are never charged. You can cap any run's spend with **Maximum cost per run** in the run options; the run stops cleanly when it reaches it.

Examples: 10,000 comments = $2.50. All 100 newest comments of 50 videos = $1.25.

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

- **API**: start a run with `POST https://api.apify.com/v2/acts/wulfcare~youtube-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN` and the input JSON as the body; the comments come back in the response.
- **Python / JavaScript**: use the `apify-client` package, call `wulfcare/youtube-comments-scraper`, then read the run's dataset.
- **AI agents (MCP)**: add the Apify MCP server (`https://mcp.apify.com`) to Claude, ChatGPT, Cursor or any MCP client and ask, e.g., *"get the top 200 comments of this YouTube video and summarize the main complaints"*. The default input finishes in a few seconds.
- **No-code**: Make, Zapier, n8n, Google Sheets, Slack and webhooks via Apify integrations.

### FAQ

**Do I need a YouTube API key or a Google account?**
No. It reads the same public comments anyone sees on YouTube, logged out. There is no YouTube Data API quota.

**How many comments can I get?**
All of them: set Maximum comments per video to 0. YouTube itself shows comments in pages of 20, so very large videos (100k+ comments) take a while; split them over several runs or use a date cut-off if you only need recent ones.

**Are the dates exact?**
YouTube shows comment dates only as "3 days ago" / "2 years ago". `publishedTimeText` is that text, and `publishedAt` is the matching approximate date-time (exact to the day for recent comments, to the year for old ones).

**Are like counts exact?**
YouTube rounds large like counts (70K, 1.1M) and the scraper turns them into numbers (70000, 1100000). Counts under 1,000 are exact. The video's total comment count (`commentsCount`) is exact.

**Does it work for Shorts and live streams?**
Yes. Shorts work the same way as videos, and live streams (live now or finished) too, as long as the creator kept comments on. Many channels turn comments off on streams; you then get one free error row saying so. Live chat messages are not comments and are not included.

**Can I get comments from every video of a channel?**
Yes: put the channel URL in YouTube URLs and set Maximum videos per channel (newest videos first). Add `/shorts` to the channel URL for its Shorts.

**Is scraping YouTube comments legal?**
It collects publicly visible data. Comments can contain personal data (names, handles), so make sure your use follows GDPR and similar laws in your country, and YouTube's terms. If in doubt, consult a lawyer.

### Related YouTube scrapers

- [YouTube Scraper](https://apify.com/wulfcare/youtube-scraper): videos, Shorts, channels and search results with views, likes, exact publish time and channel stats
- [YouTube Transcript & Subtitle Scraper](https://apify.com/wulfcare/youtube-transcript-scraper): full transcripts of videos, channels and playlists, for AI and research

Found a bug or need a field? Open an issue on the **Issues** tab; replies usually within a day.

# Actor input Schema

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

Videos or Shorts (one per line; {"url": ...} objects work too) to get comments from (watch, youtu.be, /shorts/ URLs or 11-character video IDs). Channel URLs (@handle, /channel/UC...; add /shorts for Shorts), playlist URLs and search result URLs also work: their newest/first "Maximum videos" videos are used.

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

Comments (and replies, when on) to get from each video. 0 = all of them. ~1,000 comments take about 20 seconds.

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

YouTube's own Top / Newest order.

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

Also get the replies to each comment, right after it (type "reply", replyToCid = the comment). Replies count toward "Maximum comments".

## `maxRepliesPerComment` (type: `integer`):

0 = all replies of each comment.

## `oldestCommentDate` (type: `string`):

A date (2026-01-31) or an age ("7 days", "3 months"). With "Newest first" the run stops reading a video once comments get older. YouTube only says "x days ago", so the cut is approximate.

## `searchQueries` (type: `array`):

Get comments from the top "Maximum videos" YouTube search results of each term (e.g. a product or brand name).

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

How many videos each channel (newest first), playlist or search term contributes.

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

Optional cap for the whole run (all videos together). Empty = no cap.

## `maxConcurrency` (type: `integer`):

How many videos are read in parallel.

## `proxyConfiguration` (type: `object`):

Apify Proxy (datacenter) is on by default and works well.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 100,
  "sortCommentsBy": "NEWEST_FIRST",
  "includeReplies": false,
  "maxRepliesPerComment": 0,
  "maxVideos": 10,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `all` (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=dQw4w9WgXcQ"
    ],
    "maxComments": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("wulfcare/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=dQw4w9WgXcQ"],
    "maxComments": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("wulfcare/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=dQw4w9WgXcQ"
  ],
  "maxComments": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call wulfcare/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

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