YouTube Comments Scraper (+ Replies)
Pricing
from $0.50 / 1,000 comments
YouTube Comments Scraper (+ Replies)
Scrape public YouTube comments and replies from videos, Shorts, channels and playlists: text, author, likes, reply count, pinned/hearted/creator flags and dates. Top or newest sort, date cut-off. For sentiment analysis, audience research, lead finding and AI datasets.
Pricing
from $0.50 / 1,000 comments
Rating
0.0
(0)
Developer
Zee Lex
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Scrape public comments, and optionally their replies, from YouTube videos, Shorts, channels and playlists. Each comment comes with its author, likes, reply count, pinned, hearted and creator flags, and an estimated date. The Actor uses plain HTTP and YouTube's own InnerTube API, so it needs no browser and no login, and it runs fast at 512 MB.
What you get
- Comments and replies: the text, author name and channel, avatar, verified badge, whether the author is the video owner, pinned and hearted (by the creator) flags, likes (
"1.2K"is returned as1200), reply count, the relative date ("3 weeks ago") plus an estimated ISO date, whether the comment was edited, and a direct link to the comment (&lc=). - Video info, optional and attached to every comment: title, channel, view count, publish date and total comment count.
- Status items: one free item per video whose comments can't be scraped (comments turned off, private, unavailable or members-only, age-restricted, or error).
- RUN_SUMMARY: per-video counts (comments, replies, pages, blocks, proxy escalations, status), totals, the percentage of each field that came back empty, and an overall status of
ok,partial,no_resultsorfailed.
Input examples
Single video, top 100 comments
{ "videoUrls": ["https://www.youtube.com/watch?v=aircAruvnKk"] }
A Short, newest comments since a date
{"videoUrls": ["https://www.youtube.com/shorts/VIDEO_ID"],"sort": "newest","commentsSince": "2026-10-01","maxCommentsPerVideo": 0}
The latest 5 uploads of a channel
{"channelUrls": ["https://www.youtube.com/@3blue1brown"],"maxVideosPerChannel": 5,"maxCommentsPerVideo": 200}
With replies
{"videoUrls": ["https://youtu.be/aircAruvnKk"],"maxCommentsPerVideo": 50,"includeReplies": true,"maxRepliesPerComment": 10}
Accepted video formats include watch?v=, youtu.be/, /shorts/, /live/, /embed/ and m.youtube.com URLs, as well as bare 11-character IDs. Channels can be given as @handle, /channel/UC…, /c/… or /user/…. Playlists can be given as playlist?list=… URLs or as playlist IDs.
Output sample
{"type": "comment","commentId": "UgzKxV3d9f2kLmNoPq4AaABAg","videoId": "aircAruvnKk","videoUrl": "https://www.youtube.com/watch?v=aircAruvnKk","parentCommentId": null,"text": "This is the clearest explanation of neural networks I've ever seen.","authorName": "@someviewer","authorChannelId": "UCabc123def456ghi789jklm","authorChannelUrl": "https://www.youtube.com/channel/UCabc123def456ghi789jklm","authorAvatarUrl": "https://yt3.ggpht.com/…","isVerified": false,"isCreator": false,"isPinned": false,"isHearted": true,"likeCount": 1200,"replyCount": 14,"publishedTimeText": "2 years ago","publishedAtApprox": "2024-10-28T09:12:00.000Z","isEdited": false,"commentUrl": "https://www.youtube.com/watch?v=aircAruvnKk&lc=UgzKxV3d9f2kLmNoPq4AaABAg","scrapedAt": "2026-10-28T09:12:00.000Z","videoTitle": "But what is a neural network?","channelName": "3Blue1Brown","channelId": "UCYO_jab_esuFRV4b17AJtAw","videoViewCount": 21000000,"videoPublishedAt": "2017-10-05T00:00:00.000Z","totalCommentCount": 10000}
A reply has "type": "reply", and its parentCommentId is set to the ID of the comment it answers.
{ "type": "video_status", "videoId": "abcdefghijk", "videoUrl": "https://www.youtube.com/watch?v=abcdefghijk", "status": "comments_disabled", "message": "Comments are turned off." }
Use cases
- Sentiment analysis: see how viewers react to launches, ads, trailers or competitors' videos.
- Audience research: find recurring questions, objections, feature requests and content ideas.
- Lead finding: identify people asking for tools, services or help in your niche, with links to their channels.
- Giveaways: export every commenter with
maxCommentsPerVideo: 0, then dedupe byauthorChannelId. - AI datasets: build clean, deduplicated comment and reply text with engagement signals.
Limitations
- Only public comments are collected. The Actor never logs in, so members-only and private videos come back as status items.
- Dates are approximate. YouTube only shows relative times such as "3 weeks ago", so
publishedAtApproxis estimated (1 month is counted as 30 days and 1 year as 365 days).commentsSinceis equally approximate. Withsort: "top"the date is only used as a filter, while withsort: "newest"paging stops as soon as older comments appear. Pinned comments are ignored for that stop. maxCommentsPerVideocounts top-level comments only. Replies are limited separately bymaxRepliesPerComment, so a run can save more items in total thanmaxCommentsPerVideo.totalCommentCountis YouTube's rounded header value, for example"1.2K".- YouTube can show slightly different comment sets from one session to the next, and it hides some comments (spam filtering or "held for review").
- YouTube changes its page layout often. All layout knowledge is kept in
src/mappings.ts, so a change usually needs a small edit to that one file. - Heavy runs can trigger YouTube's "confirm you're not a bot" check. Blocked requests are retried on a fresh session with exponential backoff, and from the second retry onwards they move to RESIDENTIAL proxy (up to 4 retries). If your RUN_SUMMARY shows many blocks, lower
maxConcurrency.
Pricing
Pay per event: $0.80 per 1,000 comments on the Free plan ($0.70 Bronze, $0.60 Silver, $0.50 Gold and above). Each comment and each reply is charged as the custom event comment. Status items are free. The run stops cleanly once your maximum charge is reached.
Development
npm installnpm test # unit tests (fixtures) and live-fixture tests if capturednpm run mock-server # offline YouTube mock on :4599YT_BASE_URL=http://localhost:4599 npx apify-cli run # end-to-end against the mocknpm run capture-fixtures # save real YouTube responses to test/fixtures/live/ (needs network)