YouTube Comment Scraper
Pricing
from $0.45 / 1,000 results
YouTube Comment Scraper
Scrape millions of comments from any YouTube video with no API key. Supports all URL formats. Returns author info, like counts, reply counts, publish time, and creator hearts.
Pricing
from $0.45 / 1,000 results
Rating
0.0
(0)
Developer
Scrape Smith
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Share
YouTube Comment Scraper — Apify Actor
Extract comments from any YouTube video at scale. Scrape millions of comments with author details, like counts, reply counts, publish dates, pinned status, and creator hearts — no YouTube API key, no login required.
What This Actor Does
YouTube Comment Scraper uses the YouTube Innertube internal API (/next endpoint) to collect comments from any number of videos simultaneously. It handles pagination automatically, resumes after interruptions, and enforces per-run limits to stay within your Apify compute budget.
Supported input formats:
- Full watch URLs:
https://www.youtube.com/watch?v=dQw4w9WgXcQ - Short URLs:
https://youtu.be/dQw4w9WgXcQ - YouTube Shorts:
https://www.youtube.com/shorts/abc123 - Plain 11-character video IDs:
dQw4w9WgXcQ
Output Fields
Each comment is saved as one row in the Apify dataset:
| Field | Type | Description |
|---|---|---|
videoId | string | YouTube video ID |
videoUrl | string | Full watch URL |
commentId | string | Unique YouTube comment ID |
text | string | Full comment text |
authorName | string | Display name of the commenter |
authorChannelId | string | Channel ID (UCxxx...) |
authorUrl | string | Link to the commenter's channel |
likeCount | integer | Number of likes on the comment |
replyCount | integer | Number of replies |
publishedAt | string | Relative time (e.g. 3 months ago) |
isPinned | boolean | Pinned by the creator |
isHearted | boolean | Hearted by the creator |
status | string | ok / no_comments / error |
Input Configuration
videoIds (required)
A list of YouTube video URLs or IDs. Accepts any format — watch URL, short URL, Shorts URL, or a bare 11-character ID. Invalid entries are skipped with a warning logged.
maxComments (default: 0 = unlimited)
Maximum comments to collect per video. Set to 0 to collect everything YouTube will return. Must be a non-negative integer.
sortBy (default: newest)
Controls comment sort order:
newest— Sorts by most recent. Supports unlimited pagination — the only way to scrape all comments on a large video.top— Sorts by highest engagement. ⚠️ YouTube limits anonymous top-comment pagination to approximately 800–900 comments regardless of how large the video's comment section is. Usetoponly when you want a representative sample of the most popular comments.
Use Cases
Sentiment analysis and brand monitoring Collect every comment on your brand's YouTube content or competitor videos to run NLP pipelines, detect negative sentiment spikes, and track topic trends over time.
Academic and social media research Extract large comment datasets for linguistic analysis, toxicity detection, misinformation studies, or community behaviour research without needing Google API quotas.
Content strategy and audience insights Identify what phrases, questions, and topics your audience repeatedly brings up. Find recurring requests for future content or products by mining comments at scale.
Influencer and creator vetting Pull comments from a creator's recent videos to gauge real audience engagement, detect bot activity (low-variety comment text, high like counts with suspicious patterns), and verify authenticity before partnerships.
Competitor intelligence Scrape comments on competitor product videos to surface complaints, feature requests, and pain points your product can address.
Moderation and compliance Build comment moderation pipelines by extracting raw comment data and running it through your own classifiers for hate speech, spam, or policy violations.
Lead generation Scrape comments on industry-relevant videos to find users asking purchasing questions or expressing intent — a common tactic for outreach in niche communities.
Training data for AI models Generate large, real-world conversation datasets for fine-tuning language models, training comment classifiers, or building YouTube-specific recommendation systems.
Performance
- Scrapes approximately 1,000–3,000 comments per minute per video depending on network latency
- Processes multiple videos concurrently (configurable via
workersin advanced settings) - Pages are fetched and pushed to the dataset immediately — no waiting for all pages to finish before data appears
- Progress is saved after every page — if the actor is interrupted or migrated, it resumes from the exact page it left off
Limitations
| Limitation | Details |
|---|---|
| Top sort cap | sortBy=top returns a maximum of ~800–900 comments. This is a YouTube server-side limit for unauthenticated requests, not a bug. Use sortBy=newest for full extraction. |
| No reply thread expansion | This actor collects top-level comments. Reply threads (nested comments) are not expanded in this version. |
| Relative timestamps | publishedAt returns YouTube's relative time string (3 months ago) not an absolute ISO date, because the Innertube API does not return parsed timestamps for comments without authentication. |
| No API key required | Uses the Innertube internal API — no YouTube Data API v3 key or quota needed. |
Sort Order Guide
sortBy=newest → Use for: complete datasets, research, archivingSupports: unlimited comments (tested to 100,000+)Order: most recent firstsortBy=top → Use for: finding viral/popular comments, quick samplesSupports: ~800-900 comments maximumOrder: highest engagement first
Example Output
{"videoId": "dQw4w9WgXcQ","videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","commentId": "Ugzge340dBgB75hWBm54AaABAg","text": "can confirm: he never gave us up","authorName": "SomeUser","authorChannelId": "UCxxxxxxxxxxxxxxxxxxxxxxxx","authorUrl": "https://www.youtube.com/@SomeUser","likeCount": 12400,"replyCount": 83,"publishedAt": "11 months ago","isPinned": false,"isHearted": true,"status": "ok"}
Migration and Resume
If the Apify platform migrates your actor run to a different server mid-scrape, the actor automatically resumes from where it left off:
- Completed videos are stored in the
COMMENTS_STATEKV store key and skipped on restart - In-progress videos save a cursor (the current page continuation token) to
CURSOR_{videoId}before every page fetch — on restart, scraping continues from that exact page rather than page 1
Frequently Asked Questions
Do I need a YouTube API key? No. This actor uses YouTube's internal Innertube API, the same endpoint YouTube's own web client uses. No API key, no OAuth, no Google Cloud project required.
Can I scrape comments from private or age-restricted videos? No. Only publicly accessible videos can be scraped. Private, members-only, and age-restricted videos require authentication which this actor does not use.
Why does sortBy=top stop at ~800 comments?
YouTube's servers limit unauthenticated pagination of top-sorted comments to approximately 60 pages (~20 comments per page). This is a YouTube-side restriction. Use sortBy=newest to bypass this and collect all comments.
Can I scrape multiple videos at once?
Yes. Add as many URLs or IDs as you want to videoIds. The actor processes them concurrently using configurable parallel workers.
What happens if the run is interrupted? The actor saves its progress (both completed videos and the current page cursor for in-progress videos) to Apify's Key-Value store. On restart it picks up exactly where it left off.
Is there a comment count limit?
For free users, the actor caps output at 100 comments. Paid users can configure maxComments per video and the platform-level dataset limit via Apify's standard ACTOR_MAX_PAID_DATASET_ITEMS environment variable. Setting maxComments=0 means unlimited (subject to your platform quota).
Does it scrape replies to comments? Not in the current version. Only top-level comments are collected. Reply thread expansion is planned for a future release.
How fast is it? Roughly 1,000 comments per 3 minutes depending on your network and the number of concurrent workers. The actor pushes results page-by-page (every ~20 comments) rather than waiting for all pages to finish, so data appears in your dataset immediately.
What URL formats are accepted?
All standard YouTube URL formats: youtube.com/watch?v=ID, youtu.be/ID, youtube.com/shorts/ID, youtube.com/embed/ID, and plain 11-character video IDs.
Can I export results to CSV or Excel? Yes. Apify datasets can be downloaded in JSON, CSV, Excel, XML, RSS, and HTML formats directly from the Apify console or via the Apify API.
Will this get my IP blocked? The actor uses randomised client version rotation and respects natural pagination timing. For high-volume scraping across many videos, enabling Apify's residential proxy (available on paid plans) is recommended to distribute requests across different IP addresses.
Legal and Ethical Use
This actor collects publicly available data from YouTube's web interface, identical to what any user sees in their browser. Users are responsible for ensuring their use of collected data complies with YouTube's Terms of Service, applicable data protection regulations (GDPR, CCPA), and their jurisdiction's laws. Do not use this tool to harass individuals, build surveillance systems, or violate user privacy.
Technical Notes
- Built on YouTube's Innertube
/nextendpoint (WEB client, no authentication) - Comment data extracted from
frameworkUpdates.entityBatchUpdate.mutations— YouTube's 2024+ polymorphic rendering system - Continuation tokens sourced from the panel content area (unlimited pagination) rather than sort-menu action tokens (60-page cap)
- Session rotation across 4 client versions on error
- PushBuffer batches dataset writes every 50 items or 3 seconds to reduce API calls
