# YouTube Comments Export - Comment Replies, Shorts & Bulk (`martin10291/youtube-comments-scraper`) Actor

Export YouTube comments and comment replies from any number of videos and Shorts: text, author, likes, reply count, date, pinned and creator-heart flags. Top or newest, keyword filter, only-new mode for new YouTube comments. No API key. $0.20 per 1,000.

- **URL**: https://apify.com/martin10291/youtube-comments-scraper.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Social media, Videos, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.14 / 1,000 results

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 Export - Comment Replies, Shorts & Bulk

**Export YouTube comments and comment replies** from any number of videos and **Shorts** to JSON, CSV or Excel. Paste links, press Start, get one clean row per comment: text, author, channel, likes, reply count, date, pinned and creator-heart flags, and a direct link to the comment. Schedule it with the only-new mode to get just the **new YouTube comments** since the last run.

**No login, no YouTube API key, no daily quota.** $0.20 per 1,000 comments, no start fee.

### Why this YouTube comments scraper

- **Bulk:** hundreds of videos in one run, in your input order. Watch links, youtu.be, Shorts, live and embed links or plain video IDs.
- **Replies included (optional):** full reply threads with `parentCommentId`, so you can rebuild conversations.
- **Top or newest:** the same sort as the menu under a YouTube video.
- **Only new comments mode:** schedule it daily or hourly and get just the fresh comments since the last run. Ideal for brand monitoring, community management and customer-feedback alerts.
- **Keyword filter:** keep only comments that mention a product, price, bug, refund or a competitor, and pay only for those.
- **Creator signals:** `isPinned`, `isHearted` (hearted by the creator) and `authorIsChannelOwner`.
- **Reliable:** direct connection first, Apify Proxy automatically when YouTube limits requests, retries with fresh sessions. Videos with comments turned off are skipped, not failed.

### Use cases

- **Audience research and product feedback:** what viewers ask, like and complain about.
- **Sentiment analysis and AI datasets:** clean text for LLMs, topic modelling and training data.
- **Influencer and campaign reporting:** engagement on sponsored videos and Shorts.
- **Lead mining:** find people asking for a tool or service in the comments of niche videos.
- **Competitor monitoring:** what customers say under a competitor's videos, every day.

### Input

| Field | What it does |
|---|---|
| `videos` | Video or Shorts links or IDs, one per line |
| `maxCommentsPerVideo` | Top-level comments per video (default 200) |
| `sortBy` | `top` or `newest` |
| `includeReplies`, `maxRepliesPerComment` | Reply threads |
| `keywords` | Keep only comments containing any of these words |
| `publishedAfter` | Skip older comments |
| `onlyNewComments` | Only comments not returned in earlier runs |
| `maxComments` | Hard cap for the whole run |

```json
{
  "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://youtube.com/shorts/VIDEO_ID"],
  "maxCommentsPerVideo": 500,
  "sortBy": "newest",
  "includeReplies": true
}
```

### Output

```json
{
  "videoId": "jNQXAC9IVRw",
  "videoTitle": "Me at the zoo",
  "videoCommentCount": 10000000,
  "commentId": "UgzmvzwNBLGbZNa62vh4AaABAg",
  "commentUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzmvzwNBLGbZNa62vh4AaABAg",
  "text": "This actually got recommended to me...",
  "author": "@f.s.hardy79",
  "authorChannelId": "UComLrkeBts22k2ISeAR-O0A",
  "authorIsChannelOwner": false,
  "authorIsVerified": false,
  "likeCount": 5000,
  "replyCount": 158,
  "publishedTimeText": "1 month ago",
  "publishedAt": "2026-09-29T10:00:00Z",
  "isPinned": false,
  "isHearted": false,
  "isReply": false,
  "parentCommentId": null,
  "position": 1
}
```

`publishedAt` is calculated from YouTube's relative date ("1 month ago"), so it is approximate.

### Pricing

**$0.20 per 1,000 comments** (pay per result). No start fee, no subscription. Filtered-out comments are not charged. Set `maxComments` to cap the cost of any run.

### More YouTube tools from the same author

- [YouTube Transcript & Subtitles Scraper](https://apify.com/martin10291/youtube-transcript-bulk-extractor) - transcripts in bulk
- [YouTube Video Metadata Bulk Lookup](https://apify.com/martin10291/youtube-video-lookup) - views, likes, tags, dates
- [YouTube Channel Monitor](https://apify.com/martin10291/youtube-channel-monitor) - new videos and Shorts from any channel

### FAQ

**Do I need a YouTube API key?** No. The actor reads the same public data your browser shows.

**Does it work for Shorts?** Yes, paste the Shorts link or ID.

**Why fewer comments than the counter shows?** YouTube's counter includes replies and comments hidden by moderation. Turn on replies to get the threads.

**Is it legal?** It collects publicly visible comments. Use the data in line with YouTube's terms and privacy laws (GDPR) for your use case.

*Last updated: October 2026.*

# Actor input Schema

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

Video links (watch, youtu.be, Shorts, live, embed) or 11-character video IDs. One per line, any number.

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

Top-level comments to collect from each video (replies count too when enabled).

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

Same as the sort menu under a YouTube video.

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

Also collect the reply thread of each comment (marked isReply=true with parentCommentId).

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

Only used when replies are on.

## `keywords` (type: `array`):

Optional. Keep comments that contain any of these words (case-insensitive), e.g. price, refund, bug, competitor name. Only kept comments are charged.

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

Optional. Skip comments older than this date (YouTube shows relative dates, so this is approximate to the day).

## `onlyNewComments` (type: `boolean`):

Remembers what was already saved for each video and returns only fresh comments. Perfect for a daily or hourly schedule (brand monitoring, community management). Uses 'Newest first' automatically.

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

Hard cap for the whole run (0 = no cap). Keeps the cost predictable.

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

Optional. By default the actor connects directly and switches to Apify Proxy automatically if YouTube limits requests.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 50,
  "sortBy": "top",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "onlyNewComments": false,
  "maxComments": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Items extracted by the Actor.

# 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=jNQXAC9IVRw",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxCommentsPerVideo": 50
};

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

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

```

## MCP server setup

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