# YouTube Comments Scraper – Comments, Replies & Likes (`smoldesk/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies without an API key or quota: from video URLs, a channel's latest videos, playlists or keyword searches. Text, author, likes, reply count, pinned/hearted, date. Pay only for comments.

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

## Pricing

from $0.60 / 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

## YouTube Comments Scraper – Comments, Replies & Likes

![YouTube Comments Scraper: comments and replies from videos, channels, playlists or keyword search](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/youtube-comments/banner.webp)

Scrape **YouTube comments and replies** without an API key or quota. Give it **video or Shorts URLs**, a **channel** (comments from its latest videos), a **playlist**, or a **search term** (comments from the top videos for a keyword). Every comment comes with the **full text**, **author name and channel**, **like count**, **reply count**, **pinned / hearted / by-the-creator flags** and a **date**.

You pay **only for comments**. Opening the videos to reach them is free, and the run stops cleanly at your maximum cost.

### What you can use it for

- **Sentiment and product feedback**: pull the top or newest comments on product reviews, then score them with an LLM.
- **Brand monitoring**: search your brand name and collect what viewers say under the top videos, or schedule a run on a competitor's channel for comments on its new uploads.
- **Audience research**: find the questions viewers keep asking, which creators reply, and which comments the creator pins or hearts.
- **Lead and community discovery**: every comment links to its author's channel.
- **Datasets for AI**: clean plain-text comments, one record each, ready for RAG, classification or fine-tuning.

Ready-made examples you can run in one click: [YouTube comments about a product or brand](https://apify.com/smoldesk/youtube-comments-scraper/examples/youtube-brand-comments) · [Comments on a channel's new YouTube videos](https://apify.com/smoldesk/youtube-comments-scraper/examples/youtube-channel-new-video-comments).

### How to use it

**1. Add videos, channels or keywords.** Paste video URLs or @handles, or type a keyword to read the top videos for it. Pick how many comments per video and whether you want replies.

![Step 1: add video URLs, channels or search terms and the comment options](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/youtube-comments/how-to-1.webp)

**2. Click Start.** Opening the videos is free; you only pay for the comments saved.

![Step 2: click Start and watch the run log](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/youtube-comments/how-to-2.webp)

**3. Get clean data.** Every comment comes with text, author, likes, reply count and the video it belongs to. Export it as JSON, CSV or Excel, or read it through the API.

![Step 3: get clean comment data and export it as JSON, CSV, Excel or via API](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/youtube-comments/how-to-3.webp)

### How to scrape YouTube comments

1. Create a free Apify account and open this Actor.
2. Add **Video, channel or playlist URLs**, one per line: `https://www.youtube.com/watch?v=…`, Shorts URLs, video IDs, `@mkbhd`, `/channel/UC…` or playlist URLs. Over the API, `["@mkbhd"]` and `[{"url": "https://…"}]` both work.
3. Optional: add **Search terms** to get comments from the top videos for a keyword.
4. Set **Max comments per video**, **Comment order** (top or newest first) and **Max replies per comment**.
5. For channels, playlists and searches, set **Videos per channel / playlist / search** (how many of the latest or top videos to read) and, if you like, **Only videos published after** (`7 days`, `2025-01-31`).
6. Click **Start**, then download the comments as JSON, CSV or Excel, or read them through the Apify API.
7. Use **Schedule** to run it daily: a channel URL with **Only videos published after = 1 day** gives you the comments on each new upload.

**Tips**

- Replies are saved right after their parent comment, with `isReply: true` and `parentId`.
- `sourceInput` tells you which URL or search term each comment came from, so one run can cover many brands or channels.
- Videos with comments turned off are skipped and cost nothing.

### Output

```json
{
  "type": "comment",
  "id": "UgzKYksqeQ5gA3t0g0F4AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "videoChannelName": "Rick Astley",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzKYksqeQ5gA3t0g0F4AaABAg",
  "text": "I Rick rolled my entire French class because…",
  "authorName": "@grustache4569",
  "authorChannelId": "UCKrzgYonJnMd0Dk7zQXjYXw",
  "authorChannelUrl": "https://www.youtube.com/@grustache4569",
  "authorAvatarUrl": "https://yt3.ggpht.com/…",
  "authorIsVerified": false,
  "authorIsChannelOwner": false,
  "likeCount": 106000,
  "replyCount": 665,
  "publishedTimeText": "6 years ago",
  "publishedAtApprox": "2020-11-04T03:16:17Z",
  "isEdited": true,
  "isPinned": false,
  "isHearted": false,
  "isReply": false,
  "parentId": null,
  "sourceInput": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "scrapedAt": "2026-11-06T07:05:01Z"
}
```

| Field | Notes |
|---|---|
| `likeCount`, `replyCount` | Rounded the way YouTube shows them ("106K" → 106000) |
| `publishedAtApprox` | YouTube only shows "6 years ago", so this is an estimate (exact to the hour for recent comments). `publishedTimeText` is the original text |
| `authorIsChannelOwner` | The comment was written by the video's creator |
| `isPinned`, `isHearted` | Pinned by the creator / hearted by the creator |
| `isReply`, `parentId` | Replies point to their parent comment |
| `sourceInput` | The URL or search term you gave that led to this comment |

### Input example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "@mkbhd"
  ],
  "searchQueries": ["iphone 17 review"],
  "maxComments": 200,
  "commentsSortBy": "newest",
  "maxRepliesPerComment": 5,
  "maxResults": 3,
  "publishedAfter": "30 days"
}
```

### Pricing

Pay per comment. No monthly fee, and Apify's free plan credit covers your first runs. The price drops on bigger Apify plans:

| Your Apify plan | Per comment or reply | Per 1,000 |
|---|---|---|
| Free | $0.0012 | **$1.20** |
| Starter | $0.001 | **$1.00** |
| Scale | $0.0008 | $0.80 |
| Business | $0.0006 | $0.60 |
| Run start | $0.00005 | – |

Example on the Starter plan: 200 comments from each of 10 videos cost **$2.00**. Opening videos, channels and search pages is free, and videos with comments turned off cost nothing.

### Use with AI agents (Claude, ChatGPT, Cursor, MCP)

Add the Actor as a tool through the Apify MCP server: `https://mcp.apify.com?actors=smoldesk/youtube-comments-scraper`. Then paste this into your agent's system prompt or tool notes:

```text
Tool: smoldesk/youtube-comments-scraper (YouTube Comments Scraper, Apify)
Use it when: the user wants the comments or replies on YouTube videos or Shorts, comments on a channel's latest videos, or what viewers say about a keyword or brand. No API key or login needed.
Don't use it when: the user wants video stats or channel profiles (use smoldesk/youtube-scraper or smoldesk/youtube-channel-scraper), transcripts, or live chat.
How to call: run the Actor with JSON input and read the dataset items. Each comment costs money, so keep maxComments small unless the user asks for more.
Example input: {"startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"], "maxComments": 100, "commentsSortBy": "top"}
```

Questions an agent can answer with it:

- What do viewers complain about under the top reviews of this product?
- Summarize the newest comments on this channel's last three videos.
- Which questions come up most often under this video?

### Use with AI (LangChain / LlamaIndex / CrewAI)

With LangChain (`pip install langchain-apify`):

```python
from langchain_apify import ApifyWrapper
from langchain_core.documents import Document

apify = ApifyWrapper()  # reads APIFY_API_TOKEN
loader = apify.call_actor(
    actor_id="smoldesk/youtube-comments-scraper",
    run_input={"searchQueries": ["standing desk review"], "maxResults": 5, "maxComments": 100},
    dataset_mapping_function=lambda c: Document(
        page_content=c["text"],
        metadata={k: c.get(k) for k in ("url", "videoTitle", "authorName", "likeCount", "isReply")},
    ),
)
docs = loader.load()
```

**LlamaIndex**: `ApifyActor` from `llama-index-readers-apify`. **CrewAI**: use the Apify MCP server above.

### Limitations

- **Comment dates are approximate**: YouTube only shows "3 weeks ago" on public pages.
- **Like and reply counts are rounded** the way YouTube displays them.
- **No live chat** and no comments on videos where the creator turned comments off.
- Age-restricted and members-only videos show what a logged-out visitor sees.

### FAQ

**Do I need a YouTube API key?** No. There is no daily quota and no Google Cloud project.

**How many comments can I get per video?** As many as YouTube shows a logged-out visitor, which for most videos is all of them. Set **Max comments per video** to what you need.

**Do I pay for the videos it opens?** No. Only saved comments and replies are charged.

**Do I need a login, cookies or proxies?** No. Residential proxies are never needed or used.

**Is it legal to scrape YouTube comments?** It reads public data that any logged-out visitor can see. Comments are personal data under GDPR and similar laws, so check your local rules for your use case. This Actor is not affiliated with YouTube or Google.

### Feedback

Found a bug or missing a field? Open an issue in the **Issues** tab. If the Actor saved you time, a short review on this page helps other people find it.

### More Actors from Smoldesk Studios

- [Contact Details Scraper](https://apify.com/smoldesk/contact-details-scraper): emails, phone numbers, social profiles and contact forms from any list of websites, with email domains checked and junk removed, charged only when contacts are found
- [Google Maps Scraper](https://apify.com/smoldesk/google-maps-scraper): places with phones, websites, ratings and hours from any search, plus emails and social profiles from each business website, lead filters and new-place monitoring
- [YouTube Scraper](https://apify.com/smoldesk/youtube-scraper): videos, Shorts, channels, playlists and comments from search or URLs, with exact views and likes, chapters and description links
- [YouTube Channel Scraper](https://apify.com/smoldesk/youtube-channel-scraper): subscribers, exact total views, join date, country and social links of any channel, plus its latest videos
- [Bilibili Scraper](https://apify.com/smoldesk/bilibili-scraper): videos, stats, danmaku, comments and creators from China's video site, no login
- [Weibo Scraper](https://apify.com/smoldesk/weibo-scraper): keyword and hashtag search, posts, comments, profiles and the hot-search board from China's biggest microblog, no login
- [Toutiao Scraper](https://apify.com/smoldesk/toutiao-scraper): Toutiao (今日头条) news search with date ranges, reads and likes, comments and the hot board (热榜), no login
- [WeChat Articles Scraper](https://apify.com/smoldesk/wechat-articles-scraper): WeChat Official Account (公众号) articles from keyword search, full text as Markdown, images, account IDs and publish dates, no login
- [Google Trends Scraper](https://apify.com/smoldesk/google-trends-scraper): interest over time, by region and city, related queries and Trending now — no API key
- [Google Ads Transparency Scraper](https://apify.com/smoldesk/google-ads-transparency-scraper): every ad a competitor runs on Google Search, YouTube and Shopping — creatives, landing pages, countries, EU impressions and new-ad alerts
- [Telegram Channel Scraper](https://apify.com/smoldesk/telegram-channel-scraper): public channel posts, views, reactions and subscribers
- [Substack Scraper](https://apify.com/smoldesk/substack-scraper): newsletters, subscriber counts and posts

# Actor input Schema

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

One per line: video or Shorts URLs (or video IDs), channels (https://www.youtube.com/@mkbhd, @mkbhd, /channel/UC…) and playlists. For a channel or playlist, comments come from its latest videos (see 'Videos per channel / playlist / search').

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

Get comments from the top YouTube results for a keyword, one per line, e.g. a brand or product name. Each term takes the top 'Videos per channel / playlist / search' videos.

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

Top-level comments to save for every video. Replies are counted separately (see below).

## `commentsSortBy` (type: `string`):

Top comments (YouTube's ranking) or newest first.

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

Replies to save under each comment (they are saved right after their parent and have isReply = true). 0 = no replies.

## `maxResults` (type: `integer`):

For channel, playlist and search inputs: how many of the latest (or top) videos to take comments from. Video URLs are always used as given. 0 = every video.

## `publishedAfter` (type: `string`):

For channels, playlists and searches: skip videos older than this date (2025-01-31) or period (7 days, 3 months). Good for daily monitoring of a channel's new videos.

## `country` (type: `string`):

Two-letter country code that YouTube uses to rank search results (US, GB, IN, MY…).

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

How many YouTube pages to load at once. The default is fast and safe.

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

Not needed — the Actor already falls back to Apify datacenter proxy when YouTube slows a connection down. Residential proxy is not used.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 50,
  "commentsSortBy": "top",
  "maxRepliesPerComment": 0,
  "maxResults": 5,
  "country": "US",
  "maxConcurrency": 10
}
```

# Actor output Schema

## `comments` (type: `string`):

Comments and replies.

# 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": 50,
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("smoldesk/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": 50,
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("smoldesk/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": 50,
  "maxResults": 5
}' |
apify call smoldesk/youtube-comments-scraper --silent --output-dataset

```

## MCP server setup

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