YouTube Comments Scraper avatar

YouTube Comments Scraper

Pricing

from $2.00 / 1,000 results

Go to Apify Store
YouTube Comments Scraper

YouTube Comments Scraper

Extract YouTube comments, threaded replies, author details, sentiment, spam scores, and video analytics at scale.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

REXREUS D.O

REXREUS D.O

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 months ago

Last modified

Categories

Features

Limited permissions

Share

YouTube Comments Scraper

Fast HTTP-first YouTube comments scraper with threaded replies, sentiment, spam scores, and engagement analytics

Extract YouTube comments, threaded replies, author details, sentiment, spam scores, and video analytics at scale.

Direct HTTP InnerTube client · zero browser overhead · privacy-friendly public data

Quick Start Apify Node.js

Why this Actor?

FeatureWhat you get
Threaded RepliesComplete discussion threads linked via parentCommentId with full nested hierarchy.
Sentiment AnalysisPre-scored sentiment (POSITIVE, NEUTRAL, NEGATIVE) evaluated via deterministic lexicon analysis.
Spam & Bot DetectionAutomated spamScore (0.00 to 1.00) detecting promotional spam, bot repetition, and suspicious links.
Language DetectionISO 639-1 language tags (en, id, es, ja, etc.) on every comment for multilingual analysis.
Influencer & Creator BadgesInstant identification of verified accounts, channel owners (isOwner), and high-engagement influencers.
Engagement StatisticsComprehensive per-video summary records with reply rate, sentiment distribution, and view/like ratios.
Keyword & Metric FilteringPre-filter comments by inclusion/exclusion keywords, language codes, and minimum like counts.
Zero Browser OverheadDirect HTTP streaming architecture running on 256 MB memory with ultra-low compute unit consumption.

Quick start

  1. Open YouTube Comments Scraper on Apify Console.
  2. In the YouTube Video URLs field, enter one or more YouTube video URLs (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ).
  3. Click Start and monitor the live progress.
  4. Export your clean dataset in JSON, CSV, or Excel format.
{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 100,
"includeReplies": true,
"sort": "top"
}

How it works

  1. Watch-Page Bootstrap: Resolves video metadata and client tokens directly via lightweight HTTP GET requests.
  2. InnerTube Next Stream: Streams top-level comment batches and threaded replies using native YouTube endpoints.
  3. Analytics Pipeline: Enriches each comment with sentiment ratings, spam scores, language identification, and creator flags.
  4. Structured Delivery: Pushes clean, buyer-focused records (comment, video, stats) to the Apify dataset in batched memory-safe flushes.

Input parameters

Basic Input

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 500,
"includeReplies": true
}

Full Input with Advanced Filtering

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 1000,
"includeReplies": true,
"maxRepliesPerComment": 50,
"sort": "top",
"concurrency": 2,
"includeKeywords": ["song", "legend"],
"excludeKeywords": ["subscribe", "check out my channel"],
"languages": ["en"],
"minLikes": 5
}

Input Fields Table

ParameterTypeDefaultDescription
startUrlsArrayRequiredList of YouTube URLs (watch?v=, /shorts/, /live/, youtu.be/). Max 50 per run.
maxCommentsInteger1000Maximum top-level comments to fetch per video (1 - 50,000).
includeRepliesBooleantrueWhen enabled, fetches nested replies under each top-level comment.
maxRepliesPerCommentInteger50Maximum replies to fetch per comment thread (0 - 500).
sortString"top"Comment sort order: "top" (popular comments) or "newest" (recent comments).
concurrencyInteger2Parallel video scraping workers (1 - 4).
includeKeywordsArray[]Filter to only export comments containing any of these keywords (case-insensitive).
excludeKeywordsArray[]Exclude comments containing any of these keywords.
languagesArray[]Filter by ISO language codes (e.g. ["en", "id", "es"]).
minLikesIntegernullExport comments with at least this many likes.

Output data structure

The Actor pushes three clean record types into the default dataset:

1. Comment Record (recordType: "comment")

{
"recordType": "comment",
"commentId": "Ugzge340dBgB75hWBm54AaABAg",
"videoId": "dQw4w9WgXcQ",
"parentCommentId": null,
"text": "can confirm: he never gave us up",
"publishedTime": "1 year ago",
"publishedAt": null,
"authorName": "@YouTube",
"authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
"authorAvatarUrl": "https://yt3.ggpht.com/3s6evpqAiDU9tQR4sC2siJippbH2RWVPnwHgyl4V0th2iuQz0VDQZbUhQBGmsxLYo-mjG6TqZQ=s88-c-k-c0x00ffffff-no-rj",
"isVerified": true,
"isOwner": false,
"isPinned": false,
"isHearted": true,
"likeCount": 323000,
"replyCount": 962,
"sentiment": "NEUTRAL",
"spamScore": 0,
"language": "en",
"isInfluencer": true,
"authorSubscribers": null,
"status": "SUCCESS",
"httpStatus": 200
}

2. Video Metadata Record (recordType: "video")

{
"recordType": "video",
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"channelName": "Rick Astley",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"viewCount": 1823312249,
"likeCount": 19000000,
"commentCount": 2400000,
"publishedAt": "2009-10-24T23:57:33-07:00",
"durationSeconds": 213,
"category": "Music",
"status": "PARTIAL",
"httpStatus": 200
}

3. Engagement Summary Record (recordType: "stats")

{
"recordType": "stats",
"videoId": "dQw4w9WgXcQ",
"fetched": 100,
"totalComments": 2400000,
"replyRate": 0.8,
"sentimentPos": 17,
"sentimentNeu": 82,
"sentimentNeg": 1,
"spamMean": 0.0095,
"viewsPerComment": 18233122.49,
"likesPerComment": 190000,
"status": "PARTIAL"
}

Cost, limits & performance

  • Compute Memory: 256 MB (minimal tier).
  • Execution Speed: Up to 100 comments per second via HTTP pipelining.
  • Compute Unit Efficiency: Typically consumes under 0.002 CU per 1,000 comments.
  • Proxy Requirements: None required for standard workloads.
  • Pagination Boundary: YouTube anonymous endpoints reliably return up to ~1,200 comments per video. When this threshold is reached, runs are marked with status: "PARTIAL" to inform data pipelines accurately.

Recipes

Recipe 1: Brand Sentiment & Competitor Audit

Analyze viewer perception on competitor product reviews or announcements:

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 1000,
"sort": "top",
"includeReplies": true
}

Recipe 2: Influencer & Community Creator Discovery

Identify high-impact commenters and verified channel creators in your niche:

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 500,
"minLikes": 25,
"includeReplies": false
}

Recipe 3: Multilingual Campaign Monitoring

Track English and Indonesian feedback while filtering out promotional bot spam:

{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 800,
"languages": ["en", "id"],
"excludeKeywords": ["t.me/", "whatsapp", "crypto", "free gift"]
}

Troubleshooting

StatusHTTP CodeCause & Recommended Action
NOT_FOUND404Video does not exist, is private, or has been removed. Check the input URL.
PARTIAL200Requested comment cap reached or YouTube anonymous pagination threshold encountered. Scraped rows remain valid.
BLOCKED403 / 429Temporary YouTube rate limiting. Lower concurrency or pause before re-running.
ERROR400 / 500Invalid URL format or internal network failure. Verify URL allowlist.

Frequently asked questions (FAQ)

1. Does this scraper require a YouTube API key or login account?

No. The scraper accesses publicly available YouTube data without requiring an API key, Google login, or browser session cookies.

2. How many comments can I extract per video?

You can request up to 50,000 comments. Due to YouTube's public pagination boundaries, anonymous streams generally reach up to approximately 1,200 top-level comments and replies. The scraper marks capped runs as PARTIAL without dropping existing records.

3. Can I export comments in CSV format?

Yes. Apify Console allows instant downloads in CSV, JSON, Excel, and XML formats. The dataset schema includes pre-flattened fields specifically optimized for spreadsheet analysis.

4. How does the sentiment and spam analysis work?

Sentiment and spam analysis run locally in-memory during extraction using specialized linguistic lexicons. They do not make external API calls, ensuring high execution speed and zero extra latency.

5. Is it safe and compliant for commercial use?

The Actor extracts only publicly visible data without bypassing authentication walls or accessing private user profiles, following Apify's standard compliance guidelines.

Run on Apify Console

Start extracting comments immediately on the Apify Platform.

License

Proprietary. All Rights Reserved. Copyright (c) 2026 REXREUS. See for full legal terms.