YouTube Comments Scraper API avatar

YouTube Comments Scraper API

Pricing

from $0.99 / 1,000 results

Go to Apify Store
YouTube Comments Scraper API

YouTube Comments Scraper API

Scrape YouTube comments at scale. Get comment text, replies, author details, timestamps & engagement metrics from any video. Perfect for sentiment analysis, brand monitoring, content research, engagement tracking & AI training. Structured, export-ready data.

Pricing

from $0.99 / 1,000 results

Rating

5.0

(2)

Developer

Shahid Irfan

Shahid Irfan

Maintained by Community

Actor stats

1

Bookmarked

6

Total users

4

Monthly active users

8 days ago

Last modified

Share

What does YouTube Comments Scraper do?

YouTube Comments Scraper collects public comments and replies from one or more YouTube videos and saves each item as a structured dataset record. Add direct video URLs or video IDs, choose Top comments or Newest first, and receive comment text, author information, engagement values, reply relationships, and video metadata for analysis.

The Actor is useful for audience research, sentiment analysis, creator monitoring, content planning, competitor research, and building datasets for reporting or AI workflows. It works with regular videos, Shorts, embeds, and live video URLs when public comments are available.

Why use YouTube Comments Scraper?

  • Collect comments and replies together - Keep threaded conversations connected with cid, type, and replyToCid.
  • Control the run size - Set one run-wide limit for comments and replies so large videos do not create unexpected datasets.
  • Choose the conversation view - Use Top comments for high-engagement feedback or Newest first for recent reactions.
  • Capture useful context - Include video title, video ID, comment counts, author channels, likes, reply counts, pinned status, and creator hearts when publicly available.
  • Process multiple videos - Submit several video URLs in one run and receive one consistent dataset.
  • Simple configuration - Start with public video URLs and the collection settings that match your workflow.
  • Automate your workflow - Schedule recurring runs, connect webhooks, use the Apify API, or export the dataset for analysis.

What data can you extract from YouTube?

FieldDescription
videoIdID of the YouTube video that contains the comment.
titleVideo title when publicly available.
commentFull text of the comment or reply.
cidUnique YouTube comment ID.
authorPublic display name of the comment author.
authorIdAuthor's YouTube channel ID when available.
voteCountPublic like count for the comment.
replyCountNumber of replies shown for the parent comment.
typecomment for a top-level comment or reply for a reply.
replyToCidParent comment ID for a reply, or null for a top-level comment.
publishedAtNormalized publication time when it can be determined.
isPinnedWhether YouTube marks the comment as pinned.
hasCreatorHeartWhether the creator heart signal is present.

How to use YouTube Comments Scraper

  1. Open the Actor in Apify Console.
  2. Add one or more public YouTube video URLs in startUrls. A video ID can also be entered as a string.
  3. Set maxComments and choose the sorting order.
  4. Optionally set oldestCommentDate when you need a date boundary.
  5. Run the Actor and open the default dataset.
  6. Download the results or connect the run to an integration.

The result limit applies across the complete run, including replies and all submitted videos. This makes the maximum dataset size predictable when processing a video list.

Input Parameters

ParameterTypeRequiredDefaultDescription
startUrlsArrayYes[]One or more public YouTube video URLs, Shorts URLs, embed URLs, live URLs, or video IDs. Entries may be strings or request objects with a url property.
maxCommentsIntegerNo20Maximum number of comments and replies to save across the entire run. Minimum value is 1.
commentsSortByStringNo"1"YouTube comment order. Use "1" for Top comments or "0" for Newest first.
oldestCommentDateStringNo""Optional absolute date or relative age such as 2026-08-01 or 7 days. Older comments are not saved, and the Actor uses Newest first for this filter.

For compatibility with older configurations, the runtime also accepts resultsWanted, results_wanted, maxResults, maxItems, and maxReviews as alternate result-limit names when maxComments is not provided.

Output Data

Each dataset item represents one top-level comment or reply. Values that are not publicly available are returned as null.

FieldTypeDescription
urlStringNormalized source video URL.
pageUrlStringYouTube video URL associated with the record.
videoIdStringYouTube video ID.
titleString or nullVideo title when available.
commentStringComment or reply text.
cidStringUnique comment identifier.
authorString or nullAuthor display name.
authorIdString or nullAuthor channel ID.
authorUrlString or nullPublic author channel URL.
authorThumbnailString or nullPublic author thumbnail URL.
publishedTimeTextString or nullRelative time text shown by YouTube.
publishedAtString or nullEstimated ISO timestamp when it can be normalized.
voteCountNumber or nullPublic like count.
replyCountNumber or nullReply count associated with the parent comment.
commentsCountNumber or nullTotal video comment count when available.
authorIsChannelOwnerBooleanWhether the author is the video owner.
hasCreatorHeartBooleanWhether the creator heart signal is present.
isPinnedBooleanWhether the comment is pinned.
typeStringcomment or reply.
replyToCidString or nullParent comment ID for replies.
scrapedAtStringISO timestamp when the record was saved.

Usage Examples

Basic top comments

Collect the first 100 top comments and replies from one public video:

{
"startUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"maxComments": 100,
"commentsSortBy": "1"
}

Newest comments for monitoring

Collect recent audience reactions by requesting Newest first:

{
"startUrls": [
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
],
"maxComments": 500,
"commentsSortBy": "0"
}

Multiple videos with a date boundary

Collect up to 250 items across several videos and stop when comments are older than the selected date:

{
"startUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"https://www.youtube.com/shorts/aqz-KE-bpKQ"
],
"maxComments": 250,
"oldestCommentDate": "30 days"
}

Sample Output

The following example shows the shape of one top-level comment record. Actual author, engagement, and timestamp values depend on what YouTube publishes for each video.

{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"pageUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up",
"comment": "This song still makes people smile.",
"cid": "UgxExampleCommentId",
"author": "Example Viewer",
"authorId": "UCExampleAuthorId",
"authorUrl": "https://www.youtube.com/channel/UCExampleAuthorId",
"authorThumbnail": "https://yt3.ggpht.com/example",
"publishedTimeText": "2 days ago",
"publishedAt": "2026-08-25T00:00:00.000Z",
"voteCount": 1420,
"replyCount": 5,
"commentsCount": 842910,
"authorIsChannelOwner": false,
"hasCreatorHeart": true,
"isPinned": false,
"type": "comment",
"replyToCid": null,
"scrapedAt": "2026-08-27T12:00:00.000Z"
}

Tips for Best Results

  • Start small - Test one public video with maxComments set to 20 or 100 before requesting a larger dataset.
  • Use the right order - Choose Top comments for representative engagement and Newest first for feedback monitoring.
  • Remember the run-wide limit - A reply counts as one saved item, so a run with maxComments: 100 can contain any mix of comments and replies up to 100 records.
  • Use a date boundary for monitoring - oldestCommentDate accepts an absolute date or values such as 7 days, 30 days, or 2 months.
  • Use public URLs - Private, deleted, members-only, age-restricted, or login-only videos may return no comments.
  • Submit focused URL lists - The Actor processes multiple videos with bounded concurrency, logs failed videos, and continues with the remaining inputs.
  • Expect source limitations - YouTube may not publish author thumbnails, exact dates, counts, or creator signals for every item.

Integrations and Export Formats

  • Apify API - Read datasets and run the Actor programmatically from your own application.
  • Google Sheets - Send comment datasets to a spreadsheet for review and tagging.
  • Webhooks - Trigger downstream processing when a run finishes.
  • Make or Zapier - Connect comment collection to no-code workflows.
  • JSON - Use structured records in data pipelines and AI applications.
  • CSV and Excel - Analyze comments in spreadsheet tools.
  • XML - Pass results to systems that require XML exports.

Frequently Asked Questions

Can I collect replies as well as top-level comments?

Yes. The Actor collects available reply threads and links each reply to its parent with replyToCid. Replies count toward maxComments.

Can I collect comments from multiple videos?

Yes. Add multiple public video URLs or IDs to startUrls. The Actor processes them with bounded concurrency and applies one result limit across the complete run.

What does commentsSortBy mean?

Use "1" for YouTube Top comments and "0" for Newest first. If oldestCommentDate is set, Newest first is selected automatically so the date boundary can be applied while pages are collected.

Do I need a YouTube API key?

No. The Actor is designed for publicly available comments and does not require users to provide a YouTube API key or sign in.

Why are some fields null or missing?

YouTube does not publish every field for every comment. Author details, exact dates, counts, thumbnails, and creator signals may be unavailable, and the Actor preserves those unavailable values as null.

Can I run this Actor on a schedule?

Yes. Create an Apify schedule to collect new feedback hourly, daily, weekly, or at another interval that suits your monitoring workflow.

Public data collection may be subject to YouTube's terms, applicable laws, privacy requirements, and the intended use of the data. You are responsible for using this Actor lawfully and respecting the rights of creators and commenters.

  • Udemy Course Reviews Scraper - Collect structured course reviews, ratings, written feedback, and reviewer details for education research and sentiment analysis.
  • Pinterest Search Scraper - Collect public social content and engagement data for audience research, trend analysis, and content planning.

Support

For issues, feature requests, or unexpected results, use the Issues tab on the Actor page. Include the input shape, the affected public video URL, the run ID, and a short description of the returned data when possible.

This Actor is intended for legitimate collection of publicly available YouTube comments. Users are responsible for complying with YouTube's terms of service, applicable laws, privacy obligations, and any restrictions that apply to their use of collected data.