# YouTube Comments Scraper — Export Comments & Replies (`lieund/youtube-comments-scraper`) Actor

Export YouTube comments and replies from videos, Shorts, whole channels, playlists or search terms: comment text, likes, reply count, date, pinned and hearted flags. Top or newest comments. Download to CSV, Excel or JSON. No login, no API key. $0.20 per 1,000 comments.

- **URL**: https://apify.com/lieund/youtube-comments-scraper.md
- **Developed by:** [Mon Data Tools](https://apify.com/lieund) (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.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.

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

Get **YouTube comments and replies** from videos, Shorts, **whole channels, playlists or search terms** in one run: comment text, likes, reply count, date, pinned and hearted flags, as clean JSON, CSV or Excel.

No login, no YouTube API key and no quota. Paste a channel link to get comments from its latest videos, or a search term to get comments from the videos YouTube ranks for it.

### What you can use it for

- **Creators and agencies:** read what viewers ask and complain about across your latest videos.
- **Brand and product research:** collect comments from every review video about a product (search "iphone 17 review").
- **Competitor research:** see what a rival channel's audience likes and dislikes.
- **Sentiment analysis and AI:** feed thousands of comments to your own model or an AI agent.
- **Monitoring:** schedule it daily with *Newest first* and *Only comments since* to get just the new comments.

### How to use it

1. Add **videos, channels or playlists**: links like `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `https://youtu.be/dQw4w9WgXcQ`, `https://www.youtube.com/shorts/...`, `https://www.youtube.com/@MrBeast` or `https://www.youtube.com/playlist?list=...`.
2. Optionally add **search terms**.
3. Set **max videos per channel, playlist or search** and **max comments per video**.
4. Choose **Top comments** or **Newest first**, and whether to **include replies** (up to **max replies per comment**, 10 by default).
5. Click **Start**. In our test, 7 videos from a video link, a channel, a playlist and a search gave 210 comments in under 20 seconds.

### Output

One result per comment or reply:

```json
{
  "videoId": "0e3GPea1Tyg",
  "videoTitle": "$456,000 Squid Game In Real Life!",
  "videoUrl": "https://www.youtube.com/watch?v=0e3GPea1Tyg",
  "channelName": "MrBeast",
  "commentId": "UgzH8vliQSJKHQMGZjx4AaABAg",
  "parentCommentId": null,
  "isReply": false,
  "text": "Like I said in the video, subscribe if you haven't already and you could win $10,000!",
  "likes": 1100000,
  "replyCount": 742,
  "publishedTimeText": "4 years ago",
  "publishedAt": "2022-11-24T04:24:32.410Z",
  "edited": false,
  "isPinned": true,
  "isHeartedByCreator": false,
  "isByVideoOwner": true,
  "commentUrl": "https://www.youtube.com/watch?v=0e3GPea1Tyg&lc=UgzH8vliQSJKHQMGZjx4AaABAg",
  "sort": "top",
  "source": "https://www.youtube.com/@MrBeast",
  "scrapedAt": "2026-11-23T04:41:32.410Z"
}
```

| Field | Meaning |
|---|---|
| `isReply`, `parentCommentId` | Replies point to the comment they answer |
| `likes` | Likes, rounded the way YouTube shows them (73K = 73000) |
| `replyCount` | Number of replies under the comment |
| `publishedTimeText`, `publishedAt` | Time as YouTube shows it ("3 days ago") and the approximate date worked out from it |
| `isPinned`, `isHeartedByCreator`, `isByVideoOwner` | Pinned or hearted by the creator, or written by the channel itself |
| `commentUrl` | Opens the video at this comment |
| `source` | The link or search term the video came from |

Videos with comments turned off are skipped and cost nothing. Download results as JSON, CSV, Excel or HTML, or read them through the Apify API.

### Integrations

- **Schedules:** run it every day with [Apify schedules](https://docs.apify.com/platform/schedules), *Newest first* and *Only comments since*.
- **Google Sheets, Slack, email, CRM:** send comments anywhere with [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier) or [n8n](https://docs.apify.com/platform/integrations/n8n).
- **Your own app:** get a [webhook](https://docs.apify.com/platform/integrations/webhooks) when a run finishes, then read the dataset through the API.
- **AI agents:** let AI agents run this Actor through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

### Pricing

**$0.20 per 1,000 comments** (replies count as comments), with a near-zero start fee and no monthly fee. Use **Max comments per video**, **Max videos per channel, playlist or search** and **Only comments since** to get only what you need. If you set **Max cost per run**, the Actor stops before going over it.

### Related

- [YouTube Video Scraper](https://apify.com/lieund/youtube-video-scraper): videos with exact views, likes, upload date and length from searches, channels and playlists.
- [Google Trends Scraper](https://apify.com/lieund/google-trends-scraper): see how search interest in a topic or product changes over time.
- [Google Autocomplete Scraper](https://apify.com/lieund/google-autocomplete-scraper): find what people search on YouTube and Google.
- [Google Play Reviews Scraper](https://apify.com/lieund/google-play-reviews-scraper): app reviews in up to 63 languages in one run.

### Notes

- Data comes from the public comments shown on YouTube video pages. The Actor does not log in and needs no proxy or API key.
- YouTube shows times like "3 days ago", so `publishedAt` is approximate (to the day for recent comments, to the month or year for old ones).
- YouTube always keeps a pinned comment at the top, even with *Newest first*.
- YouTube sometimes refuses cloud servers for a while (HTTP 403). Videos it refuses are skipped and cost nothing; run again later to get them.
- Commenter names and channels are not collected: they are personal data, so results hold only the comment itself.
- `channelName` is the public name of the channel that posted the video. When a channel belongs to a person, this can be personal data: use it only for a lawful purpose, such as research or analytics. Comment text can also mention people, so treat it with care.

# Actor input Schema

## `videos` (type: `array`):

YouTube video or Shorts links (or 11-character video IDs), channel links (https://www.youtube.com/@MrBeast: takes the channel's latest videos) or playlist links. Mix as many as you like.

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

Optional. Get comments from the top videos YouTube shows for each search term, like "iphone 17 review".

## `maxVideosPerSource` (type: `integer`):

How many videos to take from each channel (newest first), playlist or search term. 0 means all.

## `maxCommentsPerVideo` (type: `integer`):

Stop after this many comments (and replies) for each video. 0 means all: very popular videos have millions, so set "Max cost per run" too.

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

Newest first is best for monitoring and for "Only comments since". YouTube always keeps a pinned comment on top.

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

Also get the replies under each comment. Replies count toward the max per video and are charged like comments.

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

With "Include replies" on: at most this many replies under each comment, so popular comments do not use up the whole max per video. 0 means all replies.

## `since` (type: `string`):

Keep only comments written on or after this date (YYYY-MM-DD). YouTube shows times like "3 days ago", so dates are approximate. With "Newest first" the run also stops early.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerSource": 3,
  "maxCommentsPerVideo": 100,
  "sort": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 10
}
```

# Actor output Schema

## `comments` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxVideosPerSource": 3,
    "maxCommentsPerVideo": 100
};

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

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

```

## MCP server setup

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