YouTube Comments Scraper avatar

YouTube Comments Scraper

Pricing

from $1.25 / 1,000 results

Go to Apify Store
YouTube Comments Scraper

YouTube Comments Scraper

YouTube Comments Scraper SD - YouTube Comments Scraper is a powerful tool that extracts public comments, replies, likes, authors and reply counts from YouTube videos by video URL, sort order and comment limit - YouTube comment extractor for audience research and sentiment analysis.

Pricing

from $1.25 / 1,000 results

Rating

0.0

(0)

Developer

Neuro Scraper

Neuro Scraper

Maintained by Community

Actor stats

1

Bookmarked

7

Total users

0

Monthly active users

20 days ago

Last modified

Share

YouTube Comments Scraper - comments, replies and likes from any public YouTube video

The YouTube Comments Scraper turns the comment section of any public YouTube video into clean, structured rows. Paste video links and get every comment with its author, likes, reply count, publish time and pinned or hearted status.

The YouTube Comments Scraper needs no login, no Google account and no YouTube Data API key. It reads the same public comment data that YouTube shows to any logged-out visitor.

Use it for audience research, sentiment analysis, community management, product feedback and creator research. Every row is ready to export as CSV, JSON or Excel.

What the YouTube Comments Scraper does

The YouTube Comments Scraper opens each video page exactly as a logged-out browser does and reads the comment section the way YouTube's own web player loads it: twenty comments per page, page after page.

You choose the order (Top comments or Newest first), how many comments to collect per video, and whether the replies under each comment should be scraped too.

Each comment becomes one dataset row. When replies are on, every reply becomes its own row directly under its parent comment, linked by parentCommentId.

Who uses the YouTube Comments Scraper

Brand and marketing teams who want to know what viewers actually say about a launch, an ad or a review video.

Researchers who build sentiment, toxicity or topic datasets from public YouTube comments.

Creators and agencies who track audience questions, feature requests and engagement on their own videos and on competitors' videos.

Data teams who feed comment text into language models, dashboards or a data warehouse through the Apify API.

Input fields for the YouTube Comments Scraper

Only startUrls is required. Everything else has a sensible default, so the YouTube Comments Scraper runs on its first click.

FieldTypeDefaultMeaning
startUrlsarray2 example videosYouTube video URLs or 11-character ids: watch, youtu.be, Shorts and m.youtube.com links all work
maxCommentsinteger100Top-level comments per video; replies come on top of this number
getAllCommentsbooleanfalseIgnore the limit and page through every comment YouTube lists
sortBystringtoptop (Top comments), latest (Newest first) or oldest
includeRepliesbooleanfalseAlso scrape the replies of each comment
maxRepliesPerCommentinteger20Replies per comment when replies are on
maxItemsintegeremptyOptional cap on all rows of the run
proxyConfigurationobjectApify RESIDENTIAL, USProxy used for every request

The field names are the same as in earlier versions of the YouTube Comments Scraper, so saved tasks and API calls keep working.

About the oldest order

YouTube itself offers only Top comments and Newest first. For oldest, the YouTube Comments Scraper reads the comments newest-first, up to 5,000 per video, and returns them oldest first.

Pinned comments stay on top, exactly as YouTube shows them in every order. On videos with more than 5,000 comments the log says that the scan limit was reached.

Output of the YouTube Comments Scraper

Every row of the YouTube Comments Scraper has the same keys, so the dataset schema stays stable across runs and videos.

FieldMeaning
commentIdYouTube's comment id (replies: <parent>.<reply>)
textFull comment text
authorAuthor handle as shown, e.g. @frankwest8025
authorChannelId, authorUrlAuthor's channel id and channel link
authorThumbnailAuthor avatar URL
authorIsVerifiedVerified badge on the author
authorIsChannelOwnerThe comment was written by the video's own channel
likes, likesTextLike count as a number and as YouTube shows it ("30K")
replyCountNumber of replies under the comment
publishedTimeTextRelative time as YouTube shows it, e.g. "5 years ago (edited)"
isPinned, isHeartedPinned by the creator / hearted by the creator
isReply, replyLevel, parentCommentIdReply flags; parentCommentId only on replies
positionOrder of the top-level comment in the chosen sort
videoId, videoUrl, videoTitleThe video the comment belongs to
videoCommentsTotalExact total comment count of the video, from YouTube's comment header
commentUrlDirect link to the comment
sortedBy, inputUrl, scrapedAtRun context and ISO timestamp

Export the YouTube Comments Scraper dataset as CSV, JSON, Excel, XML or HTML from the Apify console, or read it through the Apify API.

Example row

{"videoId": "VegKhno-BK8", "commentId": "UgywhLWEyYGd0EVLQlB4AaABAg", "text": "Thanos is so chill in Infinity War ...", "author": "@frankwest8025", "likes": 30000, "likesText": "30K", "replyCount": 200, "publishedTimeText": "5 years ago", "isPinned": false, "isHearted": false, "isReply": false, "position": 1, "videoCommentsTotal": 6991, "sortedBy": "top"}

How to run the YouTube Comments Scraper

Open the YouTube Comments Scraper, paste one or more video URLs into startUrls, set maxComments, and press Start. Rows appear in the dataset while the run is still going.

Switch on includeReplies when the conversation under each comment matters. Each comment with replies costs one or more extra requests, so keep maxRepliesPerComment small for big videos.

Use latest to monitor new feedback on a fresh upload. Use top to study the comments YouTube ranks as most relevant.

How fast is it in practice

These numbers come from local test runs of the YouTube Comments Scraper on a home connection:

  • 200 comments from two videos (100 each, Top order) in 9 seconds, 5 requests per video.
  • 150 comments Newest first plus 10 replies in 12 seconds, 19 requests.
  • 60 comments from a Short and a regular video in 5 seconds.

On the Apify platform the run goes through a residential proxy, so timings can differ.

How the YouTube Comments Scraper works

The YouTube Comments Scraper follows YouTube's own public web flow. It loads the watch page and reads the page configuration from it: client version, visitor data, language and the comment section token.

It then asks YouTube's internal web endpoint for the comments with that page's own context, and follows the continuation token of each answer until your limit or the end of the comments.

Nothing is hardcoded. Every dynamic value is read from the page on every run, so a YouTube release does not silently break the YouTube Comments Scraper.

For Shorts, the watch page sometimes arrives without the comment token. The YouTube Comments Scraper then reloads it, and if needed reads the token from the Short's own page.

YouTube Comments Scraper limits, stated plainly

The YouTube Comments Scraper reads public comments only. Comments on private, deleted or members-only videos are out of reach, and no setting changes that.

Videos with comments turned off (for example videos marked "made for kids") produce no rows. The log says "comments are turned off for this video".

Like counts are YouTube's own labels. Above 999 they are rounded ("30K"), and the YouTube Comments Scraper keeps that precision rather than inventing digits.

Publish times are relative ("5 years ago"), because that is what YouTube shows logged-out visitors. The total in videoCommentsTotal is exact.

Held-for-review and spam-filtered comments are never public, so they are never in the YouTube Comments Scraper dataset.

YouTube Comments Scraper pricing

The YouTube Comments Scraper uses pay-per-event pricing: you pay per dataset row (event "result"), plus the Apify platform usage of your run. The run stops at your maxItems or at the charge limit you set.

Free-plan users get up to 30 rows per run, which is enough to test the YouTube Comments Scraper on real data. The current price per 1,000 results is on the Pricing tab.

Using the YouTube Comments Scraper in a workflow

Run the YouTube Comments Scraper on a schedule to watch new comments on your channel's latest uploads, then send the dataset wherever your team works.

Connect it to Google Sheets, Slack or a CRM through the Apify integrations, or through Make, Zapier and n8n. A webhook can trigger your own automation the moment a run finishes.

Developers call the YouTube Comments Scraper from Python or JavaScript with the Apify API client, pass the input as JSON and read the dataset when the run ends.

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("neuro-scraper/youtube-comments-scraper").call(run_input={"startUrls": [{"url": "https://www.youtube.com/watch?v=VegKhno-BK8"}], "maxComments": 200, "sortBy": "latest"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["author"], item["likes"], item["text"][:80])

Because every row has the same keys, the integration never needs special cases. Map text, author and likes once and reuse that mapping for every video.

Sentiment analysis with the YouTube Comments Scraper

Export the comment text as CSV, add a sentiment column with your model of choice, and group by videoId to compare videos.

Use likes and replyCount as weights: a negative comment with 30K likes says more about the audience than ten comments nobody liked.

The YouTube Comments Scraper is part of a family of YouTube and social media scrapers by the same developer, with the same no-login approach.

ActorWhat it extracts
YouTube ScraperYouTube search results and video data by keyword, channel or playlist
YouTube Transcript ScraperFull transcripts with timestamps
YouTube Video Details ScraperViews, likes, dates, tags and chapters of a video
YouTube Channel ScraperChannel profile, about data and the channel's videos
YouTube Playlist ScraperEvery video of a playlist
YouTube Shorts ScraperShorts of a channel or a search
YouTube Video DownloaderVideo or audio files in the quality you choose
Facebook Comments ScraperComments of public Facebook posts
TikTok Video Details ScraperStats and details of TikTok videos
Instagram Reels ScraperReels of public Instagram profiles
Facebook Reels ScraperReels of public Facebook pages
TikTok Profile ScraperPublic TikTok profile data

Leave a review

If the YouTube Comments Scraper saved you time, please leave a star rating and a short review on the Actor page. Reviews help other users decide, and they tell me what to build next.

If something did not work, open an issue on the Actor page with the run link. Bugs get fixed faster than they get reviewed.

Frequently asked questions

Does the YouTube Comments Scraper need my YouTube login or an API key?

No. The YouTube Comments Scraper never logs in and does not use the YouTube Data API. It reads the same public comment data any logged-out visitor sees.

How many comments can the YouTube Comments Scraper collect from one video?

As many as YouTube lists, page by page. Set getAllComments to read the whole thread, or maxComments to stop earlier. In tests one video returned 150 comments Newest first in 12 seconds including replies.

Can the YouTube Comments Scraper scrape replies?

Yes. Turn on includeReplies. Each reply is its own row with isReply: true, its replyLevel and the parentCommentId of the comment it answers. Replies to replies are included.

Does the YouTube Comments Scraper work on YouTube Shorts?

Yes. Paste the Shorts URL. In tests a Short returned 30 comments in two requests, with the exact total of 8,901 comments from YouTube's header.

Why are some like counts rounded?

Because YouTube shows them rounded. A comment with "30K" likes is stored as likes: 30000 and likesText: "30K". Counts below 1,000 are exact.

Can I get comments sorted oldest first?

Yes, with sortBy: oldest. YouTube has no oldest-first order, so the YouTube Comments Scraper reads newest-first up to 5,000 comments per video and reverses them. Pinned comments stay on top.

What happens when a video has comments turned off?

The YouTube Comments Scraper logs "comments are turned off for this video" and moves on to the next URL. One bad URL never fails the whole run.

Which export formats does the YouTube Comments Scraper support?

The dataset exports as CSV, JSON, Excel, XML and HTML from the console, and the same data is available through the Apify API and integrations.

Do I need my own proxy for the YouTube Comments Scraper?

No. The YouTube Comments Scraper uses Apify's residential proxy by default. You can switch to another proxy in the input if you prefer.