YouTube Comments Scraper
The comments on a YouTube video as typed JSON, top or newest first: author, comment text, likes, reply count, creator heart and time. Pass a watch URL or video ID. 1 credit per page. No YouTube login, no proxies.
Free API key · 1 credit per page of comments · failed calls free
// GET /api/v2/youtube-comments-scraper/?urls=https://www.youtube.com/watch?v=uKv3mi2t2KE · sample from the catalog { "success": true, "data": { "urls": "https://www.youtube.com/watch?v=uKv3mi2t2KE", "video_id": "uKv3mi2t2KE", "page": 1, "page_size": 20, "comments": [ { "cid": "Ugx3cSNbOeJMcSWom1R4AaABAg", "type": "comment", "published_time_text": "7 months ago", "comment": "🚨 Watch our three part episode series on the Student Revolution that took Bangla", "author": "@thedeshbhakt", "author_channel_id": "UCmTM_hPCeckqN3cPWtYZZcg", "avatar": "https://yt3.ggpht.com/DfVqzaxetTmlyiL2oZHng3i9nKBEKJWWjQoPVUYf3U9Qq6rxDeCtaXjCUj9ARjqdluzwbv_r=s88-c-k-c0x00ffffff-no-rj", "author_is_channel_owner": true, "is_verified": true, "vote_count": 264, "has_creator_heart": true, "reply_count": 72, "reply_to_cid": null } ], "next_cursor": "eyJ2IjoidUt2M21pMnQyS0UiLCJ0IjoiRWtNU0MuLi4iLCJwIjoxfQ" } }
| field | value | type | Has a value✓ |
|---|
Scrapier's YouTube Comments Scraper returns the comments on a YouTube video as JSON, a page at a time: comment, author, like_count, reply_count, has_creator_heart and published_time_text. It costs 1 credit per successful call. No YouTube login.
YouTube Comments Scraper extracts the comments of one video per call: comment ID and text, author name and channel ID, like count, reply count, whether the creator hearted it, whether the author is the channel owner or verified, and when it was posted. Sort by top or newest. Every response is structured JSON, ready to pass directly to an LLM, index into a vector store or feed a sentiment pipeline. It is one of 17 YouTube endpoints on the same API key used by 12,000+ developers. Follow next_cursor to read the next page.
What data can I extract with YouTube Comments Scraper?
Using this YouTube Comments Scraper, you can extract the following data from public YouTube pages of comments:
Want the exact field names? See the example output.
Try YouTube Comments Scraper Live
Press Run to see the catalog sample. Add your API key and it runs a real call to the Scrapier API from your browser. The key is sent only to proxy.scrapier.io and never stored.
+ Run live with your API key
How to use YouTube Comments Scraper
Hand it to your AI assistant, or run it yourself in five steps.
Copy to your AI assistant
Paste this into ChatGPT, Claude or Cursor and it knows how to call the scraper.
Use the Scrapier YouTube Comments Scraper to get public YouTube pages of comments. Endpoint: GET https://proxy.scrapier.io/api/v2/youtube-comments-scraper/?urls={urls} with header "X-API-Key: YOUR_API_KEY" and a 210-second timeout. Send one value per call in urls; for a list, make one call per value, at most 3 in parallel. It returns JSON under data.comments: cid, type, published_time_text, comment, author, author_channel_id, avatar, author_is_channel_owner, is_verified, vote_count, has_creator_heart, reply_count. Each successful call costs 1 credit; failed calls are free. If you support MCP, run: claude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY" and call run_scrape with endpoint "youtube-comments-scraper" (find it with search_endpoints).Use this scraper from ChatGPT, Claude or Cursor. Point your assistant at Scrapier and it reads YouTube pages of comments on its own: no glue code, no scraping logic in your prompts.
Run it yourself
- Get your free Scrapier API keySign up at app.scrapier.io; the free tier lets you try it first.
- Open YouTube Comments Scraper in the catalogIt lives under Scrapers / YouTube.
- Enter the video URL or IDFor example
https://www.youtube.com/watch?v=uKv3mi2t2KE, a youtu.be link or the bare 11-character video ID. Setsort_bytotopornewest. - Send your API requestOne GET with your key in the
X-API-Keyheader, or onerun_scrapecall from your agent. Set a 210-second client timeout. - Save your resultsEach page comes back as JSON in
data.comments: store it as is, or flatten it to CSV. Passdata.next_cursorback to get the next page until it is null.
How to scale to bulk YouTube pages of comments
urls takes one video per call, so for a list of videos you loop: one request per video. Within a video, pass back data.next_cursor to page through the comments. Run up to 3 requests in parallel per API key; above that the API answers 429 with a Retry-After header, and throttled calls cost nothing. Each page is 1 credit and failed calls are free, so 1,000 pages cost 1,000 credits, inside the Hobby plan's 15,000.
Features
YouTube Comments Scraper turns the comment section of a video into clean rows. It suits sentiment analysis, community research, moderation audits and any workflow that needs the words, authors and engagement behind a video, without a Google API quota.
- Text
commentwith the author inauthorandauthor_channel_id - Engagement
like_count,vote_countandreply_countas numbers - Creator signals
has_creator_heart,author_is_channel_ownerandis_verified - Sort
sort_bypickstopornewestcomments - Locale
languageandregionset the hl and gl values used - Paging
next_cursorwalks the comment section page by page
Proxies, retries and parsing run on Scrapier's side, so you send one request and get JSON back, at 1 credit per page of comments and 0 credits for a failed call.
Use cases
- Brand analyst pulls the newest comments on a product launch video every hour and scores them for sentiment.
- Creator exports the top comments of their own videos with
like_countandreply_countto find questions worth answering in the next upload. - Researcher collects top comments from 50 videos on one topic into a dataset, one row per comment, for a study of public opinion.
- Community manager lists comments the creator hearted to see which feedback the channel responds to.
- AI engineer gives an RAG pipeline a comments tool: the agent fetches a page of comments for a video URL, summarises the themes and cites
cidvalues.
Running these from an agent? Use the MCP integration and let Claude or Cursor call the scraper directly.
Why choose this Scraper API?
sort_by lets you read the most-liked comments or the latest ones, so one endpoint serves both analysis and monitoring.
urls accepts a watch URL, a youtu.be link or the 11-character video ID (aliases url, video_url and video_id), and the response echoes the video in video_id.
Comments, replies, video details and search share the same key and response envelope, so going from a video to its comments is a change of endpoint, not of code.
Input
The scraper takes one YouTube video per call in urls: a watch URL, a youtu.be link or a bare video ID. sort_by, language and region are optional and locked in the cursor once you start paging. Send parameters in the query string (GET) or as a JSON body (POST).
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
urls | string | Yes | — | A YouTube watch URL, youtu.be link or 11-character video ID. One per call. Required on the first call. Aliases: url, video_url, video_id |
cursor | string | No | — | Pass back data.next_cursor from the previous response to get the next page; null means the last page |
sort_by | string | No | top | top (default) or newest. Locked in the cursor |
language | string | No | en | YouTube interface language (hl), default en. Locked in the cursor |
region | string | No | US | YouTube region (gl), default US. Locked in the cursor |
use_proxy | boolean | No | true | Route through Scrapier's residential proxy pool. Leave as is |
raw_data | boolean | No | false | Return YouTube's raw upstream payload under raw_responses instead of the formatted items |
One video per call: to read ten videos, make ten calls and page each with cursor. Booleans are the strings true or false.
Example input
{
"urls": "https://www.youtube.com/watch?v=uKv3mi2t2KE",
"sort_by": "top",
"language": "en",
"region": "US",
"use_proxy": "true",
"raw_data": "false"
}Error codes
| Status | Meaning | Billed | Fix |
|---|---|---|---|
| 200 | Page of comments data returned in data.comments | Yes | — |
| 400 | Bad or missing input | No | Check urls: one value per call |
| 401 | X-API-Key header missing | No | Add the header |
| 402 | Out of credits (body has balance) | No | Top up; retrying will not help |
| 403 | Invalid or revoked API key | No | Check the key in your dashboard |
| 429 | Throttled | No | Wait Retry-After seconds, then retry |
| 5xx | Upstream failure or timeout | No | Retry with backoff; set a 210 s client timeout |
From the error reference. Any non-2xx response costs 0 credits.
Output
Typed JSON with the same schema on every call. One call returns a page of comments under comments, each with 21 fields, inside the standard data envelope. data also carries the video_id. Some fields appear twice under different names, such as vote_count and like_count, and are kept as the API returns them. Set raw_data to true if you want YouTube's raw payload instead.
Example output
{
"success": true,
"data": {
"urls": "https://www.youtube.com/watch?v=uKv3mi2t2KE",
"video_id": "uKv3mi2t2KE",
"page": 1,
"page_size": 20,
"comments": [
{
"cid": "Ugx3cSNbOeJMcSWom1R4AaABAg",
"type": "comment",
"published_time_text": "7 months ago",
"comment": "🚨 Watch our three part episode series on the Student Revolution that took Bangla",
"author": "@thedeshbhakt",
"author_channel_id": "UCmTM_hPCeckqN3cPWtYZZcg",
"avatar": "https://yt3.ggpht.com/DfVqzaxetTmlyiL2oZHng3i9nKBEKJWWjQoPVUYf3U9Qq6rxDeCtaXjCUj9ARjqdluzwbv_r=s88-c-k-c0x00ffffff-no-rj",
"author_is_channel_owner": true,
"is_verified": true,
"vote_count": 264,
"has_creator_heart": true,
"reply_count": 72,
"reply_to_cid": null,
"video_id": "uKv3mi2t2KE",
"page_url": "https://www.youtube.com/watch?v=uKv3mi2t2KE",
"title": "BNP Wins Big In Historic Elections | Options For India In Post-Hasina Bangladesh? | Akash Banerjee",
"comments_count": 8300,
"comment_id": "Ugx3cSNbOeJMcSWom1R4AaABAg",
"like_count": 264,
"input_url": "uKv3mi2t2KE",
"scraped_at": "2026-09-14T08:58:22.312Z"
}
],
"next_cursor": "eyJ2IjoidUt2M21pMnQyS0UiLCJ0IjoiRWtNU0MuLi4iLCJwIjoxfQ"
}
}The catalog's sample response for urls=https://www.youtube.com/watch?v=uKv3mi2t2KE, labelled as a sample: live calls return the account's current values.
Comment
| Field | Type | Example | Description |
|---|---|---|---|
comments.cid | string | "Ugx3cSNbOeJMcSWom1R4AaABAg" | Comment ID |
comments.comment_id | string | "Ugx3cSNbOeJMcSWom1R4AaABAg" | Comment ID (same value as cid) |
comments.type | string | "comment" | Record type, comment in the sample |
comments.comment | string | "🚨 Watch our three part episode series on th…" | The comment text |
comments.published_time_text | string | "7 months ago" | Relative time as YouTube shows it, such as 7 months ago |
comments.reply_to_cid | null | null | Parent comment ID when the row is a reply; null for top-level comments |
Author
| Field | Type | Example | Description |
|---|---|---|---|
comments.author | string | "@thedeshbhakt" | Author's handle or name |
comments.author_channel_id | string | "UCmTM_hPCeckqN3cPWtYZZcg" | UC channel ID of the author |
comments.avatar | string | "https://yt3.ggpht.com/DfVqzaxetTmlyiL2oZHng…" | Author avatar URL |
comments.author_is_channel_owner | boolean | true | true when the author owns the channel |
comments.is_verified | boolean | true | true when the author is verified |
Engagement
| Field | Type | Example | Description |
|---|---|---|---|
comments.vote_count | integer | 264 | Likes on the comment |
comments.like_count | integer | 264 | Likes on the comment (same value as vote_count) |
comments.reply_count | integer | 72 | Number of replies to the comment |
comments.has_creator_heart | boolean | true | true when the creator hearted the comment |
Video
| Field | Type | Example | Description |
|---|---|---|---|
comments.video_id | string | "uKv3mi2t2KE" | ID of the video |
comments.page_url | string | "https://www.youtube.com/watch?v=uKv3mi2t2KE" | Watch URL of the video |
comments.title | string | "BNP Wins Big In Historic Elections | Option…" | Title of the video |
comments.comments_count | integer | 8300 | Total comments count shown on the video |
Input and timestamp
| Field | Type | Example | Description |
|---|---|---|---|
comments.input_url | string | "uKv3mi2t2KE" | The video input you sent |
comments.scraped_at | string | "2026-09-14T08:58:22.312Z" | When Scrapier read the page (ISO 8601, UTC) |
Response envelope and paging
| Field | Type | Example | Description |
|---|---|---|---|
success | boolean | true | true on every 200 response |
data.urls | string | "https://www.youtube.com/watch?v=uKv3mi2t2KE" | Your video input, echoed back |
data.video_id | string | "uKv3mi2t2KE" | The resolved video ID |
data.page | integer | 1 | Page number of this response |
data.page_size | integer | 20 | Comments per page |
data.next_cursor | string | "eyJ2IjoidUt2M21pMnQyS0UiLCJ0IjoiRWtNU0MuLi4…" | Pass back as cursor for the next page; null on the last page |
How does it work?
Scrapier sends each request through its residential proxy pool (use_proxy, on by default), so you never manage IPs or proxy accounts.
Retries and parsing of YouTube's pages and responses happen on Scrapier's side. You send one HTTP request and get typed JSON back.
Only publicly visible data is returned: what any visitor sees without signing in. No YouTube account, cookie or Google API key is used for this endpoint.
The schema is stable. When YouTube changes, Scrapier updates the scraper; the field names under comments stay the same.
How do you integrate YouTube Comments Scraper into your stack?
It works with what you already use: any HTTP client, AI agents over MCP, and no-code automation tools. Code samples for cURL, Python and Node.js are on the API tab.
MCP integration for AI agents
This registers the Scrapier MCP server, whose tools reach every Scrapier scraper, including youtube-comments-scraper: the agent finds it with search_endpoints and calls it with run_scrape. Works with Claude Code, Cursor and Windsurf. MCP calls are billed like REST: 1 credit per successful call. Full MCP setup →
No-code tools (n8n, Make, LangChain)
Use the HTTP Request node with your Scrapier API key in an X-API-Key header and point it at /api/v2/youtube-comments-scraper/ with a urls query parameter. Map data.comments into the next node.
Add an HTTP "Make a request" module with the same header and URL, and parse the response as JSON. Map comment and like_count straight into Sheets, Airtable or your CRM.
Wrap the endpoint in a requests-based tool, or load the Scrapier MCP server through LangChain's MCP adapters so the agent finds youtube-comments-scraper with search_endpoints itself.
Pricing and Rate Limits
One YouTube page of comments costs 1 credit, so 1,000 pages of comments cost 1,000 credits: $1.58 on the Pro plan. Failed and empty calls are not billed. Run up to 3 requests in parallel per key; above that the API answers 429 with a Retry-After header.
| Plan | Monthly price | Credits | Pages of comments included | Per 1,000 pages of comments |
|---|---|---|---|---|
| Hobby | $29 | 15,000 | 15,000 | $1.93 |
| Pro | $79 | 50,000 | 50,000 | $1.58 |
| Scale | $299 | 250,000 | 250,000 | $1.20 |
| Enterprise | Custom volume and terms | |||
Prices from the live billing page. See all plans and limits.
Call cost and timing
How we measure this
Credit cost, pagination and the sample come from the live catalog (GET /api/v2/endpoints, /youtube-comments-scraper/, checked 9 Nov 2026). Concurrency and timeout guidance come from the rate limits page of the docs. Scrapier does not publish latency or success-rate figures for this endpoint, so none are shown here.
YouTube Comments Scraper vs the Official YouTube API
| Feature | Scrapier page of comments scraper | Official YouTube API |
|---|---|---|
| Access needed | One Scrapier API key | A Google Cloud project, an API key and a daily quota |
| Which comments | Top or newest comments on any public video | Comment threads through the commentThreads resource, per video |
| Fields returned | 21 fields per comment, including likes, replies and creator heart | Depends on the resource and parts you request |
| Rate limits | Up to 3 parallel requests per key; 429 with Retry-After | Daily quota units set per Google Cloud project |
| Setup | Sign up, copy a key, send a request | Create a project, enable the API, create credentials |
| Cost | 1 credit per page, from $1.20 per 1,000 pages | Free within quota; more needs a quota extension request |
The official YouTube Data API is the better choice when you moderate comments on your own channel, such as replying, deleting or holding comments for review.
Is it legal to scrape YouTube data?
Scraping publicly available YouTube data is generally lawful in many countries, but the answer depends on what you collect, where you are and how you use it. In the US, hiQ Labs v. LinkedIn is the case most often cited on public-data scraping. Scrapier returns only data any visitor can see without logging in. Under GDPR and similar laws, collecting public data can be permissible, but how you store and use personal data, such as names or comment text, must still comply with local data-protection rules, and YouTube's terms apply. Consult legal counsel if your use case involves bulk storage of personal data. This is not legal advice; see our Terms of Use.
Frequently asked questions
What fields does YouTube Comments Scraper return?
Each comment has comment, author, author_channel_id, like_count, reply_count, has_creator_heart, published_time_text, cid and video fields such as title and comments_count: 21 fields in data.comments. Each successful call costs 1 credit and needs no YouTube login.
Can I sort comments by newest or top?
Yes. Set sort_by to top (the default) or newest. The choice is locked into the cursor, so keep it the same while you page through one video with next_cursor.
How do I get more than the first page of comments?
Pass data.next_cursor back as cursor on the next call. Each page is one call at 1 credit, and a null next_cursor means you reached the end. Keep the video input the same while you page.
Does it return replies to comments?
Each comment carries reply_count. The replies themselves come from the YouTube Comment Replies Scraper, which takes a reply continuation token and returns the whole thread in one record.
Does YouTube Comments Scraper require a YouTube account or login?
No. The YouTube Comments Scraper uses no YouTube account or cookies: you send your Scrapier API key in the X-API-Key header and a video URL or ID, and get JSON back. Only public YouTube data is returned, and no Google API key or quota is involved.
How fast does YouTube Comments Scraper run?
Scrapier does not publish a latency figure for this endpoint. Each call reads YouTube live, and scraped_at in the response records when. Set a client timeout of 210 seconds, as the docs recommend for every endpoint.
What happens if the input is wrong or YouTube returns nothing?
If a call fails, the API returns a non-2xx status and costs 0 credits. In code, check the status, then skip that input or retry it later. Throttled calls (429 with a Retry-After header) are free as well, so retry loops cost nothing.
Does YouTube Comments Scraper work with Claude, ChatGPT and other AI agent tools?
Yes. Connect the Scrapier MCP server with claude mcp add -t http scrapier https://mcp.scrapier.io/mcp and your API key in an X-API-Key header; it works in Claude Code, Cursor and Windsurf. The agent finds youtube-comments-scraper with search_endpoints and calls it with run_scrape. Any agent that can call an HTTP endpoint can use the REST API directly.
How does it compare to other YouTube scrapers?
Scrapier charges a flat 1 credit per successful call, and failed calls are free; platforms that bill compute units vary with run time and infrastructure. The same API key and MCP server reach all 199 Scrapier endpoints. Scrapier returns structured JSON for public YouTube data.
Does it return data in a format LLMs can use directly?
Yes. Every response is typed JSON with the same field names on every call: no HTML parsing and no selectors. Pass it straight to an LLM, index it into a vector store or return it from an agent tool.
What happens when YouTube changes its layout or anti-bot system?
Scrapier maintains the scraper. When YouTube changes its pages or internal responses, Scrapier updates it, and your calls keep returning the same JSON field names without changes on your end.
How much does it cost to run YouTube Comments Scraper 1,000 times?
1,000 credits, because each call is 1 credit. That is about $1.93 on Hobby, $1.58 on Pro and $1.20 on Scale, at the plans' price per credit. Failed calls are free.
How do I use YouTube Comments Scraper with Python?
Send a GET request with the requests library to https://proxy.scrapier.io/api/v2/youtube-comments-scraper/ with params={"urls": "https://www.youtube.com/watch?v=uKv3mi2t2KE"}, your key in the X-API-Key header and timeout=210. Read r.json()["data"]["comments"]: it is already JSON, so no HTML parsing is needed.
Is it legal to scrape YouTube data?
It depends on your use and your country, so this is not legal advice. Scrapier returns public YouTube data only. YouTube's terms and privacy law such as GDPR or CCPA apply to how you store and use it. Collect only what you need, and ask a lawyer about your specific case.
Your feedback
Found a bug or missing a field? Let us know. Write to support@scrapier.io and the team replies to every report.
Start Scraping YouTube Pages Of Comments
Public YouTube pages of comments as JSON, 1 credit each, from REST or MCP.