> 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 Video Thumbnail

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

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

## Overview

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

## Request

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

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/youtube-video-thumbnail/",
    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"]["videos"])
```

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. |
| `urls` | string | no | `https://www.youtube.com/watch?v=dQw4w9WgXcQ` | VIDEO MODE: watch / youtu.be / shorts / embed URL or bare 11-char id. Single lookup (next_cursor always null, result under `video`). Required unless channel_url is given. |
| `channel_url` | string | no | — | CHANNEL MODE: @handle, /channel/UC…, /c/… or /user/… URL. ~10 videos per page (newest first) under `videos`, paged through YouTube's own continuation token. Required first call; ignored when `cursor` is supplied. |
| `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. |
| `channel_tab` | string | no | `videos` | Channel mode: which listing to walk. One of: `videos`, `shorts`, `streams`. Locked in cursor. |
| `start_date` | string | no | — | Channel mode: only videos uploaded on/after (YYYY-MM-DD or ISO 8601). Locked in cursor. |
| `end_date` | string | no | — | Channel mode: only videos uploaded on/before (YYYY-MM-DD or ISO 8601). Locked in cursor. |
| `verify_thumbnails` | boolean | no | `true` | Probe every file on i.ytimg.com (real size / bytes / dropped). Locked in cursor. |
| `include_frames` | boolean | no | `true` | Also return the auto-generated frame thumbnails (frame_items). Locked in cursor. |
| `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.videos`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "mode": "channel",
    "channel_url": "@MrBeast",
    "channel_tab": "videos",
    "start_date": "2025-06-01T00:00:00Z",
    "end_date": null,
    "page": 1,
    "page_size": 10,
    "videos": [
      {
        "input_channel": "@MrBeast",
        "position": 1,
        "mode": "channel",
        "video_id": "gTKS8SAwUzE",
        "status": "ok",
        "url": "https://www.youtube.com/watch?v=gTKS8SAwUzE",
        "title": "I Survived The Most Extreme Places On Earth",
        "channel_name": "MrBeast",
        "channel_id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
        "published_at": "2026-09-05T09:00:01-07:00",
        "published_at_utc": "2026-09-05T16:00:01Z",
        "published_text": "Sep 5, 2026",
        "duration_seconds": 1452,
        "view_count": 98123456,
        "is_short": false,
        "thumbnail_count": 10,
        "dropped": 0,
        "largest": {
          "id": "maxres",
          "width": 1280,
          "height": 720,
          "format": "webp",
          "ratio": "16:9",
          "url": "https://i.ytimg.com/vi_webp/gTKS8SAwUzE/maxresdefault.webp",
          "name": "maxresdefault",
          "file": "maxresdefault.webp",
          "group": "standard",
          "frame": null,
          "aspect": 1.7778,
          "orientation": "landscape",
          "megapixels": 0.922,
          "aliases": [
            "hq720.webp"
          ],
          "verified": true,
          "available": true,
          "status_code": 206,
          "bytes": 199522,
          "content_type": "image/webp",
          "actual_width": 1280,
          "actual_height": 720,
          "actual_ratio": "16:9",
          "matches_declared": true,
          "cache_max_age": 7200,
          "last_modified": null,
          "etag": "\"1757088000\"",
          "is_largest": true,
          "attempts": 1,
          "error": null
        },
        "items": [
          {
            "id": "default",
            "width": 120,
            "height": 90,
            "format": "webp",
            "ratio": "4:3",
            "url": "https://i.ytimg.com/vi_webp/gTKS8SAwUzE/default.webp",
            "name": "default",
            "file": "default.webp",
            "group": "standard",
            "frame": null,
            "aspect": 1.3333,
            "orientation": "landscape",
            "megapixels": 0.011,
            "aliases": [],
            "verified": true,
            "available": true,
            "status_code": 206,
            "bytes": 3120,
            "content_type": "image/webp",
            "actual_width": 120,
            "actual_height": 90,
            "actual_ratio": "4:3",
            "matches_declared": true,
            "cache_max_age": 7200,
            "last_modified": null,
            "etag": "\"1757088000\"",
            "is_largest": false,
            "attempts": 1,
            "error": null
          },
          "... one entry per EXISTING standard size (default / medium / high / standard / maxres) in webp then jpg"
        ],
        "dropped_items": [],
        "extra_dropped_items": [],
        "largest_any": null,
        "original_aspect_items": [
          "... oardefault / frame0 when they exist"
        ],
        "frame_items": [
          "... auto-generated frames 1/2/3 at every size when include_frames=true"
        ],
        "summary": {
          "standard_candidates": 10,
          "standard_available": 10,
          "standard_dropped": 0,
          "extra_candidates": 3,
          "extra_available": 1,
          "extra_dropped": 2,
          "formats": [
            "webp",
            "jpg"
          ],
          "sizes_available": [
            "default",
            "medium",
            "high"
          ],
          "sizes_missing": [],
          "total_bytes": 612345,
          "verified": true,
          "has_maxres": true
        },
        "video": {
          "id": "gTKS8SAwUzE",
          "url": "https://www.youtube.com/watch?v=gTKS8SAwUzE",
          "title": "I Survived The Most Extreme Places On Earth",
          "duration_text": "24:12",
          "published_at": "2026-09-05T09:00:01-07:00",
          "category": "Entertainment",
          "playability_status": "OK",
          "original_aspect_ratio": "16:9",
          "orientation": "landscape",
          "listing": {
            "title": "I Survived The Most Extreme Places On Earth",
            "published_text": "2 weeks ago",
            "views_text": "98M views",
            "view_count": 98000000,
            "duration_text": "24:12",
            "duration_seconds": 1452,
            "badges": [],
            "is_live": false,
            "is_upcoming": false,
            "thumbnails": [
              {
                "url": "https://i.ytimg.com/vi/gTKS8SAwUzE/hqdefault.jpg?sqp=...",
                "width": 168,
                "height": 94
              }
            ],
            "kind": "video"
          },
          "...": "same video object as v1 (channel, keywords, storyboards, og_image, flags)"
        },
        "channel": {
          "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
          "name": "MrBeast",
          "handle": "@MrBeast",
          "url": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
          "handle_url": "https://www.youtube.com/@MrBeast",
          "description": "SUBSCRIBE FOR A COOKIE!",
          "subscriber_count_text": "517M subscribers",
          "subscriber_count": 517000000,
          "video_count_text": "1K videos",
          "video_count": 1000,
          "is_family_safe": true,
          "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCX6OQ3DkcsbYNE6H8uQQuVA",
          "avatar": [
            {
              "url": "https://yt3.googleusercontent.com/...=s900-c-k-c0x00ffffff-no-rj",
              "width": 900,
              "height": 900
            }
          ],
          "banner": [
            {
              "url": "https://yt3.googleusercontent.com/...",
              "width": 1060,
              "height": 175
            }
          ],
          "tabs": [
            "Home",
            "Videos",
            "Shorts"
          ]
        },
        "source": {
          "mode": "channel",
          "input_channel": "@MrBeast",
          "channel_path": "/@MrBeast",
          "channel_tab": "videos",
          "resolved_url": "https://www.youtube.com/@MrBeast/videos?hl=en",
          "max_videos": null,
          "start_date": "2025-06-01T00:00:00Z",
          "end_date": null,
          "position": 1,
          "listing_page": 1
        },
        "attempts": 14,
        "processing_ms": 2310,
        "warnings": [],
        "scraped_at": "2026-09-19T08:12:04.512Z"
      }
    ],
    "next_cursor": "eyJsayI6eyJpbmNsdWRlX2ZyYW1lcyI6ImZhbHNlIiwic3RhcnRfZGF0ZSI6IjIwMjUtMDYtMDEifSwibSI6ImNoYW5uZWwiLCJvZmYiOjEwLCJwIjoxLCJwb3MiOjEwLCJxIjoiQE1yQmVhc3QiLCJzZWVuIjpbIi4uLiJdLCJ0b2siOm51bGx9"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `mode` | string | `channel` |  |
| `channel_url` | string | `@MrBeast` |  |
| `channel_tab` | string | `videos` |  |
| `start_date` | string | `2025-06-01T00:00:00Z` |  |
| `end_date` | null | `null` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `10` |  |
| `videos` | array | `[1 item]` | The results. |
| `next_cursor` | string | `eyJsayI6eyJpbmNsdWRlX2ZyYW1lcyI6ImZhbHNlIiwic…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `videos[].input_channel` | string | `@MrBeast` |  |
| `videos[].position` | integer | `1` |  |
| `videos[].mode` | string | `channel` |  |
| `videos[].video_id` | string | `gTKS8SAwUzE` |  |
| `videos[].status` | string | `ok` |  |
| `videos[].url` | string | `https://www.youtube.com/watch?v=gTKS8SAwUzE` |  |
| `videos[].title` | string | `I Survived The Most Extreme Places On Earth` |  |
| `videos[].channel_name` | string | `MrBeast` |  |
| `videos[].channel_id` | string | `UCX6OQ3DkcsbYNE6H8uQQuVA` |  |
| `videos[].published_at` | string | `2026-09-05T09:00:01-07:00` |  |
| `videos[].published_at_utc` | string | `2026-09-05T16:00:01Z` |  |
| `videos[].published_text` | string | `Sep 5, 2026` |  |
| `videos[].duration_seconds` | integer | `1452` |  |
| `videos[].view_count` | integer | `98123456` |  |
| `videos[].is_short` | boolean | `false` |  |
| `videos[].thumbnail_count` | integer | `10` |  |
| `videos[].dropped` | integer | `0` |  |
| `videos[].largest` | object | `{…}` |  |
| `videos[].items` | array | `[2 items]` |  |
| `videos[].dropped_items` | array | `[]` |  |
| `videos[].extra_dropped_items` | array | `[]` |  |
| `videos[].largest_any` | null | `null` |  |
| `videos[].original_aspect_items` | array | `[1 item]` |  |
| `videos[].frame_items` | array | `[1 item]` |  |
| `videos[].summary` | object | `{…}` |  |
| `videos[].video` | object | `{…}` |  |
| `videos[].channel` | object | `{…}` |  |
| `videos[].source` | object | `{…}` |  |
| `videos[].attempts` | integer | `14` |  |
| `videos[].processing_ms` | integer | `2310` |  |
| `videos[].warnings` | array | `[]` |  |
| `videos[].scraped_at` | string | `2026-09-19T08:12:04.512Z` |  |

## 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-video-thumbnail/"
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("videos") 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

- Locked into the cursor: `channel_tab`, `start_date`, `end_date`, `verify_thumbnails`, `include_frames`. Set them on the first call; later pages reuse them.

## 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.
