Skip to main content
Glama

youtube-comments-scraper

Collect YouTube comments and replies from videos, channels, playlists, or searches, then sort, filter, and export them for audience research and moderation.

Instructions

YouTube Comments Scraper — $0.50/1K comments & replies. Scrape YouTube comments and replies from videos, whole channels, playlists or a YouTube search: text, likes, creator hearts, pinned flag, reply count, commenter channel and video stats. Sort newest or top, filter by keyword, likes and date. Export, run via API, schedule, or use with AI agents.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "youtube-comments-scraper"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNo↕️ Sort comments — Newest first plus a date cutoff turns a scheduled run into a feed of what was said since last time.top
keywordNo🔎 Keyword in comment — Keep only comments whose text contains this word or phrase (case-insensitive). Several alternatives: separate with |, e.g. battery|charging.
languageNo🌐 Language — Two-letter language for YouTube's interface text, such as en, de, id. Affects comment ages ("2 weeks ago") and video metadata labels, not the comments themselves.en
minLikesNo👍 Minimum likes — Keep only comments with at least this many likes.
videoUrlsNo🎬 Video URLs or IDs — YouTube video links or 11-character video IDs, one per line: https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://youtu.be/dQw4w9WgXcQ, a Shorts link, or just dQw4w9WgXcQ.
channelUrlsNo📺 Channel URLs — Channel links, one per line — https://www.youtube.com/@mkbhd or a /channel/UC… link. The channel's latest videos are collected (see Videos per channel) and their comments scraped.
playlistUrlsNo📋 Playlist URLs — Playlist links, one per line. Every video in the playlist is scraped, up to Videos per channel.
commentsSinceNo📅 Only comments since — Skip comments older than this: a date such as 2026-06-01 or a period such as 7 days, 3 months. YouTube shows ages, not dates, so the cutoff is applied to that age. With Newest first collection stops at the first older comment.
searchQueriesNo🔍 YouTube search — Search YouTube and scrape the comments of the top results — "iphone 17 review", "n8n tutorial". Up to Videos per channel videos per query.
includeRepliesNo↩️ Include replies — Also collect the replies under each comment. Each reply is its own row with parentCommentId set.
maxVideosPerSourceNo📹 Videos per channel / playlist / search — How many videos to take from each channel, playlist or search — newest first for channels, playlist order for playlists, YouTube's ranking for searches.
onlyCreatorHeartedNo❤️ Only comments hearted by the creator — Keep only comments the channel owner marked with a heart — the ones the creator noticed.
proxyConfigurationNoProxy — YouTube serves video pages from Apify's data-centre addresses but answers the comments continuation with 403, so a run moves itself onto a residential proxy the first time that happens. Bring your own proxies here to keep the run on them instead.
includeVideoDetailsNo🎥 Video summary rows — Add one row per video with title, channel, views, likes, publish date, duration and how many comments were collected (rowType = video). These rows have different columns from the comment rows, so the table shows blanks where a column does not apply.
maxCommentsPerVideoNo💬 Comments per video — Stop after this many comments per video (replies count too when included). 0 = all comments; a viral video can have hundreds of thousands.
maxRepliesPerCommentNoReplies per comment — Cap on replies collected under one comment. 0 = all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose a genuinely useful behavioral trait — pricing at '$0.50/1K comments & replies' — which lets an agent reason about cost for high-volume scraping, and it enumerates the returned fields. However, it says nothing about authentication (Apify token), run mode (sync vs async/dataset retrieval), rate limits, or the 403 residential-proxy fallback that the proxyConfiguration param describes; those operational traits are left entirely to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded: the resource, sources, and returned fields come first in a dense run of clauses with no wasted framing. The final sentence ('Export, run via API, schedule, or use with AI agents') is generic platform boilerplate that does not help an agent decide or invoke, which keeps it short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter, zero-required, no-output-schema tool, the description compensates well by enumerating the output fields (text, likes, hearts, pinned, reply count, commenter channel, video stats) and the source modes, which is exactly what an agent needs absent an output schema. What is missing is the delivery mechanism — that results land in a dataset and how a run is started or polled — plus any auth prerequisite, which matters for a paid scraper.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every one of the 16 parameters carries a detailed, emoji-tagged description with defaults and edge cases (0 = all comments, date-or-period cutoff semantics, '|' alternation for keywords). The description's parameter summary ('Sort newest or top, filter by keyword, likes and date') restates the schema at a high level and adds no syntax or default information beyond it, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Scrape YouTube comments and replies') and enumerates the four supported source types (videos, channels, playlists, YouTube search), which map directly to the videoUrls/channelUrls/playlistUrls/searchQueries parameters. It also lists the returned fields (text, likes, creator hearts, pinned flag, reply count, commenter channel, video stats), so an agent can tell immediately whether this tool fits a request that the sibling transcript and threads scrapers do not serve.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: the source enumeration and the phrase 'Sort newest or top, filter by keyword, likes and date' hint at the shapes of supported requests, and sorting/filtering guidance lives in the schema (e.g. 'Newest first plus a date cutoff turns a scheduled run into a feed'). There is no explicit when-to-use versus alternatives, no prerequisite or auth guidance, and the tail sentence about export/API/schedule/AI agents is platform marketing rather than selection advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.