YouTube Comment Scraper avatar

YouTube Comment Scraper

Pricing

from $2.99 / 1,000 comments

Go to Apify Store
YouTube Comment Scraper

YouTube Comment Scraper

Extract public YouTube comments with author, engagement, moderation, timestamp, and optional video metadata using the Data API or Playwright.

Pricing

from $2.99 / 1,000 comments

Rating

0.0

(0)

Developer

w3crawler

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

23 days ago

Last modified

Categories

Features

Limited permissions

Share

Collect public comments from YouTube watch pages without an API key. For each supplied video the Actor reads the watch-page HTML, makes one public comment-continuation request when the page exposes a token, and saves comment text, IDs, author identity, likes, reply counts, pinned/hearted/reply flags, and optional video metadata. Pages that do not embed comment threads are counted as failures; no diagnostic row or invented comment is written.

Get started

  1. Open the Actor Store page and select Try for free or open the Input tab.
  2. Provide at least one video in videoUrls or videoIds. Watch, Shorts, live, embed, youtu.be, and bare-ID forms are accepted.
  3. Set maxCommentsPerVideo; enable includeReplies and includeVideoMetadata if you need thread replies or video-level fields.
  4. Start the Actor, open the dataset, and export the saved records as JSON, CSV, or Excel. Open Run summary (OUTPUT) to check the outcome and counts.

Input

At least one video is required, supplied through videoUrls, videoIds, or both. Other fields are optional. Unsupported field names and out-of-range values are rejected before requests start.

FieldTypeRequired?DefaultMeaning
videoUrlsstring arrayOptionalNot suppliedPublic YouTube URLs or bare 11-character IDs; accepts watch, Shorts, live, embed, youtu.be, and music URLs. Up to 50 entries.
videoIdsstring arrayOptionalNot suppliedAdditional bare 11-character video IDs; up to 50 entries.
maxCommentsPerVideointegerOptional100Cap on saved top-level comments plus replies per video after extraction. 1–500.
sortCommentsstring enumOptionaltoptop keeps the embedded thread order; new re-sorts the collected rows by their relative publishedText strings, an approximation rather than a YouTube newest-first request.
includeRepliesbooleanOptionalfalseSave replies that are embedded with a thread and set isReply/parentCommentId.
includeVideoMetadatabooleanOptionaltrueAdd video title, description, view/like/comment counts, duration, thumbnail, channel, and metadataSource.
enableProxyFallbackbooleanOptionaltrueRetry through the other transport after the configured route fails: direct then Apify Proxy by default, or Proxy then direct when a proxy is configured.
maxRetriesintegerOptional2Retry attempts per transport and request, 0–3.
requestDelayMsintegerOptional250Delay applied between video targets, 0–5000 ms; it is not applied between the watch page and its continuation request.
requestTimeoutSecsintegerOptional60Timeout for one watch-page or continuation request, 15–180 seconds.
proxyConfigurationobjectOptionalNot suppliedStandard Apify Proxy settings or credential-free custom proxy URLs; accepts useApifyProxy, apifyProxyGroups/groups, apifyProxyCountry, and proxyUrls.

Example input (the schema prefill supplies one public video):

{
"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"maxCommentsPerVideo": 100,
"sortComments": "top",
"includeReplies": false,
"includeVideoMetadata": true,
"enableProxyFallback": true,
"maxRetries": 2,
"requestDelayMs": 250,
"requestTimeoutSecs": 60
}

The Actor reads the public watch page and, when available, one public youtubei/v1/next continuation. Optional proxyConfiguration uses the standard Apify Proxy settings. Duplicate video IDs across videoUrls and videoIds are removed, and the combined unique total is capped at 50.

Output

The dataset contains one row per saved result. Optional information appears only when the source publishes it; missing values are omitted rather than inferred. No diagnostic or placeholder rows are written.

FieldTypeAvailabilityMeaning
recordTypestringAlwaysRecord type; always youtube_comment.
videoIdstringAlways11-character ID of the video the comment belongs to.
videoUrlstringAlwaysCanonical https://www.youtube.com/watch?v=… URL.
sourceUrlstringAlwaysPublic watch-page URL used as the source.
commentIdstringAlwaysYouTube comment identifier used for &lc= links.
commentUrlstringAlwaysWatch URL with the lc parameter for the comment.
textstringAlwaysComment text as displayed.
textLengthnumberAlwaysCharacter count of text.
authorNamestringAlwaysDisplay name of the commenter.
authorChannelIdstringAlwaysChannel ID of the commenter when the payload exposes it.
authorUrlstringAlwaysCommenter channel URL derived from authorChannelId.
authorProfileImagestringAlwaysLargest avatar URL in the embedded comment payload.
likeCountnumberAlwaysParsed like total; 0 when the comment shows no like count.
likeCountTextstringAlwaysRaw like text such as 69K.
replyCountnumberAlwaysParsed reply count shown for a top-level comment.
isReplybooleanAlwaysWhether the row is a reply rather than a top-level comment.
parentCommentIdstringWhen includeReplies is enabled and the row is a replyComment ID of the parent thread.
isHeartedByCreatorbooleanAlwaysWhether the creator-heart action was present.
isPinnedbooleanAlwaysWhether the comment carried a pinned badge.
publishedTextstringAlwaysRelative publish text such as 7 years ago or 6 years ago (edited).
updatedTextstringWhen the payload exposes an edit timestampRelative edit text, when YouTube includes it.
orderIndexnumberAlwaysZero-based order of the row within the saved result for that video.
channelNamestringAlwaysName of the video's channel.
channelIdstringAlwaysID of the video's channel.
channelUrlstringAlwaysPublic URL of the video's channel.
scrapedAtstringAlwaysTime the row was saved, in ISO UTC.
videoTitlestringAlways in the saved rows; requires includeVideoMetadataVideo title from the watch page's player response.
videoDescriptionstringAlways in the saved rows; requires includeVideoMetadataVideo description from the player response.
videoViewCountnumberAlways in the saved rows; requires includeVideoMetadataView count at collection time.
videoLikeCountnumberWhen includeVideoMetadata is on and the player exposes itVideo like count at collection time.
videoCommentCountnumberWhen includeVideoMetadata is on and the player exposes itTotal comment count reported by the player.
videoDurationSecondsnumberAlways in the saved rows; requires includeVideoMetadataVideo length in seconds.
videoThumbnailstringAlways in the saved rows; requires includeVideoMetadataLargest video thumbnail URL.
metadataSourcestringAlways in the saved rows; requires includeVideoMetadataConstant marker youtube-public-watch-page-embedded-data.

The example below is the complete second saved row from the 2026-10-25 run. It includes full text and description values.

{
"recordType": "youtube_comment",
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgwPwTibxdgqCHZxktd4AaABAg",
"commentUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgwPwTibxdgqCHZxktd4AaABAg",
"text": "My algebra teacher said that this was a link to the test answers",
"textLength": 64,
"authorName": "@bdr8823",
"authorChannelId": "UCdi6tGxvFvTRGe-7dAn7m7w",
"authorUrl": "https://www.youtube.com/channel/UCdi6tGxvFvTRGe-7dAn7m7w",
"authorProfileImage": "https://yt3.ggpht.com/ytc/AIdro_kcDoQJUNDkDzTrA5kaF5ADVujN-6UcDjMP2Kydtw=s88-c-k-c0x00ffffff-no-rj",
"likeCount": 69000,
"likeCountText": "69K",
"replyCount": 639,
"isReply": false,
"isHeartedByCreator": false,
"isPinned": false,
"publishedText": "7 years ago",
"orderIndex": 1,
"channelName": "Rick Astley",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"scrapedAt": "2026-10-25T21:02:04.353Z",
"videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"videoDescription": "The official video for “Never Gonna Give You Up” by Rick Astley. Never: The Autobiography 📚 OUT NOW! Follow this link to get your copy and listen to Rick’s ‘Never’ playlist ❤️ #RickAstleyNever https://linktr.ee/rickastleynever “Never Gonna Give You Up” was a global smash on its release in July 1987, topping the charts in 25 countries including Rick’s native UK and the US Billboard Hot 100. It also won the Brit Award for Best single in 1988. Stock Aitken and Waterman wrote and produced the track which was the lead-off single and lead track from Rick’s debut LP “Whenever You Need Somebody”. The album was itself a UK number one and would go on to sell over 15 million copies worldwide. The legendary video was directed by Simon West – who later went on to make Hollywood blockbusters such as Con Air, Lara Croft – Tomb Raider and The Expendables 2. The video passed the 1bn YouTube views milestone on 28 July 2021. Subscribe to the official Rick Astley YouTube channel: https://RickAstley.lnk.to/YTSubID Follow Rick Astley: Facebook: https://RickAstley.lnk.to/FBFollowID Twitter: https://RickAstley.lnk.to/TwitterID Instagram: https://RickAstley.lnk.to/InstagramID Website: https://RickAstley.lnk.to/storeID TikTok: https://RickAstley.lnk.to/TikTokID Listen to Rick Astley: Spotify: https://RickAstley.lnk.to/SpotifyID Apple Music: https://RickAstley.lnk.to/AppleMusicID Amazon Music: https://RickAstley.lnk.to/AmazonMusicID Deezer: https://RickAstley.lnk.to/DeezerID Lyrics: We’re no strangers to love You know the rules and so do I A full commitment’s what I’m thinking of You wouldn’t get this from any other guy I just wanna tell you how I’m feeling Gotta make you understand Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you We’ve known each other for so long Your heart’s been aching but you’re too shy to say it Inside we both know what’s been going on We know the game and we’re gonna play it And if you ask me how I’m feeling Don’t tell me you’re too blind to see Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you #RickAstley #NeverGonnaGiveYouUp #WheneverYouNeedSomebody #OfficialMusicVideo",
"videoViewCount": 1830492690,
"videoDurationSeconds": 213,
"videoThumbnail": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp",
"metadataSource": "youtube-public-watch-page-embedded-data"
}

Run summary

Run summary is stored separately from the dataset in the run's key-value store under OUTPUT.

FieldMeaning
runTypeRun type marker; always youtube-public-comment-run.
statusActor outcome: SUCCEEDED or FAILED.
dataStatusDataset completeness: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
dataAvailableWhether at least one comment row was saved.
requestedVideoCountUnique videos supplied across videoUrls and videoIds.
processedVideoCountVideos processed, including failed pages.
itemCountComment rows saved.
requestCountWatch-page GET requests attempted; continuation POSTs are not included in this counter.
diagnosticCountDiagnostics recorded in the log when includeDiagnostics is enabled.
failedCountVideos whose page or comments could not be read, plus fatal failures.
blockedCountResponses that looked like a block, CAPTCHA, or bot check.
proxyRequestedWhether a proxy was configured or the proxy fallback was enabled.
proxyConfiguredWhether a proxy URL was actually created for the run.
includeDiagnosticsWhether bounded public-page diagnostics were logged (runtime input includeDiagnostics, default true).
enableProxyFallbackFallback setting applied to the run.
maxItemsRequested unique video count recorded for the run.
maxRetriesRetry count applied per transport and request.
requestDelayMsDelay applied between video targets.
requestTimeoutSecsTimeout applied to watch-page and continuation requests.
durationMsWall-clock run duration in milliseconds.
finishedAtTime the summary was written, in ISO UTC.
runStatusCanonical run status; matches status.
StatusData statusMeaning
SUCCEEDEDCOMPLETEEligible results were saved without an extraction problem.
SUCCEEDEDPARTIALSome results were saved, but a later problem prevented a complete run. Saved rows remain available.
SUCCEEDEDNO_RESULTSThe source completed cleanly and returned no matching results.
FAILEDFAILEDA fatal error occurred before any usable result was saved.

Example OUTPUT from the saved run:

{
"runType": "youtube-public-comment-run",
"status": "SUCCEEDED",
"dataStatus": "COMPLETE",
"dataAvailable": true,
"requestedVideoCount": 1,
"processedVideoCount": 1,
"itemCount": 3,
"requestCount": 1,
"diagnosticCount": 0,
"failedCount": 0,
"blockedCount": 0,
"proxyRequested": false,
"proxyConfigured": false,
"includeDiagnostics": true,
"enableProxyFallback": false,
"maxItems": 1,
"maxRetries": 2,
"requestDelayMs": 0,
"requestTimeoutSecs": 60,
"durationMs": 1040,
"finishedAt": "2026-10-25T21:02:04.574Z",
"runStatus": "SUCCEEDED"
}

Coverage and limitations

The Actor collects what a public watch page exposes at request time: top-level comment threads plus, when includeReplies is enabled, replies embedded with those threads. It also makes one public youtubei/v1/next continuation request when the page provides a token; it does not page through every continuation, so maxCommentsPerVideo can be reached only with the comments available from those responses. The saved result is therefore a first batch, not the full comment history.

sortComments: "top" keeps the embedded order, which usually reflects YouTube's Top comments but is not requested server-side. sortComments: "new" sorts the collected rows by their relative publishedText text, which is approximate and can misorder items; it does not ask YouTube for newest-first results. Reply collection is limited to replies included with a thread. Deleted, held-for-review, hidden, or members-only comments are not returned. Like and reply counts are point-in-time and rounded (likeCountText preserves the displayed abbreviation). requestDelayMs is applied between videos, not between a watch page and its continuation. Videos without embedded comment threads are counted in failedCount and reported in OUTPUT rather than represented as empty or fabricated rows.

Usage and support

The main cost is Apify compute for one watch-page request per video plus up to one continuation request and one optional section lookup. Keep videoUrls/videoIds and maxCommentsPerVideo small while testing. Because enableProxyFallback defaults to true, a blocked direct request can fall back to Apify Proxy and incur proxy usage; set it to false for direct-only runs. See the Actor's Pricing tab for current account rates.

Use the Actor Issues page to report a problem. Include the run ID, the input used, and the OUTPUT summary; do not include tokens, cookies, or private data. This Actor is not affiliated with YouTube or Google. Use it only for public data and in accordance with YouTube's terms, robots guidance, and applicable law. Comments contain personal information; use the output only for lawful purposes.