100 free credits. No credit card required. Get a key

YouTube thumbnail API

Every thumbnail size YouTube serves for a video, with the Data API’s size names.

GET /v1/youtube/videos/{id}/thumbnailsBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/youtube/videos/dQw4w9WgXcQ/thumbnails",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"kind": "youtube#thumbnailList",
"videoId": "dQw4w9WgXcQ",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"all": [
{
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
"width": 120,
"height": 90
},
{
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/mqdefault.jpg",
"width": 320,
"height": 180
},
"… 4 more"
]
}

Parameters

NameTypeDescription
idpath · requiredstringA video or Short id, or any URL of it (watch, youtu.be, shorts, live, embed). Example: dQw4w9WgXcQ.
Response fields

200 with a YouTubeThumbnailList, in the shape of YouTube Data API v3 resources.

FieldTypeDescription
kind"youtube#thumbnailList"
videoIdstring
thumbnailsYouTubeThumbnailsThumbnail URLs by size, with the Data API’s size names.
allYouTubeThumbnail[]Every size YouTube serves for it.
Status codes
StatusMeaning
200The thumbnails.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The video, channel, playlist or post does not exist, was removed, or has nothing there.
429Too many requests. Wait for Retry-After seconds.
503YouTube is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Are the images proxied?

No: the URLs point at YouTube’s own image servers.

YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.