# YouTube Comments Scraper: Replies, Creator Hearts, Pinned (`redfoxscout/youtube-comments-scraper`) Actor

Scrape comments from YouTube videos and Shorts: text, author name and channel link, likes, reply counts, replies, creator hearts and pinned flags. Sort by top or newest and keep only comments newer than a date. No login. Not affiliated with YouTube. $0.50 per 1,000 comments.

- **URL**: https://apify.com/redfoxscout/youtube-comments-scraper.md
- **Developed by:** [Red Fox Scout](https://apify.com/redfoxscout) (community)
- **Categories:** 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.38 / 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

Scrape **YouTube comments and replies** from video and Shorts links. Each comment has its **text, author name and channel link, likes, reply count, publish time** and whether the **creator hearted or pinned it**. Sort by top or newest, and keep only **comments newer than a date** so repeat runs pay only for new ones. **No login, no cookies, no API key**, and not affiliated with YouTube.

**Price: $0.50 per 1,000 comments.** Failed videos and error rows are free, and a comment that two videos return is charged once. Apify's free plan ($5 monthly credit) covers about 10,000 comments a month.

![YouTube Comments Scraper output table: comment text, author, likes, replies and creator heart and pinned flags for a YouTube video](https://raw.githubusercontent.com/TikTop-Data/apify-store-assets/main/images/youtube-comments-scraper-output.png)

### Questions it answers

- What are people saying under a video right now, and what was posted since yesterday?
- Which comments did the creator heart, pin or answer?
- Which comments get the most likes and replies on a video?
- What do viewers say across a set of competitor, product or campaign videos?

### Who uses this

- 📣 **Marketing and brand teams:** watch the comments on campaign and competitor videos.
- 🎬 **Creators and community managers:** find new comments to answer and see what the audience reacts to.
- 📊 **Researchers and analysts:** collect comments for sentiment, topic and language analysis.
- 🤖 **Developers and AI agents:** feed a dashboard, spreadsheet or model with structured comments.

### Why this YouTube Comments Scraper

- 🆕 **Only new comments:** newest first plus a date or a period like `1 day` stops at the first older comment, so a daily schedule pays for new comments only.
- ❤️ **Creator signals:** every comment says whether the creator hearted or pinned it, and whether the author is the channel owner. One tick keeps only those comments.
- 💬 **Replies on request:** tick one box to get replies after each comment, with a cap per comment.
- 🔗 **Videos, Shorts and short links:** paste watch, youtu.be or Shorts links, or bare video IDs.
- 🏷️ **$0.50 per 1,000 comments:** one charge per comment, with no start fee and no per-video fee.

### How to use the YouTube Comments Scraper

1. Click **Try for free** (a free Apify account is enough).
2. Paste video or Shorts links, one per line.
3. Choose top or newest, and optionally a date, replies or creator highlights only.
4. Click **Start**, then download as JSON, CSV or Excel, or schedule it for a daily feed.

### Input

| Field | Default | What it does |
|---|---|---|
| `videos` | – | Video or Shorts links, or 11-character IDs, one per line. Required. |
| `sort` | `top` | `top` (YouTube's ranking) or `newest`. |
| `commentsNewerThan` | – | A date like `2026-11-01` or a period like `3 days`. With `newest` the run stops at the first older comment. |
| `includeReplies` | `false` | Also return replies after each comment. |
| `maxRepliesPerComment` | 10 | Replies read per comment when replies are included. |
| `onlyCreatorHighlights` | `false` | Only comments the creator hearted, pinned or wrote. |
| `maxItems` | 100 | Comments per video, replies included (max 100,000). |
| `proxyConfiguration` | off | Optional proxy. YouTube usually answers Apify's servers directly; turn it on if your runs return "YouTube answered HTTP 403" rows. |

Example (the input behind the output below):

```json
{ "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "includeReplies": true, "maxRepliesPerComment": 4, "onlyCreatorHighlights": true, "maxItems": 20 }
```

### Output

One row per comment or reply. A real row from that run:

```json
{
  "videoId": "jNQXAC9IVRw",
  "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "videoTitle": "Me at the zoo",
  "commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "commentUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg",
  "text": "We're so honored that the first ever YouTube video was filmed here!",
  "authorName": "@SanDiegoZoo",
  "authorChannelId": "UCC5NfQ6Mf0dq_eEwv4P_hWA",
  "authorChannelUrl": "https://www.youtube.com/@SanDiegoZoo",
  "likeCount": 4800000,
  "replyCount": 986,
  "publishedText": "6 years ago",
  "approxPublishedAt": "2020-11-06T03:54:50.433Z",
  "isEdited": false,
  "isReply": false,
  "parentCommentId": null,
  "isPinned": true,
  "isHeartedByCreator": true,
  "isCreator": false,
  "searchQuery": "jNQXAC9IVRw"
}
```

- `authorName` is the public display name or handle as YouTube shows it. No emails or other personal details are collected.
- `likeCount` is what YouTube displays, so large counts are rounded (`4.8M` becomes 4800000).
- YouTube shows only relative times such as `2 hours ago`. `approxPublishedAt` is that time counted back from the run, so it is exact to the unit YouTube shows (hours for recent comments, years for old ones).
- `parentCommentId` is set on replies and empty on top-level comments.
- `searchQuery` is the video a row came from. A video that fails adds one row with an `error` field and no charge.

### Example tasks

Ready-made inputs you can open, change and run:

- [Get the YouTube comments posted since yesterday](https://apify.com/redfoxscout/youtube-comments-scraper/examples/youtube-comments-new-since-yesterday)

### Monitor a video for new comments

Set `sort` to `newest` and `commentsNewerThan` to a period that matches your schedule, for example `1 day` for a daily run. The Actor reads comments newest first and stops at the first one older than the cutoff, so a quiet video costs almost nothing. Because YouTube gives relative times, a comment near the cutoff can appear in two runs; use `commentId` to remove repeats.

### How much does it cost?

$0.50 per 1,000 comments.

- 100 comments: about $0.05
- 10,000 comments: about $5.00
- Failed videos and error rows: free. A comment that two videos return is charged once.

Apify's free plan gives $5 of credit every month, enough for about 10,000 comments.

### FAQ

**Is this legal?** The Actor reads comments that YouTube shows to any visitor without logging in. It does not log in, use cookies or accounts, or solve CAPTCHAs, and it collects only the public display name and channel link a commenter shows. This is not legal advice, so check the terms and rules that apply to how you use the data.

**Why are some videos returned as errors?** Comments can be turned off, and private, age-restricted, members-only or removed videos show no comments to a logged-out visitor. Those videos give one free error row.

**Can it return every comment of a huge video?** The Actor pages through comments 20 at a time (about 1,500 per minute in tests) until it reaches `maxItems` or YouTube stops returning pages, which can happen before the video's total count. Use `newest` with a date for monitoring, and `top` for the most liked comments.

**Are replies counted in `maxItems`?** Yes. `maxItems` is the total of comments and replies per video.

**Why do some rows say "YouTube answered HTTP 403"?** YouTube sometimes refuses requests from cloud servers for a while. Those rows are not charged. Run again later, or turn on Apify Proxy in the `proxyConfiguration` input.

### Related Actors

- [YouTube Scraper](https://apify.com/redfoxscout/youtube-scraper): videos from YouTube searches and channels, with view and subscriber counts.
- [Threads Scraper](https://apify.com/redfoxscout/threads-scraper): public Threads posts and profiles without login.
- [Telegram Channel Scraper](https://apify.com/redfoxscout/telegram-channel-scraper): posts from public Telegram channels, newest first.
- [Pinterest Scraper](https://apify.com/redfoxscout/pinterest-scraper): public pins and boards by keyword or link.
- [Google News Scraper](https://apify.com/redfoxscout/google-news-scraper): news articles for a keyword, to follow what is said outside YouTube.

# Actor input Schema

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

Video or Shorts links or 11-character IDs, one per line, e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ or https://youtu.be/dQw4w9WgXcQ.

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

Top shows the most liked and relevant first; newest is best for monitoring, e.g. newest with a date below.

## `commentsNewerThan` (type: `string`):

A date or a period such as 2026-11-01 or 3 days; with newest first the run stops at the first older comment, so repeat runs stay cheap.

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

Also return replies to each comment, e.g. tick to see what the creator answered.

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

Replies read for each top-level comment when replies are included, e.g. 10.

## `onlyCreatorHighlights` (type: `boolean`):

Keep only comments the creator hearted, pinned or wrote, e.g. tick to see which comments the creator engaged with.

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

Optional. YouTube usually answers Apify's servers directly; if a run returns 'YouTube answered HTTP 403' rows, turn on Apify Proxy here and run again.

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

Stop each search after this many results.

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

How many searches run at once.

## Actor input object example

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

# 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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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