> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# YouTube Shorts

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

`GET|POST https://api.scrapier.io/api/v2/youtube-shorts/` · 1 credit per successful call · Cursor-paginated

## Overview

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

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/youtube-shorts/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/youtube-shorts/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["shorts"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

> **Note:** No parameter is strictly required, but send at least the inputs shown in the example.

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `mode` | string | no | `single` | single / video (one Short via input_value) or multi / channel (a channel Shorts tab, 25 per page). When `channels` is set it always wins. One of: `single`, `video`, `multi`, `channel`. |
| `input_value` | string | no | `dQw4w9WgXcQ` | Short URL or 11-char video ID (single mode). A channel URL/@handle here is treated as channel mode. |
| `channels` | string | no | — | Channel @handle, URL (/@x, /channel/UC..., /c/x, /user/x, .../shorts) or UC id. Returns its Shorts newest-first, 25 per call; follow next_cursor. |
| `cursor` | string | no | — | 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. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When 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. |

## Response

HTTP 200. Results are in `data.shorts`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "channels": "@MrBeast",
    "channel_id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "page": 1,
    "page_size": 25,
    "shorts": [
      {
        "title": "What’s Inside My Briefcase?",
        "type": "shorts",
        "id": "CEJXqm2eiJ0",
        "url": "https://www.youtube.com/shorts/CEJXqm2eiJ0",
        "thumbnailUrl": "https://i.ytimg.com/vi/CEJXqm2eiJ0/hqdefault.jpg",
        "viewCount": 33038101,
        "date": "2026-09-27T00:00:00.000Z",
        "likes": 625000,
        "commentsCount": 14647,
        "duration": "00:00:40",
        "text": "What’s Inside My Briefcase?",
        "hashtags": "",
        "descriptionLinks": null,
        "channelName": "MrBeast",
        "channelUrl": "https://www.youtube.com/@MrBeast",
        "channelUsername": "MrBeast",
        "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
        "channelDescription": "SUBSCRIBE FOR A COOKIE!",
        "channelJoinedDate": "Feb 19, 2012",
        "channelLocation": "United States",
        "channelDescriptionLinks": "https://www.instagram.com/mrbeast",
        "channelAvatarUrl": "https://yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s160-c-k-c0x00ffffff-no-rj",
        "channelBannerUrl": "https://yt3.googleusercontent.com/mHMO_eEMp0dPvh0ADwXhPXNYb_GnjSVsLI8biqF1CpxT8OPl7izhNQsDPD3JHhd5y5Mg9GrP=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
        "channelTotalVideos": 1004,
        "channelTotalViews": 141443077746,
        "numberOfSubscribers": 519000000,
        "isChannelVerified": true,
        "inputChannelUrl": "https://www.youtube.com/@MrBeast",
        "isAgeRestricted": false,
        "commentsTurnedOff": false,
        "order": 1,
        "input": "@MrBeast",
        "fromYTUrl": "https://www.youtube.com/@MrBeast/shorts",
        "fromChannelListPage": "shorts",
        "detailsFetched": true,
        "scraped_at": "2026-10-03T04:21:19.275Z"
      }
    ],
    "next_cursor": "eyJoZCI6eyJoIjoiTXJCZWFzdCIsIm4iOiJNckJlYXN0In0sImkiOiJATXJCZWFzdCIsImsiOiJjaGFubmVscyIsIm8iOjI1LCJwIjoyLCJ1IjoiVUNYNk9RM0RrY3NiWU5FNkg4dVFRdVZBIiwidiI6Mn0"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `channels` | string | `@MrBeast` |  |
| `channel_id` | string | `UCX6OQ3DkcsbYNE6H8uQQuVA` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `25` |  |
| `shorts` | array | `[1 item]` | The results. |
| `next_cursor` | string | `eyJoZCI6eyJoIjoiTXJCZWFzdCIsIm4iOiJNckJlYXN0I…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `shorts[].title` | string | `What’s Inside My Briefcase?` |  |
| `shorts[].type` | string | `shorts` |  |
| `shorts[].id` | string | `CEJXqm2eiJ0` |  |
| `shorts[].url` | string | `https://www.youtube.com/shorts/CEJXqm2eiJ0` |  |
| `shorts[].thumbnailUrl` | string | `https://i.ytimg.com/vi/CEJXqm2eiJ0/hqdefault.jpg` |  |
| `shorts[].viewCount` | integer | `33038101` |  |
| `shorts[].date` | string | `2026-09-27T00:00:00.000Z` |  |
| `shorts[].likes` | integer | `625000` |  |
| `shorts[].commentsCount` | integer | `14647` |  |
| `shorts[].duration` | string | `00:00:40` |  |
| `shorts[].text` | string | `What’s Inside My Briefcase?` |  |
| `shorts[].hashtags` | string |  |  |
| `shorts[].descriptionLinks` | null | `null` |  |
| `shorts[].channelName` | string | `MrBeast` |  |
| `shorts[].channelUrl` | string | `https://www.youtube.com/@MrBeast` |  |
| `shorts[].channelUsername` | string | `MrBeast` |  |
| `shorts[].channelId` | string | `UCX6OQ3DkcsbYNE6H8uQQuVA` |  |
| `shorts[].channelDescription` | string | `SUBSCRIBE FOR A COOKIE!` |  |
| `shorts[].channelJoinedDate` | string | `Feb 19, 2012` |  |
| `shorts[].channelLocation` | string | `United States` |  |
| `shorts[].channelDescriptionLinks` | string | `https://www.instagram.com/mrbeast` |  |
| `shorts[].channelAvatarUrl` | string | `https://yt3.googleusercontent.com/nxYrc_1_2f7…` |  |
| `shorts[].channelBannerUrl` | string | `https://yt3.googleusercontent.com/mHMO_eEMp0d…` |  |
| `shorts[].channelTotalVideos` | integer | `1004` |  |
| `shorts[].channelTotalViews` | integer | `141443077746` |  |
| `shorts[].numberOfSubscribers` | integer | `519000000` |  |
| `shorts[].isChannelVerified` | boolean | `true` |  |
| `shorts[].inputChannelUrl` | string | `https://www.youtube.com/@MrBeast` |  |
| `shorts[].isAgeRestricted` | boolean | `false` |  |
| `shorts[].commentsTurnedOff` | boolean | `false` |  |
| `shorts[].order` | integer | `1` |  |
| `shorts[].input` | string | `@MrBeast` |  |
| `shorts[].fromYTUrl` | string | `https://www.youtube.com/@MrBeast/shorts` |  |
| `shorts[].fromChannelListPage` | string | `shorts` |  |
| `shorts[].detailsFetched` | boolean | `true` |  |
| `shorts[].scraped_at` | string | `2026-10-03T04:21:19.275Z` |  |

## Pagination

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.

```python
import requests

URL = "https://api.scrapier.io/api/v2/youtube-shorts/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("shorts") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Nothing special: send the inputs, read the result.

## Related

- [YouTube Channel Info](https://docs.scrapier.io/api-reference/youtube/youtube-channel-info.md): Structured YouTube data: send `urls`. Single lookup, 1 credit per successful call.
- [YouTube Channel Live/Streams](https://docs.scrapier.io/api-reference/youtube/youtube-channel-live.md): Structured YouTube data: send `channels`. Cursor-paginated, 1 credit per successful call.
- [YouTube Channel Video Scraper](https://docs.scrapier.io/api-reference/youtube/youtube-channel-video-scraper.md): Structured YouTube data: send `youtube_channels`. Cursor-paginated, 1 credit per successful call.
- [YouTube Comment Replies](https://docs.scrapier.io/api-reference/youtube/youtube-comment-replies.md): Structured YouTube data: send `continuation_tokens`. Cursor-paginated, 1 credit per successful call.
