YouTube Comments Scraper (with Replies)
Pricing
from $1.00 / 1,000 scraped comments
YouTube Comments Scraper (with Replies)
Scrape YouTube comments and replies from videos and Shorts by URL or ID. Returns author, text, likes, reply count, timestamps and pinned/hearted status. No API key; works with Apify MCP and the API.
Pricing
from $1.00 / 1,000 scraped comments
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
23
Total users
2
Monthly active users
13 days ago
Last modified
Categories
Share
What is YouTube Comments Scraper?
This Apify Actor is built for analysts, researchers, and automation workflows that need structured YouTube comment data from public videos. It accepts either full YouTube video URLs or bare 11-character video IDs, and it can process multiple videos in one run. Each output record represents one comment or reply, with fields such as author name, comment text, like count, reply count, relative publish time plus an approximate ISO timestamp (published_at_iso), pinned status, hearted status, and the source video reference. The result is a dataset you can export, read through the Apify API, or use from Apify MCP.
Best fit and connected workflows
This Actor fits workflows centered on comment-level analysis from public YouTube videos, especially when you need clean records for AI, reporting, or enrichment.
Common routing patterns include:
- Video research workflows that start from a list of YouTube URLs or IDs and need comment text plus metadata.
- Social listening workflows that review likes, replies, pinned comments, and creator hearts across several videos.
- AI and automation workflows that consume structured comment records through Apify API or Apify MCP.
- Multi-video collection jobs where each comment record keeps its source video ID and source URL for traceability.
Focused standalone workflow
YouTube Comments Scraper is designed as a focused standalone workflow.
Example scenario
Maya is preparing a content brief for a product tutorial video. She already has the video URL and wants to understand what viewers are asking in the comments. She runs this Actor with the video URL, a moderate comment cap, and replies enabled. The dataset returns author names, comment text, like counts, reply counts, pinned status, hearted status, and relative timestamps. Maya uses those fields to identify repeated questions, then drafts follow-up topics for the next video.
Input
| Field | Type | Purpose | Notes |
|---|---|---|---|
startUrls | array | YouTube video URLs | Use for full URLs, short links, and Shorts URLs. Multiple URLs are supported. |
videoIds | array | Bare YouTube video IDs | Use for 11-character video IDs. Multiple IDs are supported. |
maxComments | integer | Maximum comments per video | Minimum 1, maximum 10000. Replies count toward this total when included. |
includeReplies | boolean | Include reply comments | When enabled, reply comments are collected under top-level comments. |
Valid focused JSON example
{"startUrls": [{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}],"videoIds": ["dQw4w9WgXcQ"],"maxComments": 250,"includeReplies": true}
Output
Each dataset record represents one scraped comment or reply. The dataset schema includes identifiers for the source video and comment, author details, engagement signals, reply structure, timestamps, and provenance fields.
| Field | Type | Purpose |
|---|---|---|
video_id | string | YouTube video ID for the source video. |
video_title | string or null | Title of the source video when available. |
video_url | string | Full URL of the source video. |
comment_id | string or null | Unique identifier for the comment. |
comment_text | string or null | Full comment text. |
author_name | string or null | Display name of the commenter. |
author_channel_url | string or null | URL of the author channel. |
author_channel_id | string or null | Internal YouTube channel ID for the author. |
like_count | integer or null | Number of likes on the comment. |
reply_count | integer or null | Number of replies on a top-level comment. |
is_reply | boolean | True for reply comments. |
parent_comment_id | string or null | Parent comment ID for replies. |
published_at | string or null | Relative timestamp shown by YouTube. |
published_at_iso | string or null | Approximate absolute publish time computed from the relative text at scrape time. |
is_pinned | boolean | True when the creator pinned the comment. |
is_hearted | boolean | True when the creator hearted the comment. |
scraped_at | string | ISO 8601 timestamp of when the record was scraped. |
source_url | string | Exact YouTube video URL used for the scrape. |
Sample JSON record (real run)
{"video_id": "jNQXAC9IVRw","video_title": "Me at the zoo","video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw","comment_id": "UgzuC3zzpRZkjc5Qzsd4AaABAg","comment_text": "We're so honored that the first ever YouTube video was filmed here!","author_name": "@SanDiegoZoo","author_channel_url": "https://www.youtube.com/channel/UCC5NfQ6Mf0dq_eEwv4P_hWA","author_channel_id": "UCC5NfQ6Mf0dq_eEwv4P_hWA","like_count": 4800000,"reply_count": 985,"is_reply": false,"parent_comment_id": null,"published_at": "6 years ago","published_at_iso": "2020-10-17T07:57:55.281Z","is_pinned": false,"is_hearted": false,"scraped_at": "2026-10-16T07:57:55.255Z","source_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"}
How it works
The Actor opens each public video, reads its comment threads page by page, and, when includeReplies is on, expands reply threads. If the main route returns no comments for a video, a fallback data route is tried before the video is reported empty. Invalid or empty inputs end with a clear status message and a finished run, so you can fix the input and run again.
Pricing
YouTube Comments Scraper uses Pay per event pricing on the Apify platform. Pricing includes a small Actor start event plus per-comment events, and Apify platform usage is charged separately according to the live Pricing tab in the Apify Store.
The charged events are:
- Actor start: charged once when the Actor starts, based on allocated memory
- Scraped comment: charged for each comment scraped, including replies when replies are enabled
For example, a run that scrapes one hundred comments generates one hundred scraped-comment events, plus one Actor start event. For current charge details and platform usage information, review the live Pricing tab before running.
Use with AI agents (MCP)
This Actor is usable through Apify MCP as a structured comment-scraping tool for public YouTube videos. The exact Actor identity is khadinakbar/youtube-comments-scraper.
A practical MCP prompt might look like this:
Extract comments from these public YouTube videos, keep replies enabled, and return author names, comment text, likes, reply counts, pinned status, hearted status, and source URLs for each record.
Output interpretation is straightforward: each dataset item is one comment or reply, and the fields include enough provenance to map each record back to the source video. The is_reply and parent_comment_id fields show reply structure, while video_id, video_url, and source_url preserve the source context. Pagination is handled by the Actor, and each additional comment or reply adds to the per-event charge described in Pricing.
Run it with the Apify API
import { ApifyClient } from 'apify-client';const client = new ApifyClient({token: process.env.APIFY_TOKEN,});const run = await client.actor('khadinakbar/youtube-comments-scraper').call({startUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],maxComments: 50,includeReplies: true,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Best results and outcome guidance
Use direct video URLs when you already have links, and use bare video IDs when your source list is just IDs. If you want a broader view of the conversation, enable replies. If you need a tighter top-level summary, keep replies off and focus on comment_text, like_count, and reply_count. For multi-video jobs, keep each input item separate so the resulting dataset preserves source context across videos.
Continue the workflow
- Use YouTube Shorts Scraper to find Shorts by keyword, channel or hashtag, then pass their URLs here for comments.
- Use Video Transcript & Subtitle Extractor to add the spoken content of the same videos next to their comments.
Design note
I found that the output contract always includes video_id, video_url, is_reply, is_pinned, is_hearted, scraped_at, and source_url as required fields. That visible contract fact makes provenance and comment-type handling consistent across every record.
FAQ
When should I use startUrls instead of videoIds?
Use startUrls when you have full YouTube links, including standard watch URLs, short links, or Shorts URLs. Use videoIds when your source data contains bare 11-character video IDs.
Can one run process several videos?
Yes. Both startUrls and videoIds accept multiple entries, so one run can collect comments from more than one video.
What fields are most useful for comment review?
comment_text, author_name, like_count, reply_count, is_reply, is_pinned, is_hearted, and published_at are the most direct review fields. video_title and source_url help keep records organized across videos.
Is this Actor usable from Apify MCP?
Yes. Call khadinakbar/youtube-comments-scraper through Apify MCP or the API and read the dataset rows.
How are replies represented?
Replies appear as separate records with is_reply set to true and parent_comment_id pointing to the parent comment when available. Top-level comments have is_reply set to false.
Why do I get fewer comments than the count shown on YouTube?
YouTube's displayed count includes replies, held-for-review and removed comments. Turn on includeReplies to collect replies too, and raise maxComments if the run stopped at the cap.
Does it work with Shorts?
Yes. Pass a youtube.com/shorts/… URL in startUrls or the Short's 11-character ID in videoIds.
What happens if comments are turned off?
The video returns no rows and no comment events are charged for it. The run still finishes successfully.
Where can I find the live pricing details?
Use the Pricing tab in the Apify Store page for the current Pay per event setup and platform usage information.
Responsible use
YouTube is a trademark of its owner. This independent Actor is not affiliated with, associated with, or endorsed by YouTube.
Use this Actor for public YouTube content and follow applicable laws, platform terms, and data protection rules for your use case.