YouTube Comments Scraper — Comments & Replies Export
Pricing
from $0.20 / 1,000 results
YouTube Comments Scraper — Comments & Replies Export
YouTube comments scraper that exports comments and full reply threads from videos, Shorts, playlists and channels: text, author, likes, parentId, pinned/hearted flags, time estimate. JSON, CSV, Excel. From $0.20 per 1,000 results.
Pricing
from $0.20 / 1,000 results
Rating
0.0
(0)
Developer
Alexandre Manguis
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 days ago
Last modified
Categories
Share
What does it do?
Overview
This YouTube comments scraper collects the public comments and their reply threads from YouTube videos, Shorts, playlists and channels, and returns one flat row per comment or reply. Every row links back to its parent (parentId, threadDepth), so conversations are easy to rebuild. Results can be downloaded as JSON, CSV, Excel, XML or HTML, or read through the Apify API.
It uses YouTube's own public web responses. No login, no cookies and no YouTube API key are needed. Only comments visible to any visitor are collected.
Use cases
- Brand and community managers — read what viewers say under your videos and your competitors' videos.
- Researchers and data teams — build comment datasets for sentiment analysis, topic modelling or LLM fine-tuning.
- Creators and agencies — find questions, feature requests and pinned or creator-hearted comments.
- Moderation and audits — export a full thread with author channel IDs for review.
Features
- Top-level comments and replies in one dataset (replies on by default).
- Accepts video URLs (watch, youtu.be, Shorts, embed), bare 11-character video IDs, playlist URLs and channel URLs (
@handle,/channel/UC…). Playlists and channels expand to their latest videos. - Sort by Top or Newest, as offered by YouTube.
- Thread fields:
parentId,threadDepth, andthreadText(the whole thread as plain text on each top-level comment, handy for LLM prompts). - Flags:
isPinned,isHeartedByCreator,isChannelOwner,isVerifiedAuthor,isMember,isEdited. publishedAtEstimate: YouTube only shows relative times ("6 years ago"), so an approximate ISO date is computed from it. It is an estimate, and only for English (language: "en").- Hard caps (
maxResults,maxCommentsPerVideo,maxRepliesPerComment) to control cost.
Input
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
startUrls (required) | array | — | Video, Shorts, playlist or channel URLs, or bare video IDs. |
maxVideosPerSource | integer | 5 | Videos to expand per playlist or channel (1–500). |
maxCommentsPerVideo | integer | 100 | Max top-level comments per video (1–100000). Replies are counted separately. |
includeReplies | boolean | true | Fetch the reply thread under each comment. |
maxRepliesPerComment | integer | 50 | Max replies per top-level comment (0 = none). |
sortBy | string | top | top or newest. |
maxResults | integer | 200 | Hard cap on total rows (comments + replies) for the run. |
language | string | en | Interface language (hl). Date estimates only work for English. |
proxyConfiguration | object | Apify datacenter | Switch to residential only if YouTube shows consent or "unusual traffic" pages. |
Example input
{"startUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"maxCommentsPerVideo": 20,"includeReplies": true,"maxRepliesPerComment": 5,"sortBy": "top","maxResults": 60}
Output
Example output
Each row is a comment or a reply. Sample (shortened, author data replaced by placeholders):
[{"type": "comment","commentId": "UgxExampleCommentId000","parentId": null,"threadDepth": 0,"videoId": "jNQXAC9IVRw","videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw","videoTitle": "Me at the zoo","text": "Example comment text.","authorName": "@example-author","authorChannelId": "UCxxxxxxxxxxxxxxxxxxxxxx","authorChannelUrl": "https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx","isChannelOwner": false,"isVerifiedAuthor": true,"isMember": false,"likeCount": 120,"replyCount": 3,"isHeartedByCreator": true,"isPinned": true,"isEdited": false,"publishedTimeText": "6 years ago","publishedAtEstimate": "2020-10-04T00:00:00.000Z","threadText": "@example-author: Example comment text.\n@example-replier: Example reply. …","position": 1,"sortBy": "top","scrapedAt": "2026-10-04T07:44:20.368Z","error": null},{"type": "reply","commentId": "UgxExampleCommentId000.ExampleReplyId","parentId": "UgxExampleCommentId000","threadDepth": 1,"text": "Example reply.","authorName": "@example-replier","likeCount": 5,"replyCount": null,"threadText": null,"position": 2}]
Output fields and fill rates
Fill rates are measured on a real Apify run (41 rows, run rXFDAUvYaN4UMicDJ). Lower values are expected: parentId is only set on replies, and replyCount / threadText only on top-level comments.
| Field | Fill rate | Notes |
|---|---|---|
type, commentId, text, threadDepth, position, sortBy | 100% | type is comment or reply. |
videoId, videoUrl, videoTitle, sourceUrl | 100% | |
authorName, authorChannelId, authorChannelUrl | 100% | |
likeCount, publishedTimeText, publishedAtEstimate | 100% | Date is an estimate. |
isChannelOwner, isVerifiedAuthor, isMember, isPinned, isHeartedByCreator, isEdited | 100% | |
scrapedAt | 100% | |
replyCount | 80% | Top-level comments only. |
threadText | 80% | Top-level comments only. |
parentId | 20% | Replies only. |
error | 0% | null on normal rows. |
How to use via API
Calling the Actor
Replace YOUR_APIFY_TOKEN with your token. Actor ID: prosoralex~youtube-comments-replies-export (check the exact owner/name on the Actor page).
curl
curl -X POST "https://api.apify.com/v2/acts/prosoralex~youtube-comments-replies-export/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"startUrls":["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"maxResults":60}'
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('prosoralex/youtube-comments-replies-export').call({startUrls: ['https://www.youtube.com/watch?v=jNQXAC9IVRw'],includeReplies: true,maxResults: 60,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.length);
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("prosoralex/youtube-comments-replies-export").call(run_input={"startUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"includeReplies": True,"maxResults": 60,})items = client.dataset(run["defaultDatasetId"]).list_items().itemsprint(len(items))
Pricing
Pay per result
Pay per result: you are charged per dataset row (a comment or a reply). The price per 1,000 results depends on your Apify plan:
| Plan | Price per 1,000 results |
|---|---|
| Free | $0.30 |
| Bronze | $0.26 |
| Silver | $0.23 |
| Gold and above | $0.20 |
Apify platform usage (compute) is billed separately by Apify. In our test runs it was a fraction of a cent for 25–41 rows. Set maxResults to cap your spending.
Troubleshooting
Common issues
- Fewer rows than expected —
maxResults,maxCommentsPerVideoormaxRepliesPerCommentstopped the run, or the video has comments disabled or few comments. - Consent or "unusual traffic" pages — switch
proxyConfigurationto Apify residential proxies. publishedAtEstimateis empty — it is only computed for English; keeplanguageaten.- Input error "startUrls is required" — provide at least one URL or video ID.
- Private, deleted or age-restricted videos — only publicly visible comments are available; no login is used.
FAQ
Frequently asked questions
Do I need a YouTube API key? No.
Are replies included? Yes, by default. Set includeReplies to false to get top-level comments only.
Is the date exact? No. YouTube shows relative times, so publishedAtEstimate is approximate; the original text is in publishedTimeText.
Can I scrape a whole channel? Yes: give a channel URL and set maxVideosPerSource. The latest videos are expanded.
Is it legal? The Actor collects only publicly visible data. Comments contain personal data (names, channel IDs), so handle them according to GDPR and local law, and respect YouTube's terms. Use is at your own responsibility.
Keywords
youtube comments scraper, youtube replies scraper, youtube comments export, youtube comment replies, export youtube comments to csv, youtube comments dataset, youtube comments sentiment analysis, youtube comments api alternative, youtube shorts comments
Hashtags
#youtube #youtubecomments #commentsscraper #webscraping #sentimentanalysis #dataset #socialmedia #apify