# YouTube Thumbnail Extractor: all sizes, best available, bulk (`steadydata/youtube-thumbnail-extractor`) Actor

Thumbnail URLs of YouTube videos, up to 500 per run: every size from default to maxresdefault, which ones exist with their file size, the best available one with width and height, WebP variants, the three frame stills, plus video title, channel and watch URL. No downloads, no API key. Pay per video.

- **URL**: https://apify.com/steadydata/youtube-thumbnail-extractor.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 1,000 video thumbnails

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Thumbnail Extractor: all sizes, best available, bulk

Thumbnail URLs of YouTube videos, up to 500 per run: every size from default to maxresdefault, which ones exist with their file size, the best available one with width and height, WebP variants, the three frame stills, plus video title, channel and watch URL. No downloads, no API key. Pay per video.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- One official oEmbed call plus five lightweight HEAD checks per video, nothing downloaded, no API key, no browser. Measured on the platform: three videos in 5 seconds for a tenth of a cent; a tenth of the price of the busiest alternative in this niche.
- Not just URLs but the truth about them: YouTube's thumbnail addresses are predictable, but the 1280 and 640 pixel versions exist only for videos uploaded in enough resolution. Each size is verified and delivered with its byte size, and `bestUrl` is the largest one that really exists, with width and height (measured: the 2005 video Me at the zoo tops out at 480 pixels, a 4K remaster has all five).
- Everything a thumbnail workflow needs on one row: the five JPEG sizes, the WebP variants, the three frame stills YouTube generates, the video title, channel name and link, and the watch URL.

### Who this is for

Paste video URLs (watch, youtu.be, shorts, embed) or 11-character ids in `videos` (up to 500 per run). Leave `checkSizes` on to know which sizes exist and how large they are; switch it off for URLs only with a single request per video. Built for content pipelines, newsletters, link previews, thumbnail A/B research and archiving that need the right image address without scraping the watch page.

### Who this is not for

The images are not downloaded; you get their addresses and sizes and fetch them yourself. Private, unlisted-and-not-embeddable and removed videos come back as a free `NOT_FOUND` row, because oEmbed answers nothing for them. Custom thumbnails and auto-generated ones look the same to this actor; it cannot tell which the creator chose. Byte sizes are what the image host reports at the moment of the run. Titles and channel names come from oEmbed and are not localised.

### Input example

```json
{
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "jNQXAC9IVRw"
    ],
    "checkSizes": true
}
```

### Output example

- `videoId`
- `title`
- `channelName`
- `channelUrl`
- `videoUrl`
- `bestUrl`
- `bestSize`
- `bestWidth`
- `bestHeight`
- `hasMaxres`
- `maxresUrl`
- `sdUrl`
- `hqUrl`
- `mqUrl`
- `defaultUrl`
- `sizes`
- `webpMaxresUrl`
- `webpHqUrl`
- `frameUrls`
- `oembedThumbnailUrl`

Error codes: `INVALID_VIDEO`, `NOT_FOUND`, `BLOCKED`.

One delivered row looks like this:

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelUrl": "https://www.youtube.com/@RickAstleyYT",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "bestUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "bestSize": "maxresdefault",
  "bestWidth": 1280,
  "bestHeight": 720,
  "hasMaxres": true,
  "maxresUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "sdUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/sddefault.jpg",
  "hqUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "mqUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/mqdefault.jpg",
  "defaultUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
  "webpMaxresUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp",
  "webpHqUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/hqdefault.webp",
  "frameUrls": [
    "https://i.ytimg.com/vi/dQw4w9WgXcQ/1.jpg",
    "https://i.ytimg.com/vi/dQw4w9WgXcQ/2.jpg",
    "https://i.ytimg.com/vi/dQw4w9WgXcQ/3.jpg"
  ],
  "sizes": [
    {
      "size": "maxresdefault",
      "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
      "width": 1280,
      "height": 720,
      "exists": true,
      "bytes": 65324
    },
    {
      "size": "sddefault",
      "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/sddefault.jpg",
      "width": 640,
      "height": 480,
      "exists": true,
      "bytes": 31029
    },
    {
      "size": "hqdefault",
      "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
      "width": 480,
      "height": 360,
      "exists": true,
      "bytes": 21011
    },
    {
      "size": "mqdefault",
      "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/mqdefault.jpg",
      "width": 320,
      "height": 180,
      "exists": true,
      "bytes": 10303
    },
    {
      "size": "default",
      "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
      "width": 120,
      "height": 90,
      "exists": true,
      "bytes": 2888
    }
  ],
  "oembedThumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "status": "ok"
}
```

### Related actors from steadydata

- [youtube-video-details](https://apify.com/steadydata/youtube-video-details): the metadata behind the same videos
- [youtube-channel-videos](https://apify.com/steadydata/youtube-channel-videos): every video of a channel, to feed this actor a list
- [image-ocr-text](https://apify.com/steadydata/image-ocr-text): the text inside a thumbnail

### Pricing

Pay per event: one `video-thumbnails` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### FAQ

**Is personal data collected?**
Only the public video title and channel name that YouTube itself returns through oEmbed; no viewer or commenter data is touched.

**Which URL should I use?**
`bestUrl`: the largest size that exists. For a fixed layout use the size columns directly; `hqUrl` (480x360) exists for every public video.

**Why is `hasMaxres` false for some videos?**
YouTube only renders the 1280x720 thumbnail for uploads of at least 720p; older or low-resolution videos have no such file, and the actor tells you rather than handing you a URL that 404s.

**What are the frame stills?**
`frameUrls` are the three automatic stills YouTube takes at the start, middle and end of a video (1.jpg, 2.jpg, 3.jpg), handy as alternatives when the main thumbnail is not suitable.

**What does a run cost when a video is gone?**
Nothing. `NOT_FOUND`, `INVALID_VIDEO` and `BLOCKED` rows are free; only delivered videos are charged.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/steadydata/youtube-thumbnail-extractor/changelog.md

# Actor input Schema

## `videos` (type: `array`):

One per row, up to 500: a YouTube video URL (watch, youtu.be, shorts, embed) or an 11-character video id.

## `checkSizes` (type: `boolean`):

On: each size is verified with a HEAD request and its byte size delivered. Off: URLs only, one request per video.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "jNQXAC9IVRw"
  ],
  "checkSizes": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "jNQXAC9IVRw"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/youtube-thumbnail-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "jNQXAC9IVRw",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/youtube-thumbnail-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "jNQXAC9IVRw"
  ]
}' |
apify call steadydata/youtube-thumbnail-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadydata/youtube-thumbnail-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zNN6WTJJLX3hXjbdw/builds/Jz5esvmjxpaNPcoP3/openapi.json
