# Fast YouTube Comments Scraper v2 (`unknownbrain/fast-youtube-comments-scraper-v2`) Actor

Scrape YouTube comments and replies from multiple videos, Top or Newest sorting, and date filters. Export text, dates, likes, author names, and thread details to JSON or CSV for research, feedback analysis, and engagement tracking.
you can try this also,
unknownbrain/youtube-comment-keyword-search

- **URL**: https://apify.com/unknownbrain/fast-youtube-comments-scraper-v2.md
- **Developed by:** [ABHIJEET S](https://apify.com/unknownbrain) (community)
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

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

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

## Fast YouTube Comments Scraper

Collect YouTube comments and replies from multiple videos with custom limits, sorting, and publication date filters. Export structured results for audience research, feedback analysis, and engagement tracking.

[Open the Actor on Apify](https://console.apify.com/actors/jCpWm0IFhnTdOo4YU)

### Features

- **Multiple videos:** Add YouTube video links and choose a separate comment amount for each.
- **Custom limits:** Defaults to **100 records per video**, with an optional limit for the entire run. Comments and replies count together.
- **Replies and threads:** Include replies, identify parent comments, and optionally limit replies per thread.
- **Comment sorting:** Choose **Newest first** or **Top comments**.
- **Publication date filter:** Collect comments published on or after a date, or use an age such as `1 day` or `2 days`. Selecting a date filter automatically switches sorting to Newest first.
- **Engagement details:** Get comment likes and reply counts, with optional pinned indicators, creator hearts, and nested reply relationships when available.
- **Creator replies:** Identify replies written by the video's creator when this can be established.
- **JSON and CSV exports:** Download comment records for spreadsheets, dashboards, or further analysis.
- **Separate video summaries:** Review collected counts, completion status, elapsed time, limits reached, and warnings.

### Use cases

- Understand audience feedback on videos, products, or campaigns.
- Research common questions, opinions, and recurring topics.
- Compare discussion and engagement across several videos.
- Review recent comments for ongoing audience monitoring.
- Collect structured comment data for research and reporting.

### How to use

1. Open the Actor on Apify and add your video links.
2. Set the maximum number of records for each video, or keep the default of 100.
3. Choose sorting, replies, and any date or engagement filters.
4. Start the run and review the results.
5. Export the comment dataset as JSON or CSV. Check the separate video summaries for completion details.

### Input options

| Option | Default | Purpose |
| --- | --- | --- |
| Videos and comment amounts | 100 records per video | Add each URL alongside its requested amount. |
| Comment sorting | Newest first | Select Newest first or Top comments. |
| Scrape comments published after | Unset | Include comments and replies published on or after the cutoff. |
| Include replies | On | Collect replies within selected comment threads. |
| Maximum replies per thread | Unset | Set an optional reply cap for each thread. |
| Maximum records across the run | Unset | Set a combined limit across all videos. |
| Additional engagement details | Off | Select pinned comments, creator hearts, or nested reply relationships. These can increase run time. |
| Verify empty results | On | Check unexpected empty results before reporting that no comments were found. |
| Simultaneous videos | 3 | Choose how many videos to process at once. |
| Processing timeout per video | 180 seconds | Limit the active processing time for each video. |

#### Date filter examples

| Enter | Comments included |
| --- | --- |
| `2026-10-01` | October 1, 2026 onward, including that date. |
| `1 day` | Today's comments. |
| `2 days` | Yesterday's and today's comments. |
| Leave empty | No publication date filter. |

Date filters use **UTC calendar days** and publication dates, rather than last updated dates. Replies must meet the same cutoff and belong to qualifying parent threads; new replies on older parent threads are outside this mode. Comments with unavailable publication dates are excluded when a date filter is selected.

### Output

Each dataset record represents one comment or reply.

| Group | Included information |
| --- | --- |
| Comment | ID, direct comment link, full text, publication date, last updated date, and like count. |
| Author | Display name and creator reply indicator. |
| Thread | Top-level or reply indicator, parent ID, root thread ID, relationship type, total reply count, and collected reply count. |
| Optional engagement details | Pinned indicator, creator heart status, and nested reply relationships when established. |
| Video | Video ID, URL, title, and owner channel ID. |
| Collection | Sorting used, collection timestamp, and publication date precision. |

Unavailable values are returned as `null`. Some publication dates may be estimated and are labeled accordingly. Reply counts can exceed the number collected when a record limit is reached. Top-level comments carry total and collected reply counts; those fields are `null` on reply records.

Video summaries are stored separately from the comment dataset. They include the requested amount, collected comment and reply counts, status, elapsed time, applied date cutoff, limit flags, additional-detail status, and warnings. When comments exist but none meet the date filter, the status is `no_matching_comments`.

### Measured performance

A live Apify test on **October 11, 2026** collected **1,000 records across 10 videos**, limited to 100 records per video.

| Metric | Measured result |
| --- | ---: |
| Videos completed | 10 of 10 |
| Total records | 1,000 |
| Top-level comments | 630 |
| Replies | 370 |
| Comment collection time | 3.32 seconds |
| Total run time, including startup | 6.64 seconds |
| First saved results after collection began | 0.88 seconds |

This test used build **0.1.3**, 1 GB of allocated memory, Newest first sorting, replies enabled, and additional engagement details disabled. All sample videos were music videos. These figures describe one measured run; performance varies with video activity, reply depth, selected limits, and optional details.

[View the measured run on Apify](https://console.apify.com/actors/runs/OTyn7eJ4pq0YVF5kP)

# Actor input Schema

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

Parents and replies count together. Each omitted amount defaults to 100. Identical videos are deduplicated; conflicting amounts are rejected.

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

API relevance ordering and YouTube's public Top comments ordering can differ.

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

Only comments and replies published on or after this date are included. Enter YYYY-MM-DD or an age such as 1 day (today) or 2 days (yesterday and today). Uses UTC calendar days. Automatically resets sorting to Newest first. Replies are collected within qualifying top-level threads. Leave empty to disable.

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

Reply requests can add time. Replies count toward the amount for each video.

## `maxRepliesPerThread` (type: `integer`):

Leave unset for no additional reply cap.

## `maxTotalComments` (type: `integer`):

Optional shared limit. Allocation between concurrent videos depends on arrival order.

## `publicDetails` (type: `array`):

One additional public pass. API text, dates and likes remain authoritative; unavailable details remain null.

## `enableFallback` (type: `boolean`):

Retries empty responses once, then verifies with yt-dlp in the same extraction session.

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

Workers share the private key. Public extraction is limited to two workers; reply requests to four across the run.

## `videoTimeoutSeconds` (type: `integer`):

Excludes waiting in the video queue. Covers extraction and optional enrichment; partial records are retained.

## Actor input object example

```json
{
  "videos": [
    {
      "url": "https://www.youtube.com/watch?v=L2udL0v3hkg",
      "maxComments": 20
    }
  ],
  "sort": "newest",
  "includeReplies": true,
  "publicDetails": [],
  "enableFallback": true,
  "maxConcurrency": 3,
  "videoTimeoutSeconds": 180
}
```

# Actor output Schema

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

Comments and replies. Use the dataset Export button to download JSON or CSV.

## `summaries` (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": [
        {
            "url": "https://www.youtube.com/watch?v=L2udL0v3hkg",
            "maxComments": 20
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("unknownbrain/fast-youtube-comments-scraper-v2").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": [{
            "url": "https://www.youtube.com/watch?v=L2udL0v3hkg",
            "maxComments": 20,
        }] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,unknownbrain/fast-youtube-comments-scraper-v2"
        }
    }
}
```

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/jCpWm0IFhnTdOo4YU/builds/C6G3vUnEdZvq1dIgN/openapi.json
