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-subtitles/Open in Playground

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

Terminal window
curl -G "https://api.scrapier.io/api/v2/youtube-subtitles/" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "urls=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
urlsstringyese.g. https://www.youtube.com/watch?v=dQw4w9WgXcQYouTube video URL (watch, youtu.be, shorts, embed, live) or bare 11-char ID. Required on first call; ignored when cursor is supplied. No captions / unavailable -> 404.
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.
include_english_agbooleannotrueInclude auto-generated English subtitles. Locked into the cursor.
include_non_englishbooleannofalseInclude non-English subtitles. Locked into the cursor.
output_formatstringnotexttext or timestamp. Locked into the cursor.
texttimestamp
languagestringno—Optional language code (e.g. en, es, pt-BR): return only that language (manual preferred over auto-generated). If missing, the original track is returned with translation_error set. 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=dQw4w9WgXcQ",
"page": 1,
"page_size": 25,
"transcripts": [
{
"status": "ok",
"videoId": "dQw4w9WgXcQ",
"video_id": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"input_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"channel": "Rick Astley",
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"duration_seconds": 213,
"thumbnail": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/sddefault.webp",
"language": "English",
"language_code": "en",
"is_auto_generated": false,
"is_translated": false,
"source_language_code": "en",
"segment_count": 61,
"transcript_text": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ...",
"content": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ...",
"available_languages": [
{
"code": "en",
"name": "English",
"is_auto_generated": false
},
{
"code": "en",
"name": "English (auto-generated)",
"is_auto_generated": true
},
{
"code": "de-DE",
"name": "German (Germany)",
"is_auto_generated": false
}
],
"scraped_at": "2026-10-03T04:19:53.631Z"
}
],
"next_cursor": null
}
}

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

FieldTypeExampleDescription
urlsstringhttps://www.youtube.com/watch?v=dQw4w9WgXcQ—
pageinteger1—
page_sizeinteger25—
transcriptsarray[1 item]The results.
next_cursornullnullPass back as cursor for the next page. null on the last page.
transcripts[].statusstringok—
transcripts[].videoIdstringdQw4w9WgXcQ—
transcripts[].video_idstringdQw4w9WgXcQ—
transcripts[].videoUrlstringhttps://www.youtube.com/watch?v=dQw4w9WgXcQ—
transcripts[].urlstringhttps://www.youtube.com/watch?v=dQw4w9WgXcQ—
transcripts[].input_urlstringhttps://www.youtube.com/watch?v=dQw4w9WgXcQ—
transcripts[].titlestringRick Astley - Never Gonna Give You Up (Offici…—
transcripts[].channelstringRick Astley—
transcripts[].channel_idstringUCuAXFkgsw1L7xaCfnd5JJOw—
transcripts[].duration_secondsinteger213—
transcripts[].thumbnailstringhttps://i.ytimg.com/vi_webp/dQw4w9WgXcQ/sddef…—
transcripts[].languagestringEnglish—
transcripts[].language_codestringen—
transcripts[].is_auto_generatedbooleanfalse—
transcripts[].is_translatedbooleanfalse—
transcripts[].source_language_codestringen—
transcripts[].segment_countinteger61—
transcripts[].transcript_textstring[♪♪♪] ♪ We're no strangers to love ♪ ♪ You kn…—
transcripts[].contentstring[♪♪♪] ♪ We're no strangers to love ♪ ♪ You kn…—
transcripts[].available_languagesarray[3 items]—
transcripts[].scraped_atstring2026-10-03T04:19:53.631Z—

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-subtitles/";
let params = { urls: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" };
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.transcripts ?? []));
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.