YouTube Comments Scraper - Video Comment Extractor avatar

YouTube Comments Scraper - Video Comment Extractor

Pricing

Pay per usage

Go to Apify Store
YouTube Comments Scraper - Video Comment Extractor

YouTube Comments Scraper - Video Comment Extractor

Extract comments from any YouTube video. Get comment text, authors, likes, dates, replies, pinned and hearted status. For sentiment analysis, brand monitoring and content research.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Ricardo Akiyoshi

Ricardo Akiyoshi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 hours ago

Last modified

Categories

Share

YouTube Comments Scraper

Extract comments from any YouTube video at scale. Get full comment metadata including text, author info, likes, dates, replies, pinned and hearted status.

What does YouTube Comments Scraper do?

This actor scrapes comments from YouTube videos and returns structured data for each comment. It handles pagination automatically, supports sorting by top or newest, and can optionally extract reply threads.

Key capabilities:

  • Scrape comments from one or hundreds of YouTube videos
  • Get comment text, author name, author channel URL, like count, publish date
  • Detect pinned comments and creator-hearted comments
  • Optionally include reply threads for full conversation context
  • Sort by top (most relevant) or newest first
  • Automatic pagination through all comments
  • Built-in anti-bot detection and rate limiting
  • Proxy support for large-scale operations
  • Pay-per-event pricing: only pay for comments you actually extract

Use Cases

Sentiment Analysis

Analyze audience sentiment toward specific videos, products, or topics. Extract thousands of comments and feed them into your NLP pipeline to understand how viewers feel about content, brands, or events.

Example workflow:

  1. Scrape comments from product review videos
  2. Run sentiment classification (positive/negative/neutral)
  3. Calculate overall sentiment scores
  4. Track sentiment changes over time

Influencer Research

Evaluate influencer engagement by analyzing their comment sections. Identify which creators generate the most meaningful discussions, check comment authenticity, and measure audience engagement quality.

What you can measure:

  • Comment-to-view ratio
  • Average likes per comment
  • Reply engagement rates
  • Creator interaction (hearted comments)
  • Audience sentiment

Brand Monitoring

Track what people are saying about your brand in YouTube comments. Monitor competitor videos, product reviews, and industry discussions to stay on top of public perception.

Monitor:

  • Product review comment sections
  • Competitor video discussions
  • Industry thought leader content
  • Campaign-related video responses

Content Strategy

Understand what your audience wants by analyzing comments on your own and competitor videos. Identify frequently asked questions, content requests, and pain points to inform your content calendar.

Insights you can extract:

  • Most requested topics and questions
  • Common complaints or praise points
  • Feature requests and suggestions
  • Content format preferences

Market Research

Gather qualitative consumer feedback at scale. YouTube comments are an underutilized source of honest consumer opinions about products, services, and trends.

Academic Research

Collect large comment datasets for social science research, linguistic analysis, discourse studies, or communication research projects.

Customer Support Intelligence

Monitor comments on your product tutorial and support videos to identify common issues, improve documentation, and proactively address customer problems.

Competitive Analysis

Analyze competitor video comments to understand their audience pain points, feature requests, and satisfaction levels. Use this intelligence to improve your own offerings.

Input Configuration

FieldTypeRequiredDefaultDescription
videoUrlsArray of stringsYes-YouTube video URLs or video IDs to scrape
maxCommentsIntegerNo100Maximum comments per video (0 = unlimited)
sortByEnumNo"top"Sort order: "top" or "newest"
includeRepliesBooleanNofalseAlso extract reply threads
proxyConfigurationObjectNo-Proxy settings for avoiding rate limits

Supported URL Formats

The actor accepts YouTube video URLs in multiple formats:

  • https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • https://youtu.be/dQw4w9WgXcQ
  • https://www.youtube.com/embed/dQw4w9WgXcQ
  • https://www.youtube.com/shorts/dQw4w9WgXcQ
  • https://www.youtube.com/live/dQw4w9WgXcQ
  • https://music.youtube.com/watch?v=dQw4w9WgXcQ
  • Plain video ID: dQw4w9WgXcQ

Example Input

{
"videoUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"https://youtu.be/jNQXAC9IVRw"
],
"maxComments": 500,
"sortBy": "top",
"includeReplies": true,
"proxyConfiguration": {
"useApifyProxy": true
}
}

Minimal Input

{
"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]
}

Output Format

Each comment is returned as a JSON object with the following fields:

FieldTypeDescription
commentIdStringUnique YouTube comment identifier
commentTextStringFull text of the comment
authorNameStringDisplay name of the commenter
authorChannelStringURL to the commenter's YouTube channel
authorThumbnailStringURL to the commenter's profile picture
likesNumberNumber of likes on the comment
publishedAtStringISO date string of when the comment was posted
isHeartedBooleanWhether the video creator hearted this comment
isPinnedBooleanWhether this comment is pinned by the creator
isReplyBooleanWhether this is a reply to another comment
isChannelOwnerBooleanWhether the commenter is the video channel owner
isMemberBooleanWhether the commenter is a channel member
replyCountNumberNumber of replies to this comment
videoTitleStringTitle of the video
videoUrlStringURL of the video
scrapedAtStringISO date string of when the comment was scraped

Example Output

{
"commentId": "UgxKREaMF5Kz3TVqPAR4AaABAg",
"commentText": "This video changed my perspective on the topic. Really well explained!",
"authorName": "TechEnthusiast42",
"authorChannel": "https://www.youtube.com/channel/UCxxxxxxxxxxxx",
"authorThumbnail": "https://yt3.ggpht.com/ytc/xxxx=s48-c-k-c0x00ffffff-no-rj",
"likes": 1523,
"publishedAt": "2026-02-15T08:30:00.000Z",
"isHearted": true,
"isPinned": false,
"isReply": false,
"isChannelOwner": false,
"isMember": false,
"replyCount": 47,
"videoTitle": "Understanding Machine Learning in 10 Minutes",
"videoUrl": "https://www.youtube.com/watch?v=abc123def45",
"scrapedAt": "2026-03-02T12:00:00.000Z"
}

How It Works

The actor uses a multi-strategy approach to extract comments reliably:

  1. Page Fetch: Loads the YouTube video page and extracts embedded ytInitialData JSON
  2. Continuation Tokens: Finds the comment section continuation token from the page data
  3. InnerTube API: Uses YouTube's internal API to paginate through all comments
  4. DOM Fallback: If the API approach fails, falls back to parsing the page HTML directly

Anti-Detection Features

  • 12 rotating user agent strings across Chrome, Firefox, Edge, and Safari
  • Randomized delays between requests (800ms to 2500ms)
  • Exponential backoff on rate limiting (429 responses)
  • Proxy support via Apify's proxy infrastructure
  • YouTube-specific request headers that mimic real browser traffic

Tips for Best Results

  1. Use proxies for large jobs: If scraping more than 1,000 comments, enable Apify proxy to avoid rate limiting.

  2. Start with a small maxComments: Test with 50-100 comments first to verify the output format meets your needs.

  3. Sort by "newest" for monitoring: When tracking ongoing discussions, use sortBy: "newest" to get the most recent comments.

  4. Include replies carefully: Enabling replies significantly increases scraping time and the number of results. Only enable when you need full conversation threads.

  5. Batch your requests: Process multiple videos in a single run by passing an array of URLs. The actor handles concurrency automatically.

  6. Handle disabled comments: Some videos have comments disabled. The actor will log a warning and move to the next video.

Pricing

This actor uses Pay Per Event pricing:

  • $0.002 per comment extracted (that is $2.00 per 1,000 comments)
  • You only pay for comments successfully extracted
  • Replies count as individual comments for billing
  • No charge for videos where comments are disabled or extraction fails

Cost Examples

ScenarioEstimated Cost
100 comments from 1 video$0.20
500 comments from 5 videos$1.00
10,000 comments from 50 videos$20.00
100,000 comments (large research project)$200.00

Platform costs (compute + proxy) are additional. See Apify pricing for details.

Frequently Asked Questions

Q: Can I scrape comments from private or unlisted videos? A: No. The actor can only access comments on public videos. Private videos require authentication, which is not supported.

Q: What happens if a video has comments disabled? A: The actor detects disabled comments and logs a warning. It then moves on to the next video in your list without charging for that video.

Q: How many comments can I scrape per video? A: There is no hard limit. Set maxComments to 0 for unlimited extraction. However, videos with millions of comments may take a long time to process.

Q: Does the actor handle YouTube Shorts? A: Yes. YouTube Shorts URLs (youtube.com/shorts/VIDEO_ID) are fully supported. Comments on Shorts work the same as regular video comments.

Q: How fast is the scraping? A: Typical speed is 20-50 comments per second, depending on your proxy configuration and YouTube's rate limiting. Larger batches with proxies are faster.

Q: Can I get comment replies? A: Yes. Set includeReplies to true in the input. Reply comments will have isReply: true in the output.

Q: What if YouTube blocks me? A: Enable Apify proxy in the input configuration. The actor automatically rotates user agents and adds delays between requests to minimize blocking.

Q: Can I filter comments by date or keyword? A: The actor does not filter comments during extraction. You can filter the output dataset after scraping using Apify's built-in dataset filtering or by processing the results in your own code.

Q: Is the data returned in real time? A: Comments are pushed to the dataset as they are collected. You can monitor results in real time via the Apify console.

Q: How do I handle very large videos (100K+ comments)? A: Use Apify proxy, set a reasonable maxComments limit (e.g., 10,000), and use sortBy: "top" to get the most relevant comments first. Processing all comments on viral videos can take over an hour.

Integrations

Export your scraped data to any of these platforms directly from Apify:

  • Google Sheets — Automatic export for team collaboration
  • Slack / Microsoft Teams — Get notified when scraping completes
  • Zapier / Make — Build automated workflows
  • Google BigQuery — Load data into your data warehouse
  • Amazon S3 — Store large datasets in the cloud
  • Snowflake — Enterprise data analytics
  • GitHub — Save results to repositories
  • REST API / Webhooks — Integrate with any custom system

Looking for more YouTube data? Check out these related actors:

Changelog

v1.0.0 (2026-03-02)

  • Initial release
  • Multi-strategy comment extraction (InnerTube API + DOM fallback)
  • Full comment metadata: text, author, likes, dates, hearted, pinned
  • Reply thread extraction support
  • Sort by top comments or newest first
  • 12 rotating user agents
  • Proxy support
  • Pay-per-event billing ($0.002/comment)

Support

If you encounter issues or have feature requests:

  1. Check the FAQ section above for common questions
  2. Review the run log in the Apify console for error messages
  3. Open an issue on the actor's page with your input configuration and error details

Built by Sovereign AI — Autonomous AI building useful tools.