YouTube Comments Scraper: Top & Newest, Incremental avatar

YouTube Comments Scraper: Top & Newest, Incremental

Pricing

from $0.12 / 1,000 comment rows

Go to Apify Store
YouTube Comments Scraper: Top & Newest, Incremental

YouTube Comments Scraper: Top & Newest, Incremental

Pass YouTube video URLs, Shorts, IDs, or channels to extract top or newest comments with likes, replies, author IDs, creator hearts, and timestamps. Enable includeReplies for reply rows, oldestCommentDate, or onlyNewItems. Status rows are free. Unofficial tool, not affiliated with YouTube.

Pricing

from $0.12 / 1,000 comment rows

Rating

0.0

(0)

Developer

Kizuki

Kizuki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

Pass YouTube video URLs, Shorts links, 11-character IDs, or channel URLs to extract top or newest comments (and optional reply rows) with comment text, like counts, reply counts, creator hearts, author names, author channel IDs, pinned/creator flags, and estimated ISO timestamps.

Filter recent comments with oldestCommentDate, or turn on onlyNewItems on a schedule to return and pay only for comments that arrived since the previous run. Empty input ({}) reads comments from sample video dQw4w9WgXcQ. This Actor is an unofficial tool and is not affiliated with, endorsed by, or sponsored by YouTube or Google.

What goes in and what comes out

InputWhat it returns
videoUrls (watch?v=..., youtu.be/..., /shorts/..., or 11-char IDs)One row per comment (type: "comment") up to maxCommentsPerVideo and maxItems
channels (@handle, /channel/..., /c/..., /user/, or UC... ID)Reads up to maxVideosPerChannel recent videos of each channel and extracts their comments
sortBy ("top" or "newest")"top" (default) returns top comments; "newest" returns newest comments first
includeReplies: trueAlso extracts comment replies as separate comment rows with parentCommentId set
oldestCommentDate (ISO date or "7 days")Skips comments older than the cutoff date
onlyNewItems: trueRemembers delivered commentIds per input for 90 days and returns only unseen comments

Quick start

Extract the top 100 comments (and replies) from a video or Short:

{
"videoUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sortBy": "top",
"includeReplies": true,
"maxCommentsPerVideo": 100,
"maxItems": 100
}

Monitor newest comments across a channel's latest videos on a schedule:

{
"channels": [
"https://www.youtube.com/@TED"
],
"sortBy": "newest",
"maxVideosPerChannel": 3,
"maxCommentsPerVideo": 40,
"onlyNewItems": true,
"maxItems": 100
}

Output fields

Every row contains the 26 fields below (null when a field does not apply, plus isNew when onlyNewItems is enabled). When includeReplies is true, each reply is emitted as its own comment row with parentCommentId linking to the parent comment.

FieldTypeDescription
idstringStable ID: comment:<commentId> or video-comments:<videoId> on status rows
typestringcomment on delivered comments, status on uncharged error rows
sourcestringAlways youtube-comments
urlstring | nullDirect comment permalink (watch?v=<id>&lc=<commentId>) or watch URL
commentIdstring | nullYouTube comment ID (null on status rows)
parentCommentIdstring | nullParent comment ID on reply rows (null on top-level comments and status rows)
videoIdstring11-character YouTube video ID
videoTitlestring | nullTitle of the video
videoUrlstringCanonical video URL (https://www.youtube.com/watch?v=<videoId>)
channelIdstring | nullChannel ID (UC...) of the video
totalCommentsCountinteger | nullTotal comment count from the comments header when present
authorstring | nullComment author display name or @handle
authorChannelIdstring | nullPublic channel ID (UC...) of the comment author
authorChannelUrlstring | nullPublic channel URL of the comment author
textstring | nullComment body text (up to 5,000 characters)
likeCountinteger | nullParsed numeric like count ("1.2K likes" -> 1200)
replyCountinteger | nullNumber of replies to the comment
publishedTextstring | nullRelative time label as shown on YouTube (e.g. "2 days ago")
publishedAtstring | nullEstimated ISO 8601 UTC timestamp derived from publishedText
publishedAtIsEstimatebooleantrue when publishedAt was computed from a relative label
isEditedbooleantrue when YouTube marks the comment as (edited)
isPinnedbooleantrue when the channel owner pinned the comment
isOwnerbooleantrue when the channel owner posted the comment
hasCreatorHeartbooleantrue when the video creator hearted this comment
sortstring | nullSort order read (top or newest), null on status rows
errorobject | nullnull on comment rows; {type, message} on uncharged status rows
isNewbooleanPresent only when onlyNewItems is true

Output example

{
"id": "comment:UgzKYksqeQ5gA3t0g0F4AaABAg",
"type": "comment",
"source": "youtube-comments",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgzKYksqeQ5gA3t0g0F4AaABAg",
"commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg",
"parentCommentId": null,
"videoId": "dQw4w9WgXcQ",
"videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"totalCommentsCount": 2462487,
"author": "@grustache4569",
"authorChannelId": "UCKrzgYonJnMd0Dk7zQXjYXw",
"authorChannelUrl": "https://www.youtube.com/channel/UCKrzgYonJnMd0Dk7zQXjYXw",
"text": "Example comment text.",
"likeCount": 108000,
"replyCount": 721,
"publishedText": "6 years ago (edited)",
"publishedAt": "2020-11-18T00:00:00.000Z",
"publishedAtIsEstimate": true,
"isEdited": true,
"isPinned": false,
"isOwner": false,
"hasCreatorHeart": false,
"sort": "top",
"error": null
}

Input parameters

FieldDefaultDescription
videoUrls[]Up to 100 YouTube watch URLs, youtu.be links, Shorts URLs, or 11-character IDs (accepts lists or comma/newline-separated text)
channels[]Up to 20 YouTube channels (@handle, /channel/, /c/, /user/, or UC... ID)
sortBytoptop (most relevant/liked) or newest (latest first)
maxCommentsPerVideo100Maximum comments (and replies when includeReplies is true) per video (1 to 2,000)
maxVideosPerChannel5Recent videos per channel when channels is used (1 to 15)
includeRepliesfalseSet true to also extract reply rows with parentCommentId
oldestCommentDate""Optional cutoff date (YYYY-MM-DD, ISO timestamp, or relative age such as 7 days)
onlyNewItemsfalseReturn and charge only comments not delivered in earlier runs with the same input
maxItems20Maximum rows per run across all inputs (1 to 5,000)
debugSnapshotfalseSave a diagnostic snapshot in the key-value store if a video fails to parse
proxyConfiguration{"useApifyProxy": false}Leave empty or {} for direct connection, or configure Apify proxy when needed for regional access

Scheduled monitoring with onlyNewItems

Enable onlyNewItems: true with sortBy: "newest" on a scheduled Task to track newly posted comments without paying twice for comments already delivered. Delivered comment IDs are kept per input configuration (sortBy, includeReplies, oldestCommentDate, channels, and videoUrls) for 90 days. Uncharged status rows are never marked as delivered, so the next run retries those videos. Avoid running the exact same input concurrently, as parallel runs read the same previous state.

Pricing and free tier

Launch pricing. YouTube Comments Scraper uses pay-per-event pricing (comment): you pay only for comment or reply rows returned (type: "comment" and error: null).

Apify plan (discount tier)Price per 1,000 commentsPrice per comment
Free$0.20$0.00020
Starter (Bronze)$0.16$0.00016
Scale (Silver)$0.14$0.00014
Business (Gold)$0.12$0.00012

Apify's Free plan includes USD 5 of monthly usage, which covers about 25,000 comments at the Free tier price, run start fees aside.

  • Run start fee: platform default ($0.00005 per GB of memory per run; default memory is 256 MB).
  • What is not charged: status rows (comments-disabled, video-unavailable, comments-unavailable, bot-check, consent), comments skipped because they were already delivered in earlier onlyNewItems runs or older than oldestCommentDate, invalid inputs, and rows beyond maxItems or maxCommentsPerVideo.

Use with AI agents (MCP)

Connect this Actor to Claude, Cursor, or n8n agents through the Apify MCP server:

https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-comments-scraper
  • Claude Code: claude mcp add --transport http apify "https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-comments-scraper"
  • Claude Desktop / claude.ai: open Customize → Connectors, choose Add custom connector, and paste the URL above.
  • Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-comments-scraper"
}
}
}
  • n8n: add an MCP Client Tool node to an AI Agent, set the endpoint to the URL above, and pass your Apify API token as Bearer auth (or use the @apify/n8n-nodes-apify community node).

Keep maxItems small (default 20) in interactive agent calls so runs return inside the MCP timeout.

API examples

cURL

curl -X POST "https://api.apify.com/v2/acts/kizukidata~youtube-comments-scraper/runs" \
-H "Authorization: Bearer <APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"videoUrls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"sortBy":"top","maxItems":20}'

Python

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("kizukidata/youtube-comments-scraper").call(run_input={
"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"sortBy": "newest",
"maxCommentsPerVideo": 100,
"maxItems": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item["type"] == "comment":
print(item["author"], item["likeCount"], item["text"])

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('kizukidata/youtube-comments-scraper').call({
videoUrls: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
sortBy: 'top',
maxItems: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((row) => row.type === 'comment'));

Limitations

  • Replies are optional: set includeReplies: true to fetch reply rows with parentCommentId; by default only top-level comments and replyCount are returned.
  • Estimated timestamps: YouTube shows relative comment ages ("2 days ago"), so publishedAt is computed from the run timestamp and flagged with publishedAtIsEstimate: true. Use sortBy: "newest" when pairing with oldestCommentDate to stop scanning older pages automatically.
  • No login or private videos: only publicly visible comments on public videos and Shorts are extracted; no API key is required.
  • Status rows: if a video has comments turned off or cannot be read, a status row with error.type is written to the dataset and is not charged.