YouTube Comments Extractor avatar

YouTube Comments Extractor

Pricing

from $5.00 / 1,000 results

Go to Apify Store
YouTube Comments Extractor

YouTube Comments Extractor

Scrape YouTube comments and replies with full nested trees from any video URL. Perfect for AI training data, sentiment analysis, and brand monitoring.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

LIAICHI MUSTAPHA

LIAICHI MUSTAPHA

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Share

🚀 YouTube Comments & Replies Extractor

The fastest, most cost-effective way to extract deep, nested comment trees from YouTube videos.

Built specifically for AI engineers, data scientists, and brand monitors who need high-volume, clean, and structured YouTube discussion data without the bloat, cost, and slow speeds of heavy browser automation.


💎 Why use this Actor?

YouTube comments are a goldmine for sentiment analysis, product feedback, and AI training data. However, extracting them usually requires spinning up slow, expensive headless browsers (like Puppeteer or Playwright).

This Actor is different:

  • Extremely Fast: Skips the browser entirely. It communicates directly with YouTube's internal APIs natively in Python.
  • 💰 Highly Cost-Effective: Because it doesn't render full web pages, it consumes a fraction of the memory (Compute Units) compared to standard scrapers.
  • 🌳 Deep Nesting: Grabs top-level comments and their deeply nested reply chains instantly.
  • 🤖 AI-Ready Format: Outputs flat, structured JSON ready to be piped directly into Pandas, AI agents, LLMs, or your database.

🎯 Primary Use Cases

  1. Brand & PR Monitoring: Understand exactly what audiences are saying about your product reviews or announcements in real-time.
  2. Sentiment Analysis: Export massive discussion threads to train your NLP models or run through LLM sentiment classifiers.
  3. Lead Generation & Audience Research: Find out who's commenting on your competitors' videos to discover your target audience's pain points.
  4. AI Training Data: Amass huge datasets of conversational, human-written text interactions (comments vs. replies).

⚙️ Input Configuration

The actor's configuration is simple and intuitive:

FieldTypeDescription
Start URLsArrayA list of YouTube Video URLs you want to scrape.
Max Comments Per VideoIntegerThe maximum number of comments to extract per video. (Set very high to attempt full extraction).
Sort ModeDropdownChoose either Top Comments (default) or Newest First.
Proxy ConfigurationProxyResidential Proxies are highly recommended and selected by default to prevent YouTube's bot-blocking limits.

📊 Output Data Structure

The Actor pushes a clean, flat JSON object for every comment/reply into the default dataset.

Example Output:

{
"cid": "UgwoNqeCenhrmvft8LN4AaABAg",
"text": "who’s watching this in march 2026",
"time": "1 month ago",
"author": "@tech_enthusiast_4794",
"channel": "UCOoPn99OOMxS7WqaBIzCwJg",
"votes": "1.5K",
"reply": false,
"photo": "https://yt3.ggpht.com/...",
"heart": false,
"time_parsed": 1711234567,
"video_url": "https://www.youtube.com/watch?v=kOHB85vDuow"
}

Response Field Breakdown:

  • cid: Unique Comment ID.
  • text: The actual text of the comment.
  • time: The raw time string provided by YouTube (e.g., "3 hours ago").
  • author: The username/handle of the commenter.
  • channel: The unique Channel ID of the commenter.
  • votes: The string representation of upvotes.
  • reply: Boolean indicating if this is a reply to another comment (true) or a top-level comment (false).
  • video_url: The source URL so you can join datasets across multiple videos.

💡 Pro Tips for Best Results

  1. Always Use Residential Proxies: YouTube is actively monitoring for datacenter IPs. The standard Apify Residential Proxy pool guarantees your scraping won't get interrupted.
  2. Sort by "Newest": If you are running a continuous monitoring job (e.g., daily scraping via Apify Schedules), sorting by Newest ensures you only grab the latest data without paying to re-read old top comments.

Feedback or Feature Requests? Drop a message in the Issues tab! We constantly update and tune the internal API handlers to adapt to YouTube's latest infrastructure changes.