YouTube Comments Scraper: Replies, Shorts, Channels
Pricing
from $0.30 / 1,000 comments
YouTube Comments Scraper: Replies, Shorts, Channels
Scrape YouTube comments and replies from videos, Shorts, channels, playlists and search. Top or newest sort, keyword and date filters, pinned and creator-hearted flags, likes, reply counts, comment IDs and dates. Only delivered comments are charged.
Pricing
from $0.30 / 1,000 comments
Rating
0.0
(0)
Developer
ZH Tech
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Scrape YouTube comments and replies in bulk from videos, Shorts, whole channels, playlists and YouTube search, in one run. Every comment row comes with its comment ID, the full text, author name and channel, like count, reply count, pinned and hearted by creator flags, whether the author is the video creator, the parent comment ID for replies, the relative time YouTube shows plus a best effort absolute date, and the video it belongs to.
You only pay for comments that were actually delivered. Videos with comments turned off, videos without comments, removed videos and anything else that fails come back as free rows with a clear error code, so you always know why.
Built and maintained by ZH Tech.
What can this YouTube Comments Scraper do?
- Every kind of input in one field: watch links, youtu.be links, Shorts and live links, bare video IDs, channels (
@handle,/channel/UC...,/c/,/user/, or a tab such as/@name/shorts), playlists and YouTube search URLs. Add plain search queries in a separate field. Duplicate videos are removed. - Whole comment sections: set a limit per video or use 0 to get every comment. Comments are paged with the same protocol the YouTube website uses and de-duplicated by comment ID.
- Replies done right: turn on replies and each reply becomes its own row with
isReply: trueandparentCommentId, placed right after its parent, with a separate limit per thread. - Top or Newest first: YouTube's own ranking, or newest first for monitoring brand mentions and new feedback.
- Filters that save money: keep only comments containing your keywords, or only comments newer than a date (with Newest first the actor stops paging as soon as comments get too old). Filtered comments are never charged.
- Channels, playlists and searches: scrape the comments of the newest videos of a channel (videos, Shorts, past live streams), any playlist, or the top results of a search, with a max videos per source and a video age filter.
- Rich flags: pinned comment, creator heart, comment by the channel owner, verified author, artist channel, edited comment.
- Works on age restricted videos: their comments are public and returned without login.
- Built to avoid blocking: Apify Proxy with session rotation, retries, and automatic escalation from datacenter to residential IPs only for requests YouTube blocks. Responses are trimmed with field masks, so runs are fast and cheap.
- Never crashes on a bad video: each problem becomes a free row with an
errorCode.
Use cases
- Sentiment analysis and audience research: collect thousands of comments on your videos or a competitor's and feed them to an LLM or a sentiment model.
- Product feedback and brand monitoring: schedule Newest first runs with a date filter and a keyword list (your brand, product or feature names) and push new mentions to Slack or Google Sheets.
- Market research: search a topic (for example "robot vacuum review") and analyze what viewers praise and complain about across the top videos.
- Creator tools: find the questions your audience asks, the comments you hearted, and the threads with the most replies.
- Influencer and lead research: see which channels comment on videos in your niche (author channel URL on every row).
- AI training data: build datasets of real conversations with thread structure intact.
How to use it
- Click Try for free.
- Paste video or Shorts URLs into YouTube URLs or IDs. You can also paste a channel, playlist or search URL, or add Search queries.
- Set Max comments per video, choose Top or Newest first, and turn on Include replies if you need them.
- Click Start. Comments appear in the Output tab within seconds. Download them as JSON, CSV, Excel, XML or HTML, or fetch them via the API.
Input examples
All comments of one video, newest first:
{"urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"maxCommentsPerVideo": 0,"sortBy": "newest"}
Top 200 comments with up to 5 replies each, for the 10 newest videos of a channel:
{"urls": ["https://www.youtube.com/@3blue1brown"],"maxVideosPerSource": 10,"channelContentTypes": ["videos"],"maxCommentsPerVideo": 200,"includeReplies": true,"maxRepliesPerThread": 5}
Brand monitoring: comments from the last 7 days that mention a product, across the top search results:
{"searchQueries": ["pixel 10 review"],"maxVideosPerSource": 15,"sortBy": "newest","commentsPublishedAfter": "7 days","keywords": ["battery", "camera", "price"],"maxCommentsPerVideo": 0}
All input options
| Field | Type | Default | What it does |
|---|---|---|---|
urls | array | Videos, Shorts, channels, playlists or search URLs, or bare video IDs | |
searchQueries | array | Plain search queries | |
maxVideosPerSource | integer | 10 | Videos per channel, playlist or search (0 = all) |
channelContentTypes | array | videos, shorts, streams | Which channel uploads to include |
searchSort | string | relevance | relevance or views (popularity). YouTube no longer sorts searches by upload date or rating: old inputs with date run as relevance, rating as views, with a log note |
videoPublishedAfter | string | Skip older videos from channels, playlists and searches (date or "30 days") | |
maxCommentsPerVideo | integer | 100 | Top level comments per video (0 = all). Replies have their own limit |
sortBy | string | top | top or newest |
includeReplies | boolean | false | Add replies as separate rows |
maxRepliesPerThread | integer | 10 | Replies per comment (0 = all) |
keywords | array | Only comments containing at least one of these (not case sensitive) | |
commentsPublishedAfter | string | Only comments newer than this date or period | |
skipPinnedComment | boolean | false | Leave out the pinned comment |
includeErrorItems | boolean | true | Free rows for videos without comments |
maxComments | integer | 0 | Stop the run after this many rows in total (0 = no limit) |
maxConcurrency | integer | 8 | Videos in parallel |
maxRetries | integer | 5 | Retries per request with a fresh proxy session |
proxyConfiguration | object | Apify Proxy | Proxy settings |
residentialFallback | boolean | true | Retry blocked requests on residential IPs |
Output example
One row per comment or reply:
{"status": "success","commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg","videoId": "jNQXAC9IVRw","videoTitle": "Me at the zoo","videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw","commentUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg","text": "We're so honored that the first ever YouTube video was filmed here!","authorName": "@SanDiegoZoo","authorHandle": "@SanDiegoZoo","authorChannelId": "UCC5NfQ6Mf0dq_eEwv4P_hWA","authorChannelUrl": "https://www.youtube.com/channel/UCC5NfQ6Mf0dq_eEwv4P_hWA","authorAvatarUrl": "https://yt3.ggpht.com/...","authorIsVerified": true,"authorIsChannelOwner": false,"authorIsArtist": false,"likeCount": 4800000,"likeCountText": "4.8M","replyCount": 986,"isPinned": true,"isHeartedByCreator": true,"isReply": false,"parentCommentId": null,"isEdited": false,"publishedTimeText": "6 years ago","publishedAt": "2020-11-17","publishedAtPrecision": "year","position": 1,"sortedBy": "top","videoChannelId": "UC4QobU6STFB0P71PMvOGN5A","videoChannelName": "jawed","videoCommentCount": 10000000,"videoCommentCountText": "10M","input": "https://www.youtube.com/watch?v=jNQXAC9IVRw","source": "video:jNQXAC9IVRw","scrapedAt": "2026-11-16T03:21:48+00:00"}
A reply has isReply: true, parentCommentId set to the top level comment, and a commentId like PARENTID.REPLYID.
A video without comments returns a free row:
{"status": "error","errorCode": "COMMENTS_DISABLED","errorMessage": "Comments are turned off for this video. Not charged.","videoId": "XXXXXXXXXXX","videoUrl": "https://www.youtube.com/watch?v=XXXXXXXXXXX"}
The Output tab has ready made views: Overview, Threads (IDs to rebuild conversations), Authors, and Videos without comments.
Error codes
| Code | Meaning |
|---|---|
COMMENTS_DISABLED | The creator turned comments off |
NO_COMMENTS | The video has no comments yet |
NO_MATCHING_COMMENTS | Comments exist, but none matched your keyword or date filters |
VIDEO_UNAVAILABLE | The video does not exist, is private or was removed |
BLOCKED | YouTube kept refusing requests after all retries (rare) |
FETCH_FAILED | Unexpected error for this video |
LISTING_FAILED, CHANNEL_NOT_FOUND | A channel, playlist or search could not be listed |
INVALID_INPUT | The input is not a YouTube URL or ID |
Each run also saves a RUN_SUMMARY record in its key-value store with counts, pages fetched, time taken and proxy statistics.
How much does it cost to scrape YouTube comments?
This actor uses pay per event pricing:
- Comment: charged once per comment or reply row delivered (
status: "success"). Error rows and filtered comments are free. - Actor start: a tiny fixed fee per run.
The exact prices are on the Pricing tab. Platform usage (compute and proxy) is included, so the price you see is the price you pay. Cap your spend with Max comments in total or the "Maximum cost per run" setting: the actor checks the remaining budget before every batch and stops cleanly instead of overspending.
Tips to keep costs low:
- Set Max comments per video to what you really need. The top 100 comments usually carry most of the signal.
- Use keyword and date filters: non matching comments are never charged.
- Replies can multiply the row count on popular videos. Keep Max replies per comment small unless you need full threads.
Use with the API, integrations, LLMs and MCP
API
Run the actor and get the results in one request (replace YOUR_TOKEN):
curl -X POST "https://api.apify.com/v2/acts/zhtech~youtube-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "maxCommentsPerVideo": 50}'
Python:
from apify_client import ApifyClientclient = ApifyClient("YOUR_TOKEN")run = client.actor("zhtech/youtube-comments-scraper").call(run_input={"urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"maxCommentsPerVideo": 500,"includeReplies": True,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():if item["status"] == "success":print(item["likeCount"], item["text"][:80])
JavaScript:
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_TOKEN' });const run = await client.actor('zhtech/youtube-comments-scraper').call({urls: ['https://www.youtube.com/shorts/V_uq3v6xK-4'],sortBy: 'newest',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.length, 'comments');
Integrations
Connect the actor to Make, Zapier, n8n, Google Sheets, Slack, Airtable, webhooks and more from the Integrations tab. A typical flow: schedule a daily Newest first run with commentsPublishedAfter: "1 day" on your latest videos, then send new comments to a sentiment or summary step and post the result to Slack.
Using it with LLMs and AI agents (MCP)
The actor works as a tool for AI agents through the Apify MCP server (mcp.apify.com). Add zhtech/youtube-comments-scraper as a tool in Claude, Cursor, VS Code or any other MCP client, then ask things like "What do viewers complain about in the comments of this video?" or "Find comments that mention pricing on the last 5 videos of @mkbhd". Keep maxCommentsPerVideo modest (100 to 300) for LLM prompts; the text, likeCount and isReply fields are usually all a model needs.
FAQ
Can I get all comments of a video? Yes. Set Max comments per video to 0. Very large videos (millions of comments) take a while; YouTube serves about 20 comments per page.
Why is the number of comments lower than the count shown on YouTube? YouTube's count includes replies and comments that were later deleted or held for review. Turn on replies (with Max replies per comment set to 0) to get as close as possible. Comments hidden by YouTube's spam filter are never shown to anyone.
Does it scrape replies?
Yes, when Include replies is on. Each reply is its own row with parentCommentId, so you can rebuild every thread.
Are the dates exact?
YouTube only shows relative times such as "3 weeks ago". The actor keeps that text in publishedTimeText and computes publishedAt from it, with publishedAtPrecision telling you how precise it is (minute, hour, day, week, month or year). With Newest first, recent comments are accurate to the minute or hour.
Are like counts exact?
For counts below 1,000 yes. Above that YouTube only shows rounded values such as 4.8M; likeCount is that value as a number and likeCountText is the original.
Can I get dislikes? No. YouTube does not show dislike counts for comments to anyone.
Does it work for Shorts and live stream replays? Yes. Shorts comments and the comments of past live streams work like any video. Live chat messages are not comments and are not included.
Can I scrape comments of private or members only videos? No. The actor never logs in and only reads public comments. Age restricted videos do work.
Is it legal to scrape YouTube comments? The actor only collects publicly visible data. Comments contain personal data such as usernames, so make sure you have a legitimate purpose, store data responsibly and follow YouTube's terms and privacy laws like GDPR. If you are unsure, consult a lawyer.
Limitations
- Comment dates are relative on YouTube;
publishedAtis computed with the precision shown inpublishedAtPrecision. - Large like and comment counts are rounded by YouTube (for example 4.8M, 9.5K).
- Comments on community posts and live chat messages are not supported.
- With a keyword filter (or a date filter with Top sort) the actor scans up to 25 times your per video limit, at least 2,000 comments, per video before moving on.
videoPublishedAfteruses the upload age YouTube shows in listings (for example "2 weeks ago"), so it is approximate at the edges.
Support
Found a problem or need a feature? Open an issue on the Issues tab with the run ID and the video URL.