YouTube Comment Scraper avatar

YouTube Comment Scraper

Pricing

from $4.00 / 1,000 scraped results

Go to Apify Store
YouTube Comment Scraper

YouTube Comment Scraper

Just provide the video link — we handle the rest. It collects comments, author details, comment ID, votes, replies, timestamp — and stores all the data directly into your Apify dataset. Works without proxies. Fast, accurate, and simple. Fully optimized for extracting data from YouTube.

Pricing

from $4.00 / 1,000 scraped results

Rating

0.0

(0)

Developer

Data Pilot

Data Pilot

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

3

Monthly active users

21 days ago

Last modified

Categories

Share

▶️ YouTube Comment Scraper is a powerful Apify Actor designed to discover and extract comprehensive YouTube comment data from YouTube videos. This tool provides detailed YouTube comment information including comment text, author, likes, replies, and timestamps. Whether you're conducting sentiment analysis, brand monitoring, or audience research, the YouTube Comment Scraper delivers actionable YouTube comment intelligence efficiently.

With direct YouTube API integration via youtube-comment-downloader, proxy support, PPE billing integration, and real-time dataset management, the YouTube Comment Scraper ensures comprehensive discovery of relevant YouTube comment data. It focuses on key YouTube comment metrics including engagement (votes/likes), reply counts, and temporal data, making it an essential tool for YouTube comment research and audience intelligence.


📋 Table of Contents


🔥 Features

  • YouTube Video Integration – Direct extraction of YouTube comment from any YouTube video URL.
  • URL Support – Handles both youtube.com and youtu.be URL formats.
  • Video ID Extraction – Automatically extracts video ID from various URL formats.
  • Comment Sorting – Sorts YouTube comment by recent (newest first) for current sentiment.
  • Bulk Comment Collection – Fetches multiple YouTube comment in single run.
  • Comment Text Extraction – Captures full comment text (up to character limit).
  • Author Information – Extracts comment author username.
  • Comment ID Tracking – Captures unique comment ID for deduplication.
  • Engagement Metrics – Extracts vote count (likes) for each YouTube comment.
  • Reply Tracking – Captures number of replies to each YouTube comment.
  • Timestamp Recording – Captures publication timestamp for temporal analysis.
  • Comment Type Detection – Identifies comment type (standard comment).
  • Proxy Support – Apify residential proxy support for reliable access.
  • PPE Billing Integration – Pay-per-event billing per YouTube comment collected.
  • Charge Limit Handling – Respects user's maximum PPE charge limits.
  • Limit Configuration – Configurable maximum YouTube comment per run (1-10000+).
  • Error Handling – Graceful handling of unavailable videos and disabled comments.
  • Real-Time Dataset Push – Pushes results to Apify Dataset with metadata.
  • Detailed Logging – Comprehensive logging of charges and progress.
  • Asyncio-Friendly – Non-blocking async/await architecture.

⚙️ How It Works

The YouTube Comment Scraper takes a YouTube video URL as input and extracts the video ID. It uses the youtube-comment-downloader library to fetch comments from the video, sorted by recent first. Each comment is processed to extract metadata, pushed to the dataset, and charged via PPE billing. The process continues until reaching the configured limit or the user's PPE charge limit.

Key Processing Steps:

  1. Input Parsing – Accept YouTube video URL and limit from Actor input
  2. Proxy Setup – Configure Apify residential proxy if available
  3. Video ID Extraction – Parse URL to extract video ID
  4. Downloader Initialization – Initialize youtube-comment-downloader
  5. Comment Generation – Get comments generator from video URL
  6. Comment Loop – Iterate through comments until limit reached
  7. Comment Extraction – Extract text, author, votes, replies, timestamp
  8. Data Formatting – Format comment as structured dataset record
  9. Dataset Push – Push comment to Apify Dataset
  10. PPE Charging – Charge per-event for successful comment
  11. Charge Limit Check – Check if user's PPE limit reached
  12. Loop Control – Continue or stop based on limit/charges
  13. Completion – Log summary and finalize

Key Benefits:

  • Extract YouTube comment for sentiment analysis
  • Research audience reactions and opinions
  • Monitor brand mentions and competitor feedback
  • Analyze engagement patterns
  • Track customer feedback and reviews
  • Conduct market research via YouTube comment
  • Identify trending topics and discussions

📥 Input

The Actor accepts the following input parameters:

FieldTypeDefaultDescription
videoUrlstringrequiredYouTube video URL (youtube.com/watch?v=... or youtu.be/...)
limitinteger1000Maximum YouTube comment to extract (1-10000)
useApifyProxybooleantrueEnable Apify residential proxies
apifyProxyGroupsarray["RESIDENTIAL"]Proxy group configuration

Example Input:

{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"limit": 500,
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}

Alternative URL Format:

{
"videoUrl": "https://youtu.be/dQw4w9WgXcQ",
"limit": 1000
}

Small Sample:

{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"limit": 50
}

📤 Output

The Actor pushes YouTube comment records with the following structure:

FieldTypeDescription
commentstringFull YouTube comment text
cidstringUnique comment ID for deduplication
authorstringComment author's YouTube username
videoIdstringVideo ID of the video
voteCountstringNumber of likes on comment
replyCountstringNumber of replies to comment
typestringComment type (typically "comment")
publishedAtstringPublication timestamp

Example Output Record (High Engagement):

{
"comment": "This is an amazing video! The quality is outstanding and the editing is perfection. Thank you for creating such great content!",
"cid": "Ugx7kK9mK_pL9wXq7K0AaABAg",
"author": "John Smith",
"videoId": "dQw4w9WgXcQ",
"voteCount": "2345",
"replyCount": "12",
"type": "comment",
"publishedAt": "2025-02-10T14:23:45Z"
}

Example Output Record (Medium Engagement):

{
"comment": "Great tutorial. Really helpful for learning this concept.",
"cid": "Ugx4mL2nO_pK8wXz9M1BaACAg",
"author": "Jane Developer",
"videoId": "dQw4w9WgXcQ",
"voteCount": "87",
"replyCount": "3",
"type": "comment",
"publishedAt": "2025-02-09T10:15:30Z"
}

Example Output Record (Error Case):

{
"message": "No comments found for the video. It may have comments disabled or be unavailable."
}

🧰 Technical Stack

  • YouTube Integration: youtube-comment-downloader library
  • HTTP Requests: requests library with proxy support
  • Async: asyncio for non-blocking operations
  • Proxy: Apify Proxy with RESIDENTIAL configuration
  • Logging: Apify Actor logging system
  • Billing: Apify PPE (Pay-Per-Event) system
  • Platform: Apify Actor serverless environment
  • Data Format: JSON for dataset records

📊 Data Fields Explained

Comment Content

  • comment: Full text of the YouTube comment
  • author: Username of the comment author

Comment Identification

  • cid: Unique comment ID for tracking
  • videoId: Video being commented on

Engagement

  • voteCount: Number of likes on the comment
  • replyCount: Number of replies/responses

Temporal

  • publishedAt: When the comment was posted

Metadata

  • type: Comment type (typically "comment")

📊 Engagement Metrics

Vote Count (Likes)

  • Represents likes received by the YouTube comment
  • Higher counts indicate more audience agreement/appreciation
  • Used for sentiment and quality assessment

Reply Count

  • Number of replies to the YouTube comment
  • Indicates discussion engagement
  • Identifies controversial or discussion-starting comments

Examples

High engagement:

voteCount: "2345"
replyCount: "12"

Medium engagement:

voteCount: "87"
replyCount: "3"

Low engagement:

voteCount: "5"
replyCount: "0"

🎯 Use Cases

  • Sentiment Analysis – Analyze audience sentiment via YouTube comment text
  • Brand Monitoring – Monitor brand mentions in YouTube comment
  • Competitor Analysis – Track competitor video feedback in YouTube comment
  • Audience Research – Understand audience opinions and preferences
  • Engagement Analysis – Analyze YouTube comment engagement patterns
  • Feedback Collection – Gather customer feedback via YouTube comment
  • Trend Identification – Identify trending topics in discussions
  • Comment Moderation Research – Understand comment quality and toxicity
  • Market Research – Conduct market research via YouTube comment sentiment
  • Product Feedback – Gather product feedback from video comments
  • Content Strategy – Inform content strategy using YouTube comment insights
  • Reputation Management – Monitor brand reputation in YouTube comment
  • Influencer Analysis – Analyze audience response to influencers
  • Campaign Tracking – Track campaign feedback via YouTube comment
  • User Behavior – Understand user behavior and interests from discussions

🚀 Quick Start

1. Prepare Input

Go to Apify Console and enter:

{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"limit": 500,
"useApifyProxy": true
}

2. Run the Actor

Click Start button. The Actor will:

  • Extract video ID from URL
  • Initialize comment downloader
  • Fetch comments sorted by recent
  • Process and charge per comment
  • Push to Dataset

4. View & Download Results

  • Results Tab: All YouTube comment records
  • Export: JSON, CSV, Excel
  • Filter: By author or engagement
  • Sort: By vote count or replies

⚙️ Configuration

URL Formats

Standard YouTube URL:

{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}

Shortened URL:

{
"videoUrl": "https://youtu.be/dQw4w9WgXcQ"
}

Comment Limit

Small sample (50 comments):

{
"limit": 50
}

Comprehensive (1000+ comments):

{
"limit": 1000
}

Proxy Configuration

With proxy:

{
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}

Without proxy:

{
"useApifyProxy": false
}

📈 Performance

Processing Speed

  • ~1-2 seconds per comment extraction
  • ~50-100 comments per minute
  • ~500-1000 comments per 10-15 minutes

Resource Usage

  • Memory: ~50-100MB
  • CPU: ~20-30% during processing
  • Network: ~500KB-2MB per run
  • API calls: Depends on comment count

Limitations

  • Rate limited by YouTube
  • Maximum ~1000+ comments per run typical
  • Comments disabled videos return error
  • Private videos cannot be accessed

💰 Billing

PPE (Pay-Per-Event) Billing

  • Event Name: "scraped-result"
  • Charge: 1 credit per YouTube comment successfully extracted
  • Billing Trigger: Per comment pushed to dataset
  • Limit Handling: Stops when user's PPE limit reached

Charge Calculation

Total Cost = Number of Comments × 1 credit
Example: 250 comments = 250 credits

Cost Examples

50 comments = 50 credits
100 comments = 100 credits
500 comments = 500 credits
1000 comments = 1000 credits


⚠️ Important Notes

  • Terms of Service: Complies with YouTube ToS
  • Fair Use: Respects rate limits and platform policies
  • User Privacy: Extracts only public comment data
  • Attribution: Respects original comment authors
  • Rate Limiting: Includes delays to prevent blocking

Data Quality

  • Completeness: Most public comments captured
  • Accuracy: Comment data as provided by YouTube
  • Currency: Real-time extraction
  • Availability: Depends on video accessibility
  • Verification: Always verify data with YouTube

Best Practices

  • Use residential proxies for reliability
  • Respect YouTube rate limits
  • Verify data quality for analysis
  • Don't republish comments without permission
  • Use for research and analysis only
  • Respect comment author privacy
  • Follow YouTube and applicable laws

📦 Changelog

v1.0.0 (February 2025)

Initial Release:

  • YouTube video URL parsing (youtube.com and youtu.be formats)
  • Video ID extraction from URLs
  • youtube-comment-downloader integration
  • Recent-sorted YouTube comment fetching
  • Comment text extraction
  • Author username extraction
  • Comment ID (cid) capture
  • Vote count (likes) extraction
  • Reply count extraction
  • Publication timestamp capture
  • Comment type detection
  • Apify proxy support (RESIDENTIAL)
  • PPE billing integration per comment
  • Charge limit detection and stopping
  • Configurable comment limit (1-10000+)
  • Error handling for unavailable videos
  • No comments found handling
  • Real-time Dataset push
  • Detailed progress logging
  • Charge event logging
  • Comprehensive error reporting
  • Asyncio executor for non-blocking operations

🧑‍💻 Support & Feedback

  • Issues: Submit via Apify console with video URL
  • Documentation: Check Actor details page
  • Community: Apify forum discussions
  • Feature Requests: Suggest improvements
  • Bug Reports: Include video URL and error messages

Terms of Use:

  • Use for legitimate research and analysis
  • Respect YouTube terms of service
  • Respect comment author privacy
  • Don't republish without permission
  • Comply with applicable laws
  • Use data ethically and responsibly

Disclaimer: YouTube Comment Scraper is provided as-is for research purposes. Users are responsible for ensuring compliance with YouTube ToS and applicable laws. Always respect copyright and author attribution.


🎉 Get Started Today

Deploy now for YouTube comment research!

Use for:

  • 📊 Sentiment Analysis
  • 🔍 Brand Monitoring
  • 💡 Audience Research
  • 📈 Engagement Analysis
  • 🎯 Feedback Collection

Perfect for:

  • Content Researchers
  • Marketing Professionals
  • Brand Managers
  • Community Managers
  • Data Analysts

Last Updated: February 2025
Version: 1.0.0
Status: Production Ready
Platform: Apify Actor
Architecture: Async/Await
Library: youtube-comment-downloader
Billing: Pay-Per-Event (PPE)


  • YouTube Video Scraper
  • YouTube Analytics Scraper
  • Instagram Comment Scraper
  • Twitter Comment Scraper

Your complete Apify-powered YouTube comment research solution! 🚀✨


▶️ YouTube Comment Excellence

This Actor is optimized for YouTube comment extraction with:

  • ✅ Direct YouTube integration
  • ✅ URL format flexibility
  • ✅ Video ID extraction
  • ✅ Recent-sorted comments
  • ✅ Engagement metric capture
  • ✅ PPE billing integration
  • ✅ Real-time Dataset push
  • ✅ Error recovery
  • ✅ Production-ready code

Extract YouTube comments effortlessly! 💎🚀