Skip to content

Structured YouTube data: every input is optional. Cursor-paginated, 1 credit per successful call.

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

Call GET /api/v2/youtube-trending-shorts/. The results are in data.items; send data.next_cursor back as cursor to get the next page. 6 optional parameters refine the call (see Parameters).

Terminal window
curl -G "https://api.scrapier.io/api/v2/youtube-trending-shorts/" \
-H "X-API-Key: YOUR_API_KEY" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
hashtagsstringnotrendingshortsHashtag Shorts feed to read (no '#'; letters/digits/underscore, any script). Default 'trendingshorts'. One feed per call (15 hydrated Shorts/page); ignored when cursor is supplied. Unknown hashtag -> 404. extra.hydrated=false marks a row served from feed data because its detail fetch missed the 22s deadline.
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.
countrystringnoUSISO 3166-1 alpha-2 region (YouTube gl); a country YouTube does not offer -> 400.
locked in cursor
languagestringnoenInterface language (YouTube hl).
locked in cursor
sort_bystringnodefaultLocal ordering applied per page.
defaultviewslikescommentsengagementnewestoldestshortestlongest
locked in cursor
includestringno—Comma list of extra joins: channel|captions|download|sound|comments (adds comment count, heavier).
locked in 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": {
"hashtag": "trendingshorts",
"page": 1,
"page_size": 15,
"items": [
{
"post": {
"id": "zixQUwE1uwg",
"url": "https://www.youtube.com/watch?v=zixQUwE1uwg",
"content": {
"text": "बेचारे की मां को मारा 😱😭 #trendingshorts",
"media_urls": [
"https://www.youtube.com/shorts/zixQUwE1uwg"
],
"thumbnail_url": "https://img.youtube.com/vi/zixQUwE1uwg/maxresdefault.jpg",
"duration_seconds": 22
},
"author": {
"username": "@TheSoankifact",
"display_name": "THE SOLANKI FACT",
"avatar_url": "https://yt3.ggpht.com/...=s800-c-k-c0x00ffffff-no-rj",
"verified": false
},
"engagement": {
"views": 10193111,
"likes": 51979,
"comments": 51,
"shares": null,
"saves": null
},
"published_at": "2026-08-21T00:30:00.000Z",
"ext": {
"content_type": "short",
"categoryTitle": "Entertainment",
"channel_id": "UC_VmI_kpMpv1Au9isoHbp6A",
"author_followers": 2060000
}
},
"computed": {
"engagement_rate": 0.005104,
"language": "hi",
"content_category": "education",
"estimated_reach": 12231733
},
"video": {
"type": "short",
"id": "zixQUwE1uwg",
"viewCountInt": 10193111,
"likeCountInt": 51979,
"commentCountInt": 51,
"durationFormatted": "00:00:22",
"genre": "Entertainment"
},
"extra": {
"rank": 1,
"source": "hashtag:trendingshorts",
"shorts_url": "https://www.youtube.com/shorts/zixQUwE1uwg",
"hydrated": true
},
"hashtag": "trendingshorts",
"scraped_at": "2026-09-17T00:00:00.000Z",
"position": 1
}
],
"next_cursor": "eyJ2IjoxLCJ0IjoiNGFV..._h_trendingshorts_gl_US"
}
}

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

FieldTypeExampleDescription
hashtagstringtrendingshorts—
pageinteger1—
page_sizeinteger15—
itemsarray[1 item]The results.
next_cursorstringeyJ2IjoxLCJ0IjoiNGFV..._h_trendingshorts_gl_USPass back as cursor for the next page. null on the last page.
items[].postobject{…}—
items[].computedobject{…}—
items[].videoobject{…}—
items[].extraobject{…}—
items[].hashtagstringtrendingshorts—
items[].scraped_atstring2026-09-17T00:00:00.000Z—
items[].positioninteger1—

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-trending-shorts/";
let params = {};
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.items ?? []));
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
  • Locked into the cursor: country, language, sort_by, include. Set them on the first call; later pages reuse them.