Skip to content

Structured YouTube data: send urls. Cursor-paginated, 1 credit per successful call.

GET · POST1 credit / successful callCursor-paginated
GEThttps://api.scrapier.io/api/v2/youtube-comments-scraper/Open in Playground

Call GET /api/v2/youtube-comments-scraper/ with urls. The results are in data.comments; send data.next_cursor back as cursor to get the next page. 4 optional parameters refine the call (see Parameters).

Terminal window
curl -G "https://api.scrapier.io/api/v2/youtube-comments-scraper/" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "urls=https://www.youtube.com/watch?v=uKv3mi2t2KE" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
urlsstringyese.g. https://www.youtube.com/watch?v=uKv3mi2t2KEYouTube watch URL / youtu.be / bare 11-char id. Required on the first call.
cursorstringno—Pagination cursor returned in the previous response's next_cursor. Pass it back unchanged to fetch the next page. When next_cursor is null, you have reached the last page.
sort_bystringnotopComment sort order. Locked into the cursor.
topnewest
languagestringnoeninnertube hl. Locked into the cursor.
regionstringnoUSinnertube gl. Locked into the cursor.
Advanced
NameTypeDefaultDescription
use_proxybooleantrueRoute the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise.
raw_databooleanfalseWhen true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under raw_responses, in place of the formatted items. When false (default) you get the formatted output. Pagination (cursor / next_cursor) works the same in both modes.
{
"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"
}
}

Sample from the live catalog; arrays trimmed to 3 items. Results are in data.comments.

FieldTypeExampleDescription
urlsstringhttps://www.youtube.com/watch?v=uKv3mi2t2KE—
video_idstringuKv3mi2t2KE—
pageinteger1—
page_sizeinteger20—
commentsarray[1 item]The results.
next_cursorstringeyJ2IjoidUt2M21pMnQyS0UiLCJ0IjoiRWtNU0MuLi4iL…Pass back as cursor for the next page. null on the last page.
comments[].cidstringUgx3cSNbOeJMcSWom1R4AaABAg—
comments[].typestringcomment—
comments[].published_time_textstring7 months ago—
comments[].commentstring🚨 Watch our three part episode series on the…—
comments[].authorstring@thedeshbhakt—
comments[].author_channel_idstringUCmTM_hPCeckqN3cPWtYZZcg—
comments[].avatarstringhttps://yt3.ggpht.com/DfVqzaxetTmlyiL2oZHng3i…—
comments[].author_is_channel_ownerbooleantrue—
comments[].is_verifiedbooleantrue—
comments[].vote_countinteger264—
comments[].has_creator_heartbooleantrue—
comments[].reply_countinteger72—
comments[].reply_to_cidnullnull—
comments[].video_idstringuKv3mi2t2KE—
comments[].page_urlstringhttps://www.youtube.com/watch?v=uKv3mi2t2KE—
comments[].titlestringBNP Wins Big In Historic Elections | Options …—
comments[].comments_countinteger8300—
comments[].comment_idstringUgx3cSNbOeJMcSWom1R4AaABAg—
comments[].like_countinteger264—
comments[].input_urlstringuKv3mi2t2KE—
comments[].scraped_atstring2026-09-14T08:58:22.312Z—

Pass data.next_cursor back as cursor until it is null. Required inputs are ignored once a cursor is sent. Each page is one billed call. More in Pagination.

const url = "https://api.scrapier.io/api/v2/youtube-comments-scraper/";
let params = { urls: "https://www.youtube.com/watch?v=uKv3mi2t2KE" };
const items = [];
for (let page = 0; page < 10; page++) { // each page is one billed call
const res = await fetch(`${url}?${new URLSearchParams(params)}`, {
headers: { "X-API-Key": "YOUR_API_KEY" },
signal: AbortSignal.timeout(210_000),
});
const body = await res.json();
if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`);
const data = body.data;
items.push(...(data.comments ?? []));
if (!data.next_cursor) break; // null = last page
params = { cursor: data.next_cursor };
}

Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.

StatusMeaningRetry?Charged?
400Bad or missing input.No — fix the paramsNo
401 / 403Missing, invalid or revoked API key.No — fix the keyNo
402Out of credits (body has balance).No — top upNo
404Unknown endpoint slug.No — check the slugNo
429 / 503Busy or throttled.Yes — after Retry-AfterNo
5xxTarget site or upstream failure, or timeout.Yes — with backoffNo
  • Nothing special: send the inputs, read the result.