YouTube Comments Scraper API avatar

YouTube Comments Scraper API

Pricing

from $0.80 / 1,000 comments

Go to Apify Store
YouTube Comments Scraper API

YouTube Comments Scraper API

Scrape YouTube comments and replies: text, author, likes, reply count and date, sorted by top or newest. $0.80 per 1,000 comments, pay-per-comment, failed items never charged. No API key, no quota. Callable from any MCP client (Claude, Cursor, ChatGPT).

Pricing

from $0.80 / 1,000 comments

Rating

0.0

(0)

Developer

Api Harbor

Api Harbor

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Features

Limited permissions

Share

Scrape the comments of any YouTube video: text, author, likes, reply count and date, with the replies if you want them. Sort by top comments or newest first. Built for sentiment analysis, LLM and AI agent pipelines, and callable from any MCP client (Claude, Cursor, ChatGPT). No YouTube API key, no login, no quota. Export to JSON, CSV or Excel, or call it as a YouTube comments API.

Price promise: $0.80 per 1,000 comments, pay-per-comment. Failed items and error rows are never charged. No proxy fees, no YouTube API key, no Google Cloud quota.

What does YouTube Comments Scraper do?

Give it a list of YouTube videos. For each video, it returns one item per comment:

  • Video ID, comment ID and, for replies, the parent comment ID
  • Comment text
  • Author handle and channel ID
  • Likes, reply count and relative date

Accepted input: any YouTube URL (watch?v=, youtu.be/, shorts/, live/, embed/) or the 11-character video ID.

What you get back

FieldTypeDescription
videoIdstringYouTube video ID
commentIdstringComment ID
parentIdstringParent comment ID (replies only)
textstringComment text
authorstringAuthor handle, e.g. @SanDiegoZoo
authorIdstringAuthor channel ID
likesstringLike count as shown by YouTube, e.g. 4.8M
replyCountstringNumber of replies
publishedstringRelative date, e.g. 6 years ago
inputstringInput that failed (error rows only)
errorstringError message (error rows only, never charged)

Why this YouTube comments API instead of the official one

  • No API key, no quota. No Google Cloud project, no daily limit.
  • Pay only for what you get. $0.80 per 1,000 comments, replies included. Error rows are never charged.
  • Replies included on demand. Turn on includeReplies to get threads linked by parentId, capped by maxReplies.
  • Agent-ready. Clean JSON, structured errors, usable as an MCP tool.

Use cases for LLMs, AI agents and research

  • LLM sentiment analysis: let Claude or ChatGPT classify viewer reactions to a product, a brand or a launch.
  • AI agents: ask an MCP client to read the comments of a video and report questions, complaints and feature requests.
  • RAG and AI datasets: gather real conversations for classification, embeddings or fine-tuning.
  • Market and product research: collect pain points, questions and feature requests.
  • Influencer vetting: check the engagement quality on a creator's videos.

How much does it cost?

WhatPrice
Run start$0.00005 per run
Comment$0.80 per 1,000 comments
Failed item (error row)$0
Proxies, API key$0, included

The Apify free plan includes $5 of monthly credit, enough for about 6,000 comments. Set a maximum cost per run in Apify Console and the run stops cleanly at that budget.

How to scrape YouTube comments

  1. Click Try for free.
  2. Paste YouTube video URLs or IDs, choose the number of comments per video and whether to include replies.
  3. Click Start, then download your data as JSON, CSV, Excel or HTML.

Need to find videos first? Use YouTube Search Scraper. Want what is said in the video itself? Use YouTube Transcript Scraper.

Input

{
"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"maxComments": 100,
"includeReplies": true,
"maxReplies": 20,
"sort": "TOP_COMMENTS"
}

Output example

Real items from a test run (a comment and one of its replies):

[
{
"videoId": "jNQXAC9IVRw",
"commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
"text": "We're so honored that the first ever YouTube video was filmed here!",
"author": "@SanDiegoZoo",
"authorId": "UCC5NfQ6Mf0dq_eEwv4P_hWA",
"likes": "4.8M",
"replyCount": "986",
"published": "6 years ago"
},
{
"videoId": "jNQXAC9IVRw",
"commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg.958xaQsh63D95AEkVnh_di",
"parentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
"text": "How did I randomly go to this video and see this comment 11 hours after it was posted? That's amazing",
"author": "@tacticals.1811",
"authorId": "UCS2FiwDUXi_VJwC7HGJl4sw",
"likes": "57K",
"replyCount": "0",
"published": "6 years ago"
}
]

Use it from AI agents (MCP)

This Actor is available as a tool through the Apify MCP server, so Claude, Cursor, ChatGPT or any MCP client can call it directly.

  • MCP server URL: https://mcp.apify.com/?actors=api_harbor/youtube-comments-scraper
  • Token: Apify Console > Settings > Integrations (your Apify API token)

Claude Desktop (claude_desktop_config.json):

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?actors=api_harbor/youtube-comments-scraper",
"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
}
}
}

Claude Code:

$claude mcp add --transport http apify "https://mcp.apify.com/?actors=api_harbor/youtube-comments-scraper" --header "Authorization: Bearer <APIFY_TOKEN>"

Cursor (.cursor/mcp.json) or VS Code (.vscode/mcp.json, use "servers" instead of "mcpServers"):

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?actors=api_harbor/youtube-comments-scraper",
"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
}
}
}

Example prompts:

  • "Get the top 200 comments of https://www.youtube.com/watch?v=jNQXAC9IVRw and summarize the overall sentiment."
  • "Read the newest comments on my last video and list every question viewers ask."
  • "Compare the comments of these two product reviews and extract the main complaints about each product."

Use it from Python (YouTube API alternative)

$pip install apify-client
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("api_harbor/youtube-comments-scraper").call(run_input={"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "maxComments": 100, "includeReplies": True})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item.get("error"):
print("failed:", item.get("input"), item["error"]) # not charged
continue
print(item)

Fast cache and structured errors

  • Cache: identical inputs are served from cache, so repeated requests come back in seconds.
  • Structured errors: an item that cannot be fetched is returned as a row with an error field (and the failed input). These rows are never charged, and your agent or pipeline can branch on them without parsing logs.

FAQ

Do I need to log in or have a YouTube API key? No. No login, no Google account, no API key. Nothing to configure.

Does maxComments count replies? No. It caps top-level comments per video. Replies are capped separately by maxReplies (per comment, 20 by default). The maximum per video is maxComments × (1 + maxReplies).

Is it legal to scrape YouTube comments? Comments are public, but they contain personal data such as usernames. You are responsible for complying with GDPR, your local laws and YouTube's terms for your use case.

Is there a YouTube comments API? Yes: this Actor is one. Call it through the Apify REST API (POST https://api.apify.com/v2/acts/api_harbor~youtube-comments-scraper/run-sync-get-dataset-items), the Python or JavaScript client, or MCP. The official YouTube Data API does not cover this use case without quota limits.

Can I use it from Python? Yes. See the Python example above with apify-client.

Can I schedule runs? Yes. Create a schedule in Apify Console (for example daily on your latest videos). Each run writes a new dataset you can export or send to a webhook.

Does it work with Make, Zapier or n8n? Yes. Use the official Apify integrations for Make, Zapier and n8n, or call the REST API from any HTTP node.

Can AI agents use it through MCP? Yes. Add https://mcp.apify.com/?actors=api_harbor/youtube-comments-scraper to Claude Desktop, Claude Code, Cursor, VS Code or any MCP client with your Apify token. See the MCP section above.

Something is missing or broken? Open an issue in the Issues tab.