# YouTube Comments Scraper: Text, Likes, Replies & Pinned (`latam_data/youtube-comments-scraper`) Actor

Scrape YouTube comments and replies from any video or Short: text, likes, reply count, date, pinned and creator-hearted flags. Top or newest order. No API key, no quota, no login. Fast and cheap.

- **URL**: https://apify.com/latam_data/youtube-comments-scraper.md
- **Developed by:** [Cristian Camilo Gomez Diaz](https://apify.com/latam_data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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: Text, Likes, Replies & Pinned

Get the comments of any **YouTube video or Short** in seconds: comment text, likes, number of replies, date, and whether the comment is pinned or hearted by the creator. Optionally get the replies too. **No API key, no daily quota, no login.**

### What you can do with it

- **Audience research**: read what viewers ask, like and complain about on your videos or your competitors' videos.
- **Sentiment analysis and AI**: feed thousands of comments to ChatGPT, Claude or your own model to find topics, questions and product ideas.
- **Content ideas**: the top comments show what people want to see next.
- **Brand monitoring**: track what is said about your product in review videos.
- **Giveaways and engagement checks**: count comments and likes on a video.

### Input

| Field | Description |
|---|---|
| Videos | Video or Shorts URLs, or 11-character IDs |
| Max comments per video | Top-level comments to save (default 100) |
| Order | Top comments or newest first |
| Include replies | Also save replies (up to N per comment) |
| Include author | Off by default. Adds the commenter's public display name and channel ID |

### Output example

```json
{
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentId": "UgzABC...",
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzABC...",
  "text": "Still a classic in 2026",
  "publishedText": "2 days ago",
  "likes": 1520,
  "replyCount": 34,
  "isReply": false,
  "parentCommentId": null,
  "isPinned": false,
  "isHeartedByCreator": true,
  "isByVideoCreator": false
}
```

Download as JSON, CSV, Excel or HTML, or read it with the API.

### Pricing

Pay only for results: **$0.50 per 1,000 comments** (replies count as comments). No monthly fee. The Apify free plan gives you $5 of usage every month, which is about 10,000 comments.

### Privacy

By default the Actor does **not** save who wrote each comment, only the public comment content and counts. If you turn on "Include author", you are responsible for having a lawful reason to process that personal data (GDPR, CCPA and similar laws).

### More YouTube and web data from us

- **Videos, channels, Shorts and search**: our [YouTube Scraper](https://apify.com/latam_data/youtube-scraper-channels-videos-shorts-search).
- **What people search for**: our [Keyword Suggestions Scraper](https://apify.com/latam_data/keyword-suggestions-scraper-google-youtube-amazon-bing) gives YouTube autocomplete ideas.
- **Trending topics**: our [Google Trends Trending Now Scraper](https://apify.com/latam_data/google-trends-trending-now-scraper).
- **Web pages as text for AI**: our [Website to Markdown Crawler for AI](https://apify.com/latam_data/website-to-markdown-crawler-for-ai).
- **Podcasts**: our [Podcast Scraper](https://apify.com/latam_data/podcast-scraper-apple-podcasts-shows-charts-episodes).

### Integrations

Send comments to Google Sheets, Airtable, Slack, Notion or a webhook with [Make](https://www.make.com/en/register?pc=latamdata), Zapier or n8n, or call the Actor from your code with the [Apify API](https://docs.apify.com/api/v2). New to Apify? [Create a free account here](https://apify.com?fpr=rfn03e).

Need ready-made data APIs? See [Zyla API Hub](https://zylalabs.com/a/f9jcfkz8). Scraping sites that block you? Proxies from [Webshare](https://www.webshare.io/?referral_code=v5e0reweus4m) or scraping APIs like [ScraperAPI](https://www.scraperapi.com/?fp_ref=camilo-66b5f5) and [ScrapeOps](https://scrapeops.io?fpr=camilo-1a3b24) help.

### FAQ

**Is it legal?** It reads only public comments that anyone can see without logging in. Respect YouTube's terms and privacy laws when you use the data.

**Why are some videos empty?** The creator turned comments off, or the video is private or age-restricted.

**Can I get all comments of a huge video?** Yes, set a high max. Big videos take longer; YouTube returns about 20 comments per page.

# Actor input Schema

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

YouTube video or Shorts URLs, or 11-character video IDs, one per line.

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

Top-level comments to save per video (replies are counted separately).

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

Top comments (as YouTube ranks them) or newest first.

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

Also save the replies under each comment.

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

Only used when replies are included.

## `includeAuthor` (type: `boolean`):

Add the public display name and channel ID of each commenter. Off by default: only turn it on if you have a lawful reason to process this data.

## `language` (type: `string`):

Interface language code, for example en or es. Affects date texts like '2 days ago'.

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

Two-letter country code.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 30,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "includeAuthor": false,
  "language": "en",
  "country": "US"
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxComments": 30
};

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

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

```

## MCP server setup

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