# YouTube Comments Scraper - No API Key, Videos & Shorts (`sonic_scraper/youtube-comments-scraper-api`) Actor

YouTube comments scraper for videos and Shorts. Export comment text, authors, likes, reply counts, pinned/hearted/owner flags and direct comment links to CSV or JSON. Top or newest sort. No YouTube API key or quota. $1 per 1,000 comments.

- **URL**: https://apify.com/sonic_scraper/youtube-comments-scraper-api.md
- **Developed by:** [Group Oject](https://apify.com/sonic_scraper) (community)
- **Categories:** Videos, Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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

## YouTube Comments Scraper - No API Key, Videos & Shorts

Export comments from any public YouTube video or Short to JSON, CSV or Excel. Get the comment text, author, likes, reply count, pinned and hearted flags, and a direct link to every comment. No YouTube Data API key, no quota, no login. **$1 per 1,000 comments.**

![YouTube Comments Scraper output in Apify: comment, author, likes, replies, published, pinned, hearted](https://api.apify.com/v2/key-value-stores/lwQu1lCMCLQIIhSMQ/records/youtube-comments-scraper-api-output.png)

*Real output from a default run of YouTube Comments Scraper in Apify Console.*

### What can YouTube Comments Scraper do?

- **Scrape comments from many videos in one run**: paste video URLs, Shorts URLs, `youtu.be` links, live URLs, or 11-character video IDs.
- **Sort by Top comments or Newest first**, just like on YouTube.
- **Flag the comments that matter**: pinned comments, comments hearted by the creator, and comments written by the channel owner.
- **Link back to every comment** with a `commentUrl` that opens the exact comment on YouTube.
- **Control cost** with a per-video cap and a total cap. Duplicates are removed automatically.
- **Retry blocked requests** through Apify Proxy automatically when YouTube returns 403, 429 or 5xx on the platform.

Use it for audience research, product and launch feedback, sentiment analysis, competitor monitoring, creator engagement audits, and training or grounding AI models on real viewer language.

### What data can I extract from YouTube comments?

| Field | Description |
|---|---|
| `commentId`, `commentText` | Comment ID and full text |
| `authorName`, `authorChannelId`, `authorChannelUrl`, `authorAvatarUrl` | Public author details |
| `likeCount`, `likeCountText` | Likes as a number and as shown on YouTube |
| `replyCount`, `replyCountText` | Number of replies to the comment |
| `publishedTime` | Relative time shown by YouTube, for example `2 days ago` |
| `isPinned`, `isHearted`, `isChannelOwner` | Pinned, creator-hearted, written by the channel owner |
| `videoId`, `videoUrl`, `commentUrl` | Video and a direct link to the comment |
| `sortBy`, `scrapedAt` | Sort mode used and collection time |

### How much does it cost to scrape YouTube comments?

- **$1.00 per 1,000 comments** ($0.001 per comment saved)
- **$0.00005 per Actor start** (per GB of memory)

| Job | Comments | Approx. cost |
|---|---|---|
| Top 100 comments from 10 videos | 1,000 | $1.00 |
| 500 newest comments from 1 launch video | 500 | $0.50 |
| 5,000 comments from one viral video | 5,000 | $5.00 |

Videos with comments turned off produce no rows and no comment charges. You can also set a maximum charge per run in Apify. Check the Pricing tab for current rates.

### How to scrape YouTube comments

1. Paste one or more YouTube video or Shorts URLs into **Video URLs**.
2. Choose **Sort by**: `TOP_COMMENTS` for the most-liked discussion, `NEWEST_FIRST` for fresh feedback.
3. Set `maxCommentsPerVideo` and `maxTotalComments`.
4. Click **Start** and download the comments as CSV, Excel or JSON, or read them through the API.

#### Input example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/abc123def45",
    "https://youtu.be/9bZkp7q19f0"
  ],
  "sortBy": "TOP_COMMENTS",
  "maxCommentsPerVideo": 200,
  "maxTotalComments": 600,
  "language": "en",
  "country": "US"
}
```

#### Output example

```json
{
  "commentId": "UgzExampleCommentId4AaABAg",
  "commentText": "The battery section alone answered every question I had. Ordering one today.",
  "authorName": "@example_viewer",
  "authorChannelId": "UCexampleAuthor123456789",
  "authorChannelUrl": "https://www.youtube.com/channel/UCexampleAuthor123456789",
  "authorAvatarUrl": "https://yt3.ggpht.com/example=s88-c-k",
  "likeCount": 1200,
  "likeCountText": "1.2K",
  "replyCount": 34,
  "replyCountText": "34",
  "publishedTime": "3 days ago",
  "isPinned": false,
  "isHearted": true,
  "isChannelOwner": false,
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzExampleCommentId4AaABAg",
  "sortBy": "TOP_COMMENTS",
  "scrapedAt": "2026-10-25T12:54:51.032Z"
}
```

### Input reference

| Field | Default | Notes |
|---|---|---|
| `videoUrls` | \[] | Video, Shorts, live or `youtu.be` URLs, or video IDs |
| `maxCommentsPerVideo` | 100 | Up to 5,000 per video |
| `maxTotalComments` | 100 | Up to 20,000 per run |
| `sortBy` | `TOP_COMMENTS` | `TOP_COMMENTS` or `NEWEST_FIRST` |
| `language` / `country` | `en` / `US` | Locale used for requests |
| `dedupe` | true | Skip repeated comment IDs |

### YouTube comments for sentiment analysis and AI

The dataset is ready for spreadsheets, BI tools and LLM pipelines: one row per comment, plain text, numeric likes. Common workflows:

- **Launch feedback**: run `NEWEST_FIRST` on your launch video daily and pipe new comments to a sentiment model.
- **Competitor research**: scrape the top comments on competitors' reviews to find feature requests and complaints.
- **Creator vetting**: check engagement quality and how often a creator replies or hearts comments (`isHearted`, `isChannelOwner`).

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("sonic_scraper/youtube-comments-scraper-api").call(run_input={
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxCommentsPerVideo": 300,
    "maxTotalComments": 300,
})
comments = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(len(comments), "comments")
```

You can also call it from Make, Zapier or n8n through the Apify integration, or from AI agents through MCP: `https://mcp.apify.com?tools=sonic_scraper/youtube-comments-scraper-api`.

Each run writes a `SUMMARY` record (videos, comments, failures) and an `ERRORS` record. If every requested video fails, the run is marked as failed instead of returning an empty success.

### FAQ

**Do I need a YouTube API key?** No. There is no API key, no OAuth, and no daily quota.

**Does it scrape YouTube Shorts comments?** Yes. Paste the Shorts URL (`youtube.com/shorts/...`) like any other video.

**Are replies included?** This Actor exports top-level comments with their `replyCount`. The text of individual replies is not exported.

**Why did a video return no comments?** Comments may be disabled, the video may be private, age-restricted or removed, or YouTube may have limited the request. Check the `ERRORS` record.

**Why is `publishedTime` relative?** YouTube shows comment times as "3 days ago". The Actor keeps that value exactly as shown and adds `scrapedAt` so you can approximate the date.

**Is it legal to scrape YouTube comments?** Comments are public, but they contain personal data such as usernames. Use the data in line with YouTube's terms and privacy laws like GDPR.

### Related Actors

- [YouTube Scraper API](https://apify.com/sonic_scraper/youtube-scraper-api) - find video URLs by keyword or playlist, then scrape their comments here
- [YouTube Channel Monitor](https://apify.com/sonic_scraper/youtube-channel-monitor) - get new uploads from channels on a schedule
- [YouTube Channel Scraper API](https://apify.com/sonic_scraper/youtube-channel-scraper-api) - channel profiles, subscribers and emails in bio
- [Reddit Lead Finder](https://apify.com/sonic_scraper/reddit-lead-finder-sentiment-monitor) - buying-intent and pain-point posts from Reddit

# Actor input Schema

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

YouTube video URLs, Shorts URLs, or 11-character video IDs.

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

Maximum comments to scrape from each video.

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

Maximum comments to output across all videos.

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

YouTube comment sorting mode.

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

YouTube language code.

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

YouTube country code.

## `dedupe` (type: `boolean`):

Remove duplicate comment IDs across all videos.

## `debugMode` (type: `boolean`):

Verbose logging.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxCommentsPerVideo": 100,
  "maxTotalComments": 100,
  "sortBy": "TOP_COMMENTS",
  "language": "en",
  "country": "US",
  "dedupe": true,
  "debugMode": false
}
```

# Actor output Schema

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

One row per YouTube comment.

## `summary` (type: `string`):

Totals, video counts, and warnings.

## `errors` (type: `string`):

Videos that failed or had unavailable comments.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonic_scraper/youtube-comments-scraper-api").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"] }

# Run the Actor and wait for it to finish
run = client.actor("sonic_scraper/youtube-comments-scraper-api").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"
  ]
}' |
apify call sonic_scraper/youtube-comments-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/zZrldwwnOZSpDDGTW/builds/zZPOxRVzq9SY2OGgz/openapi.json
