YouTube Comments Scraper (with Replies) avatar

YouTube Comments Scraper (with Replies)

Pricing

from $2.00 / 1,000 scraped comments

Go to Apify Store
YouTube Comments Scraper (with Replies)

YouTube Comments Scraper (with Replies)

Extract comments and replies from YouTube videos by URL or ID. Returns author, text, likes, reply count, timestamps, pinned/hearted status. No API key required. Export scraped data, run via API, schedule and monitor runs, or integrate with other tools.

Pricing

from $2.00 / 1,000 scraped comments

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

9 days ago

Last modified

Share

๐ŸŽฏ YouTube Comments Scraper โ€” Extract Comments & Replies, No API Key

What does YouTube Comments Scraper do?

YouTube Comments Scraper extracts structured comment data from any public YouTube video โ€” including replies, author details, like counts, pinned status, and creator hearts โ€” without requiring a YouTube Data API key or any login. Feed it a list of video URLs or bare video IDs and it returns a clean, AI-ready JSON dataset.

Why use YouTube Comments Scraper?

  • No API key needed โ€” unlike the official YouTube Data API (which has strict daily quotas of 10,000 units), this actor uses YouTube's internal InnerTube API via a real browser session, giving you unlimited access
  • Replies included โ€” most basic scrapers only capture top-level comments; this actor optionally digs into reply threads too
  • Video metadata included โ€” every comment record includes the video title and URL, so multi-video datasets stay organized
  • MCP and AI-agent ready โ€” clean field names, consistent output schema, and no junk fields means Claude, ChatGPT, and other LLM tools can use this data directly

What data can YouTube Comments Scraper extract?

FieldTypeDescriptionExample
video_idstringYouTube video IDdQw4w9WgXcQ
video_titlestringTitle of the video"Rick Astley - Never Gonna Give You Up"
video_urlstringFull video URLhttps://youtube.com/watch?v=dQw4w9WgXcQ
comment_idstringUnique comment IDUgxK8eTB1234abcde
comment_textstringFull comment text"This is a timeless classic!"
author_namestringCommenter's display nameJohn Doe
author_channel_urlstringLink to commenter's channelhttps://youtube.com/@johndoe
author_channel_idstringInternal YouTube channel IDUCuAXFkgsw1L7xaCfnd5JJOw
like_countintegerNumber of likes on the comment142
reply_countintegerNumber of replies (top-level only)5
is_replybooleanTrue if this is a reply commentfalse
parent_comment_idstringID of the parent comment (replies only)null
published_atstringRelative time posted (as shown by YouTube)"3 months ago"
is_pinnedbooleanTrue if pinned by the creatorfalse
is_heartedbooleanTrue if the creator gave it a hearttrue
scraped_atstringISO 8601 timestamp of scrape2026-04-09T12:00:00.000Z
source_urlstringThe exact URL scrapedhttps://youtube.com/watch?v=...

How to Scrape YouTube Comments

Step 1 โ€” Add video URLs or IDs

In the YouTube Video URLs field, paste one or more YouTube links:

https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://youtu.be/9bZkp7q19f0
https://www.youtube.com/shorts/abc123def45

Alternatively, use the Video IDs field to paste bare 11-character IDs, one per line:

dQw4w9WgXcQ
9bZkp7q19f0

You can use both fields simultaneously and the actor will deduplicate automatically.

Step 2 โ€” Configure limits

Set Max Comments per Video to control how many comments to collect per video. The default is 100. For large comment sections, set it higher (up to 10,000). Each comment costs $0.002.

Step 3 โ€” Enable replies (optional)

Toggle Include Replies to also collect reply threads under top-level comments. Replies count toward the maxComments limit and are each charged at the same rate.

Step 4 โ€” Run and export

Click Start and the actor will run. When finished, your dataset is available to download as JSON, CSV, Excel, or HTML. You can also access it via the Apify API.


Use Cases

Sentiment analysis and brand monitoring โ€” scrape comments from your brand's videos or competitors' videos to understand audience sentiment. Feed the comment_text field directly into an LLM for classification.

Content research โ€” analyze what viewers are asking, praising, or complaining about on tutorial and product-review videos. Find FAQ topics your own content should address.

AI training datasets โ€” build large corpora of human-written YouTube comments for fine-tuning language models, training toxicity classifiers, or creating synthetic conversation datasets.

Influencer analysis โ€” assess engagement quality on creator channels by analyzing comment-to-like ratios, creator heart frequency, and reply activity patterns.

Academic research โ€” scrape public comment sections for social media research, political discourse analysis, or online community studies.

Competitor monitoring โ€” collect comments from competitor product videos to understand pain points and feature requests you can act on.


Pricing

This actor uses Pay-Per-Event pricing โ€” you only pay for what you actually scrape.

EventCost
Actor start$0.00005 per GB of memory
Scraped comment$0.002 per comment

Cost examples

CommentsCost
100 comments$0.20
500 comments$1.00
1,000 comments$2.00
5,000 comments$10.00

You can cap spending using Apify's built-in Max total charge setting in the actor's run configuration.


Input Parameters

ParameterTypeDefaultDescription
startUrlsURL listโ€”YouTube video URLs to scrape
videoIdsString listโ€”Bare video IDs (11-char strings)
maxCommentsInteger100Max comments per video (1โ€“10,000)
includeRepliesBooleanfalseAlso scrape reply threads

Output Format

Each record in the output dataset corresponds to one comment (or reply). Here is a sample output record:

{
"video_id": "dQw4w9WgXcQ",
"video_title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"comment_id": "UgxK8eTB9abc1234defg",
"comment_text": "This song genuinely never gets old. It's been 35+ years and it still slaps.",
"author_name": "Jane Smith",
"author_channel_url": "https://www.youtube.com/@janesmith",
"author_channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"like_count": 142,
"reply_count": 5,
"is_reply": false,
"parent_comment_id": null,
"published_at": "3 months ago",
"is_pinned": false,
"is_hearted": true,
"scraped_at": "2026-04-09T12:00:00.000Z",
"source_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}

Running via the Apify API

You can trigger this actor programmatically using the Apify JavaScript client:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_API_TOKEN' });
const run = await client.actor('USERNAME/youtube-comments-scraper').call({
startUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],
maxComments: 500,
includeReplies: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Or with curl:

curl -X POST "https://api.apify.com/v2/acts/USERNAME~youtube-comments-scraper/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"startUrls": [{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}],
"maxComments": 200,
"includeReplies": false
}'

Technical Details

This actor uses PlaywrightCrawler (a real Chromium browser) to open YouTube video pages and then issues API calls to YouTube's internal InnerTube endpoint (/youtubei/v1/next) from within the browser context. This approach:

  • Uses the browser's existing cookies and session tokens, so no API key is needed
  • Avoids bot detection because requests originate from a real browser
  • Handles comment pagination automatically by following continuation tokens
  • Gracefully handles videos with disabled comments

No login is required. YouTube comments are publicly visible and this actor only accesses publicly available data.


FAQ

Q: Do I need a YouTube API key? No. This actor does not use the YouTube Data API. It uses YouTube's internal InnerTube API via a real browser session, which requires no API key and has no quota limits.

Q: Can it scrape comments from private videos? No. Only publicly accessible video comments can be scraped.

Q: Why are some videos returning 0 comments? Some video creators disable comments entirely. When this happens, the actor logs a warning and moves on to the next video.

Q: How accurate are the published_at timestamps? YouTube returns relative timestamps (e.g. "3 months ago"), not absolute dates. This is a YouTube limitation โ€” the platform does not expose the exact comment date to unauthenticated users in all cases.

Q: Is reply scraping slower? Yes โ€” fetching replies requires an additional API call per top-level comment that has replies. For large comment sections with many replies, expect longer run times.

Q: Can I scrape YouTube Shorts comments? Yes โ€” Shorts URLs (e.g. youtube.com/shorts/VIDEO_ID) are fully supported.

Q: What if I hit the charge limit mid-run? The actor will stop cleanly and save all comments scraped up to that point. You will not be charged beyond the limit you set.


Works Great With

  • YouTube Scraper (streamers/youtube-scraper) โ€” extract video metadata (views, likes, subscriber counts) and pair it with comments from this actor for full video analytics
  • AI Text Classifier โ€” feed comment_text fields into an LLM for automated sentiment analysis or topic classification

This actor is designed for lawful extraction of publicly available data from YouTube. Users are solely responsible for ensuring their use complies with YouTube's Terms of Service, applicable copyright laws, data protection regulations (including GDPR and CCPA), and any other relevant laws in their jurisdiction. Do not use this actor to collect personally identifiable information in violation of privacy laws. Scraping for unauthorized commercial purposes or to circumvent access controls is prohibited.