YouTube Comments Scraper 💬 Replies, Hearts, Pins & API avatar

YouTube Comments Scraper 💬 Replies, Hearts, Pins & API

Pricing

from $0.80 / 1,000 parent comments

Go to Apify Store
YouTube Comments Scraper 💬 Replies, Hearts, Pins & API

YouTube Comments Scraper 💬 Replies, Hearts, Pins & API

Extract YouTube comments from videos, Shorts and live streams with author info, likes, timestamps, creator hearts and pins, plus nested replies. Sort by top or newest. Also callable as an API that streams comments with resumable tokens. For sentiment analysis and research.

Pricing

from $0.80 / 1,000 parent comments

Rating

5.0

(7)

Developer

FlowExtract API

FlowExtract API

Maintained by Community

Actor stats

17

Bookmarked

105

Total users

5

Monthly active users

4 days ago

Last modified

Features

Limited permissionsMulti-tenantServer interface

Share

YouTube Comments Scraper extracts comments from any YouTube video, Short or live stream with author information, likes, timestamps and nested replies. Paste video URLs and get clean, structured comment data — or call it as an API from your app or AI agent.

Perfect for sentiment analysis, market research, content strategy and social listening.

What does YouTube Comments Scraper do?

  • Complete comments — full text, author name, channel ID, avatar and verification status.
  • Engagement — like counts, reply counts, and whether the creator hearted or pinned a comment.
  • Nested replies — optional, with pagination; set how many per comment.
  • Top or newest — YouTube's relevance order or newest first.
  • Any video format — watch, youtu.be, Shorts, live and bare video IDs.
  • Callable as an API — stream comments over HTTP with resumable continuation tokens.

What data can you extract from YouTube comments?

CategoryFields
VideovideoId, videoUrl, commentsDisabled, sortBy, scrapedAt
CommentcommentId, text, publishedTime, likeCount, replyCount
AuthorauthorName, authorChannelId, authorThumbnail, isVerified, isCreator
Creator signalsisHearted, isPinned
Repliesreplies[] — commentId, parentCommentId, text, author fields, publishedTime, likeCount, isCreator, isHearted, isPinned

Why use YouTube Comments Scraper on Apify?

Running it on Apify gives you API access, scheduling, monitoring, integrations (Make, Zapier, n8n, webhooks) and proxy rotation without managing infrastructure.

How to scrape YouTube comments

  1. Open YouTube Comments Scraper in Apify Console.
  2. Paste one or more video URLs into YouTube URLs.
  3. Choose Sort by — top or newest.
  4. Set Max comments (start small: 100) and Max replies per comment (0 turns replies off).
  5. Click Start, then download the results as JSON, CSV or Excel, or fetch them over the API.

How much does it cost to scrape YouTube comments?

You pay per comment and per reply delivered:

EventFREEBRONZESILVERGOLD
Comment$0.003$0.0015$0.001$0.0008
Reply$0.0015$0.0008$0.0006$0.0004
Actor start (per GB of memory)$0.01$0.001$0.001$0.001
  • 1,000 comments cost about $3 on the FREE plan price and $0.80 on GOLD (+ the start fee).
  • API requests pay the same per-comment prices and no start fee.
  • Test with maxComments: 10 first.

Input and output examples

Input

{
"youtubeUrls": [
{ "url": "https://www.youtube.com/watch?v=kOO31qFmi9A" },
{ "url": "https://youtu.be/VIDEO_ID_2" }
],
"maxComments": 100,
"sortBy": "top",
"maxRepliesPerComment": 10
}
ParameterTypeDefaultDescription
youtubeUrlsarrayRequiredYouTube video URLs to extract comments from
maxCommentsinteger10Top-level comments per video (10–1,000,000)
sortBystringtoptop (most relevant) or newest (most recent)
maxRepliesPerCommentinteger0Replies per comment; 0 disables replies (1–500)

Supported URL formats: https://www.youtube.com/watch?v=VIDEO_ID, https://youtu.be/VIDEO_ID, https://www.youtube.com/shorts/VIDEO_ID, https://www.youtube.com/live/VIDEO_ID, or the bare VIDEO_ID.

Output

{
"videoId": "kOO31qFmi9A",
"videoUrl": "https://www.youtube.com/watch?v=kOO31qFmi9A",
"commentsDisabled": false,
"sortBy": "top",
"commentId": "UgxQe-6VK3h-LZaul6x4AaABAg",
"authorName": "@petertenthije",
"authorChannelId": "UCjRXzLWPELehRVijzUiX7iQ",
"authorThumbnail": "https://yt3.ggpht.com/ytc/AIdro_mvTOxNFL9dMAEzBQAvVcn4JgDSYUQHFQTOydPLOY4=s88-c-k-c0x00ffffff-no-rj",
"text": "30 years later, and nothing has changed:\n\nThe world still uses excel;\nThere is still one guy doing the work;\nThere are still three guys being clueless;\nThere is still one guy pushing to go faster, thinking the project is doomed… and taking the credit when everything works out.",
"publishedTime": "3 years ago (edited)",
"likeCount": "28K",
"replyCount": 229,
"isVerified": false,
"isCreator": false,
"isHearted": false,
"isPinned": false,
"replies": [
{
"commentId": "UgxQe-6VK3h-LZaul6x4AaABAg.9bBOqHCtsBY9bCzb1v1tt1",
"authorName": "@arnaboceanatyahoo",
"authorChannelId": "UCi7-fR2kGX18SCvKI_XV8rQ",
"authorThumbnail": "https://yt3.ggpht.com/ytc/AIdro_ln6eho2LyWvvi4mCOpvOMntSiPC6DrhVb3fZyb9eY=s88-c-k-c0x00ffffff-no-rj",
"text": "Hahaha",
"publishedTime": "3 years ago",
"likeCount": "78",
"parentCommentId": "UgxQe-6VK3h-LZaul6x4AaABAg"
}
],
"scrapedAt": "2025-10-24T18:21:50.350Z"
}

likeCount is the value as displayed (e.g. "28K"); publishedTime is relative (e.g. "2 days ago (edited)"); authorThumbnail is an 88×88 avatar.

Call it as an API

The same Actor also runs as a long-lived HTTP endpoint you can call from your app, an AI agent or an n8n / Make / Zapier HTTP step:

  • Instant responses — no Actor startup per request.
  • Comments stream back as they are extracted (NDJSON).
  • Interrupted requests resume from a continuation token.
  • No runs appear in your account, your concurrency and memory limits are not used, and there is no start fee.
https://dz-omar--youtube-comments-scraper.apify.actor/

Authenticate with your Apify token as a Bearer header (get one at https://console.apify.com/account/integrations?fpr=smcx63):

curl -X POST "https://dz-omar--youtube-comments-scraper.apify.actor/" \
-H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"youtubeUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
"sortBy": "top",
"maxComments": 100,
"maxRepliesPerComment": 0
}'

A real response (abridged) — one JSON object per line:

{"type":"batch","videoId":"dQw4w9WgXcQ","batchSize":10,"totalSent":10,"completed":false,"continuationToken":"fx1_uIqvlU…","comments":[{"authorName":"@candycake9531","text":"…","likeCount":"293K","replyCount":120,"publishedTime":"2 years ago"}]}
{"type":"batch","videoId":"dQw4w9WgXcQ","batchSize":10,"totalSent":20,"completed":true,"continuationToken":null,"comments":[…]}
{"type":"video_complete","videoUrl":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}
{"type":"complete"}
Request parameterTypeDescription
youtubeUrlsarrayRequired. YouTube video URLs
maxCommentsintegerMaximum comments per video
sortBystring"top" or "newest"
maxRepliesPerCommentintegerMax replies per comment (0 disables replies)
maxCommentsPerRequestintegerOptional. Bound a single response to about this many comments (or ~2 minutes)
continuationTokenstringOptional. Opaque resume token from a previous response
alreadyFetchedintegerOptional. Comments already received, sent with continuationToken
Event typeMeaning
batchA batch of comments. completed: true marks the last batch for that video
video_completeThat video finished. Not sent after a paused event
pausedOnly with maxCommentsPerRequest: the budget was reached and more remains; carries a continuationToken
completeFinal line; the connection closes
errorOne video failed (comments disabled, bad URL); the stream continues
migrating / abortingThe server is being replaced or shut down. Save the continuationToken and reconnect

Health check: GET https://dz-omar--youtube-comments-scraper.apify.actor/heartbeat with the same Bearer header returns { "status": "alive", "activeConnections": 0, "timestamp": "…" }.

Other Actors you might need

ActorWhat it adds
YouTube Playlist ExtractorEvery video in a YouTube playlist with durations, thumbnails & channel info
YouTube Transcript & Metadata ExtractorTimestamped transcripts, full metadata & comments from any video or Short, also as a live API
YouTube Scraper ProChannels, Videos & Transcripts
YouTube Shorts ScraperKeyword Search, Views & Date Filter
YouTube Hashtag ExtractorShorts, Transcripts & Countries

Frequently asked questions

How do I resume an API request with the continuation token?

Send the same request back with continuationToken (and alreadyFetched). The token is an opaque handle — store it and send it back unchanged. It expires after 3 hours and is bound to that request's video URL, sortBy and maxRepliesPerComment; changing maxComments or alreadyFetched is fine. A rejected token returns 400 with continuation expired or does not match this input — start again without continuationToken.

How do I cap one API request?

Set maxCommentsPerRequest when the caller cannot wait on a long response (an agent or a workflow step). The response ends with a paused event carrying a continuationToken. Both budgets are soft and applied at page boundaries, so you may receive slightly more and never a partial page.

Why are no comments found?

Check that comments are enabled on the video, that the URL is correct and complete, and that the video is not private or age-restricted. The run reports "No comments section found or comments are disabled".

Why are some fields null?

Normal: not every field exists for every comment. authorChannelId can be null for deleted accounts and likeCount when likes are hidden.

How do I make runs faster?

Start with 50–100 comments, set maxRepliesPerComment: 0 when replies aren't needed (the biggest speed-up), and split very large jobs into separate runs. Use top for popular opinion and newest for monitoring recent activity (newest needs one extra request to fetch its sort token).

What about rate limiting?

Proxy rotation with session health tracking is on by default. If you still see HTTP 429 errors, split large jobs into smaller runs.

The Actor extracts publicly visible comments. Comply with YouTube's Terms of Service, copyright and data-protection laws (GDPR, CCPA); anonymize usernames before sharing datasets, and don't use the data for harassment or spam. This is not legal advice.

Can I use YouTube Comments Scraper in Make, Zapier, n8n or my own code?

Yes — through Apify's integrations, the Apify API and client libraries, or the HTTP interface above.

Support

  • Public data only — comments visible to any visitor, no login, no cookies.
  • Rate limiting — modest request rates with back-off.
  • Data protection — no storage of personal information beyond your own dataset.
  • Commercial use — suitable for business intelligence and research.
  • No affiliation with or endorsement by YouTube or Google is implied.

YouTube Comments Scraper — by FlowExtract API. Turn any website into structured data.