YouTube Comments Extractor avatar

YouTube Comments Extractor

Pricing

from $1.60 / 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 $1.60 / 1,000 results

Rating

0.0

(0)

Developer

LIAICHI MUSTAPHA

LIAICHI MUSTAPHA

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

4 days ago

Last modified

Share

YouTube Comments Extractor (Official API)

Extract YouTube comments and replies from any public video with the official YouTube Data API v3. You bring your own free API key, so runs are stable, fast and within YouTube's rules: no scraping of YouTube's website, no proxies, no browser.

Each comment comes out as a flat record with text, author, likes, publication time, reply count and parent ID, ready for sentiment analysis, brand monitoring, audience research and AI datasets.

What you get

  • Top-level comments and their full reply threads (including threads with hundreds of replies)
  • Text, author, author channel ID, avatar, likes, published and edited time
  • reply, parent_id and reply_count to rebuild each conversation
  • Top comments or newest first
  • Several videos per run, from watch, youtu.be, Shorts or embed URLs, or plain video IDs
  • A STATS record with comments per video, skipped videos and API quota used

Before your first run: get a free API key (about 2 minutes)

  1. Open the Google Cloud Console (console.cloud.google.com) and create a project (any name).
  2. Go to APIs & Services > Library, search for YouTube Data API v3 and click Enable.
  3. Go to APIs & Services > Credentials > Create credentials > API key and copy the key.
  4. Optional but recommended: click the key and under API restrictions limit it to YouTube Data API v3.
  5. Paste the key into the YouTube API key field of this Actor. The field is stored encrypted.

The free quota is 10,000 units per day. Each call to the API costs 1 unit and returns up to 100 comments, so the free quota covers several hundred thousand comments a day. The quota resets at midnight Pacific time.

Input

FieldTypeDefaultDescription
apiKeystring (secret)requiredYour YouTube Data API v3 key
startUrlsarrayrequiredVideo URLs or video IDs
maxCommentsPerVideointeger100Records per video, counting comments and replies
sortstringtoptop (YouTube's relevance order) or new (newest first)
includeRepliesbooleantrueAlso collect replies
{
"apiKey": "YOUR_YOUTUBE_API_KEY",
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw" },
{ "url": "https://youtu.be/dQw4w9WgXcQ" }
],
"maxCommentsPerVideo": 500,
"sort": "top",
"includeReplies": true
}

Output

One dataset item per comment or reply:

{
"cid": "UgzQ1x8nNh0dZ0y1b5B4AaABAg",
"text": "This video aged like fine wine.",
"time": "2026-10-01T10:00:00Z",
"time_parsed": 1790848800,
"updated_at": "2026-10-01T10:00:00Z",
"author": "@viewer_123",
"channel": "UCx1y2z3a4b5c6d7e8f9g0h",
"photo": "https://yt3.ggpht.com/...",
"votes": 1520,
"reply": false,
"parent_id": null,
"reply_count": 12,
"video_id": "jNQXAC9IVRw",
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
}

Replies have reply: true and parent_id set to the top-level comment's cid.

Changes from the previous version (October 2026)

The Actor now uses the official YouTube Data API instead of reading YouTube's web pages. If you used the earlier version:

  • Add your API key (see above). Runs without a key stop with a clear message.
  • votes is now a number (1520) instead of text ("1.5K").
  • time is now an exact timestamp instead of "3 months ago"; time_parsed is exact too.
  • heart (creator heart) is gone: the API does not provide it.
  • New fields: parent_id, reply_count, updated_at, video_id.
  • No proxy setting: the API does not need one.

Pricing

This Actor uses pay-per-event pricing, so platform usage is included. You pay for each comment or reply saved to the dataset, plus a tiny start charge of $0.00005 per run. Your YouTube API quota is free and separate.

PlanPer 1,000 comments
Free$2.00
Bronze$1.90
Silver$1.80
Gold, Platinum, Diamond$1.60

Example: 500 comments from each of 4 videos (2,000 comments) costs about $4.00 on the Free plan. Apify shows the exact plan-adjusted price before each run.

FAQ

Why do I need my own API key? It is how YouTube allows programmatic access to comments. Your key, your quota: nobody else's usage affects your runs.

A video was skipped. Why? The video has comments turned off, is private or members-only, or does not exist. The run continues with the other videos and lists skipped ones in the STATS record.

The run stopped with "quotaExceeded". Your key's daily quota is used up. Comments saved before that point are kept. Run again after midnight Pacific time, or request a higher quota from Google.

Can I get every comment on a video? Yes. Set maxCommentsPerVideo higher than the video's comment count. Very large videos use more quota: about 1 unit per 100 comments.

Does it collect comments from channels or playlists? Not yet. Add the video URLs you need; channel and playlist input is planned.

Problems or feature requests? Open the Issues tab on this Actor page.

Doing audience or social listening research across platforms? These Actors from the same developer pair well with this one:

ActorWhat it collects
Reddit Comments Deep ScraperFull Reddit comment threads with nested replies, using your own Reddit API credentials
Substack ScraperNewsletter posts, authors and comments from any Substack
Beehiiv Newsletter ScraperPosts, authors and publication details from any Beehiiv newsletter