YouTube Comment Scraper
Pricing
from $2.99 / 1,000 comments
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
23 days ago
Last modified
Categories
Features
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
- Open the Actor Store page and select Try for free or open the Input tab.
- Provide at least one video in
videoUrlsorvideoIds. Watch, Shorts, live, embed, youtu.be, and bare-ID forms are accepted. - Set
maxCommentsPerVideo; enableincludeRepliesandincludeVideoMetadataif you need thread replies or video-level fields. - 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.
| Field | Type | Required? | Default | Meaning |
|---|---|---|---|---|
videoUrls | string array | Optional | Not supplied | Public YouTube URLs or bare 11-character IDs; accepts watch, Shorts, live, embed, youtu.be, and music URLs. Up to 50 entries. |
videoIds | string array | Optional | Not supplied | Additional bare 11-character video IDs; up to 50 entries. |
maxCommentsPerVideo | integer | Optional | 100 | Cap on saved top-level comments plus replies per video after extraction. 1–500. |
sortComments | string enum | Optional | top | top 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. |
includeReplies | boolean | Optional | false | Save replies that are embedded with a thread and set isReply/parentCommentId. |
includeVideoMetadata | boolean | Optional | true | Add video title, description, view/like/comment counts, duration, thumbnail, channel, and metadataSource. |
enableProxyFallback | boolean | Optional | true | Retry through the other transport after the configured route fails: direct then Apify Proxy by default, or Proxy then direct when a proxy is configured. |
maxRetries | integer | Optional | 2 | Retry attempts per transport and request, 0–3. |
requestDelayMs | integer | Optional | 250 | Delay applied between video targets, 0–5000 ms; it is not applied between the watch page and its continuation request. |
requestTimeoutSecs | integer | Optional | 60 | Timeout for one watch-page or continuation request, 15–180 seconds. |
proxyConfiguration | object | Optional | Not supplied | Standard 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.
| Field | Type | Availability | Meaning |
|---|---|---|---|
recordType | string | Always | Record type; always youtube_comment. |
videoId | string | Always | 11-character ID of the video the comment belongs to. |
videoUrl | string | Always | Canonical https://www.youtube.com/watch?v=… URL. |
sourceUrl | string | Always | Public watch-page URL used as the source. |
commentId | string | Always | YouTube comment identifier used for &lc= links. |
commentUrl | string | Always | Watch URL with the lc parameter for the comment. |
text | string | Always | Comment text as displayed. |
textLength | number | Always | Character count of text. |
authorName | string | Always | Display name of the commenter. |
authorChannelId | string | Always | Channel ID of the commenter when the payload exposes it. |
authorUrl | string | Always | Commenter channel URL derived from authorChannelId. |
authorProfileImage | string | Always | Largest avatar URL in the embedded comment payload. |
likeCount | number | Always | Parsed like total; 0 when the comment shows no like count. |
likeCountText | string | Always | Raw like text such as 69K. |
replyCount | number | Always | Parsed reply count shown for a top-level comment. |
isReply | boolean | Always | Whether the row is a reply rather than a top-level comment. |
parentCommentId | string | When includeReplies is enabled and the row is a reply | Comment ID of the parent thread. |
isHeartedByCreator | boolean | Always | Whether the creator-heart action was present. |
isPinned | boolean | Always | Whether the comment carried a pinned badge. |
publishedText | string | Always | Relative publish text such as 7 years ago or 6 years ago (edited). |
updatedText | string | When the payload exposes an edit timestamp | Relative edit text, when YouTube includes it. |
orderIndex | number | Always | Zero-based order of the row within the saved result for that video. |
channelName | string | Always | Name of the video's channel. |
channelId | string | Always | ID of the video's channel. |
channelUrl | string | Always | Public URL of the video's channel. |
scrapedAt | string | Always | Time the row was saved, in ISO UTC. |
videoTitle | string | Always in the saved rows; requires includeVideoMetadata | Video title from the watch page's player response. |
videoDescription | string | Always in the saved rows; requires includeVideoMetadata | Video description from the player response. |
videoViewCount | number | Always in the saved rows; requires includeVideoMetadata | View count at collection time. |
videoLikeCount | number | When includeVideoMetadata is on and the player exposes it | Video like count at collection time. |
videoCommentCount | number | When includeVideoMetadata is on and the player exposes it | Total comment count reported by the player. |
videoDurationSeconds | number | Always in the saved rows; requires includeVideoMetadata | Video length in seconds. |
videoThumbnail | string | Always in the saved rows; requires includeVideoMetadata | Largest video thumbnail URL. |
metadataSource | string | Always in the saved rows; requires includeVideoMetadata | Constant 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.
| Field | Meaning |
|---|---|
runType | Run type marker; always youtube-public-comment-run. |
status | Actor outcome: SUCCEEDED or FAILED. |
dataStatus | Dataset completeness: COMPLETE, PARTIAL, NO_RESULTS, or FAILED. |
dataAvailable | Whether at least one comment row was saved. |
requestedVideoCount | Unique videos supplied across videoUrls and videoIds. |
processedVideoCount | Videos processed, including failed pages. |
itemCount | Comment rows saved. |
requestCount | Watch-page GET requests attempted; continuation POSTs are not included in this counter. |
diagnosticCount | Diagnostics recorded in the log when includeDiagnostics is enabled. |
failedCount | Videos whose page or comments could not be read, plus fatal failures. |
blockedCount | Responses that looked like a block, CAPTCHA, or bot check. |
proxyRequested | Whether a proxy was configured or the proxy fallback was enabled. |
proxyConfigured | Whether a proxy URL was actually created for the run. |
includeDiagnostics | Whether bounded public-page diagnostics were logged (runtime input includeDiagnostics, default true). |
enableProxyFallback | Fallback setting applied to the run. |
maxItems | Requested unique video count recorded for the run. |
maxRetries | Retry count applied per transport and request. |
requestDelayMs | Delay applied between video targets. |
requestTimeoutSecs | Timeout applied to watch-page and continuation requests. |
durationMs | Wall-clock run duration in milliseconds. |
finishedAt | Time the summary was written, in ISO UTC. |
runStatus | Canonical run status; matches status. |
| Status | Data status | Meaning |
|---|---|---|
SUCCEEDED | COMPLETE | Eligible results were saved without an extraction problem. |
SUCCEEDED | PARTIAL | Some results were saved, but a later problem prevented a complete run. Saved rows remain available. |
SUCCEEDED | NO_RESULTS | The source completed cleanly and returned no matching results. |
FAILED | FAILED | A 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.