Blog/Social data
10 min read

Download a YouTube Thumbnail: Which of the Six URLs Actually Exists

Six predictable thumbnail URLs, four videos, checked one at a time. Three names answered every time and three returned 404 on the oldest upload.

Download a YouTube Thumbnail: Which of the Six URLs Actually Exists

Copy this line to your agent to get thumbnails and metadata for a list of videos.

set up https://monid.ai/SKILL.md and for each of these youtube urls give me the title, author, duration and the largest thumbnail that actually exists

For one video you do not need an API. YouTube serves thumbnails from a predictable URL and you can paste it into a browser. We checked that claim properly on 2026-09-28: six thumbnail names across four videos, one HEAD request each. Three of the six names answered every time. The other three returned 404 on the same video, the oldest upload in the set, with no error body and no fallback. If you are doing one video, use the URL. If you are doing a list, you need to know which name exists before you write it into an img tag. This guide runs through Monid, the OpenRouter for agent tools.

How do you download a YouTube thumbnail?

Take the video id out of the watch URL and put it in an image path.

The video id

In https://www.youtube.com/watch?v=dQw4w9WgXcQ the id is dQw4w9WgXcQ, the value of v. On a youtu.be/dQw4w9WgXcQ short link it is the path. On a Shorts URL it is the last path segment.

The URL

https://i.ytimg.com/vi/{VIDEO_ID}/maxresdefault.jpg

That is the whole trick, and there is no key, no quota and no signature. img.youtube.com serves the same paths if you prefer that host.

The six names

default.jpg        120 x 90     the tiny one
mqdefault.jpg      320 x 180
hqdefault.jpg      480 x 360
sddefault.jpg      640 x 480
maxresdefault.jpg  1280 x 720 or larger
hq720.jpg          1280 x 720

Those dimensions are the commonly documented ones. We measured whether each name answers and how many bytes it returns, not the pixel dimensions, so treat the sizes above as labels and the byte counts further down as the measurement.

The catch

Three of those six do not always exist, and when they do not you get a 404 rather than a smaller image. For one video in a browser that is a non-event, you just try the next name. In a batch job writing image tags into a page, it is a broken image for every video whose source was never uploaded at that resolution. The next section is the measurement.

📖 See also The Real Cost of Scraping YouTube Yourself

Which thumbnail URLs actually exist?

We sent one HEAD request per name per video, four videos, and recorded the status and the byte count.

NameAnsweredBytes, smallest to largest seen
default4 of 42,888 to 4,523
mqdefault4 of 48,710 to 17,034
hqdefault4 of 415,921 to 32,195
sddefault3 of 431,029 to 46,836
maxresdefault3 of 465,324 to 109,920
hq7203 of 465,324 to 179,638

All three failures were the same video

Not one failure each spread across the set. sddefault, maxresdefault and hq720 all returned 404 for the same id, which was the oldest upload in our four and predates high-definition uploads. The three smaller names answered for it normally.

That is the rule worth carrying: the high-resolution names track what was uploaded, not what YouTube can serve. An old video, a phone upload, a low-resolution screen recording, and the top three names are simply absent. There is no redirect to a smaller size and no JSON telling you why.

The size spread is bigger than it looks

On one video the smallest working name was 2,888 bytes and the largest was 179,638, a factor of 62. If you are caching thumbnails for thousands of videos, that ratio is your storage bill, and picking maxresdefault by reflex because it is the nicest one is a decision with a number attached.

maxresdefault and hq720 are not reliably the same

Both are described as 1280 by 720. On two of the three videos where both existed they returned byte-identical responses, 65,324 and 109,920. On the third they returned 108,323 and 179,638, so they were different files. Treat them as two names that usually agree, and do not write code that assumes either one implies the other.

What does an endpoint return that the URL does not?

The things you cannot derive from an id.

We resolved one watch URL through a per-call endpoint on 2026-09-28. It came back in 12.3 seconds with this shape:

{ "ok": true,
  "video_id": "dQw4w9WgXcQ",
  "title": "…",
  "author": "…",
  "author_url": "https://www.youtube.com/channel/…",
  "thumbnail": "https://i.ytimg.com/vi/…/maxresdefault.jpg",
  "thumbnails": { "low": "…/default.jpg", "max": "…/maxresdefault.jpg" },
  "duration": 213,
  "download_url": "…",
  "formats": [ { "type": "video", "format": "144p", "filesize": 5507589 },
               { "type": "video", "format": "2160p", "filesize": 243784090 },
               { "type": "audio", "format": "audio", "filesize": 3449447 } ] }

Three of those fields are the reason to make a call instead of building a string.

Title and author. A thumbnail with no caption is not usable in a listing, a slide or a newsletter. The URL pattern gives you an image and nothing to label it with.

Duration. 213 seconds, as a number. If you are filtering a list before you fetch anything, this is the field that lets you skip the eight-hour livestream.

The format list, with byte sizes. Nine entries from 144p at 5.5 MB to 2160p at 243.8 MB, plus an audio track. This is the field that answers the question the URL pattern cannot: what resolutions does this particular video actually have. A video whose top format is 360p is exactly the video whose maxresdefault will 404, and here you can see that before you write the tag.

The endpoint costs one call per video and it is not free, so the honest trade is this: build the URL for one video, call the endpoint when you need a caption, a duration, or certainty about which sizes exist.

How do you pull thumbnails for a list of videos?

For agents

Grab an API key at app.monid.ai, then paste this to your agent and hand it the key:

set up https://monid.ai/SKILL.md

It learns the whole discover, inspect, run workflow itself. More in the agent quickstart.

For humans

npm install -g @monid-ai/cli
monid keys add -k <your-api-key> -l main

One video, with metadata

monid run -p mrscraper -e /youtube/video \
  -d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'

url goes in the body, not the query string. Our first attempt sent it as a query parameter and got back body.url: expected string, received undefined, which is the good kind of failure: it named the field, and it was rejected before it reached the provider so nothing was billed.

The free ladder, for when you only need the image

Walk the names from best to worst and stop at the first 200. HEAD is enough, so you never download an image to find out it exists:

for n in maxresdefault sddefault hqdefault mqdefault default; do
  code=$(curl -s -o /dev/null -w '%{http_code}' -I "https://i.ytimg.com/vi/$ID/$n.jpg")
  [ "$code" = "200" ] && echo "$n" && break
done

Skip hq720 in a ladder like that. It sits at the same nominal size as maxresdefault, it failed on the same video, and on our sample it was sometimes a different file for no visible benefit.

The rule for a batch

Ask once, store what you learn. Whichever route you use, write the resolved URL and its byte size into your own store rather than re-resolving on every page render, and keep the video id as the key. Thumbnails do change when an uploader replaces one, so give the record a fetched-at timestamp, the same discipline as keeping a crawl of any domain fresh.

Give this to your agent

$Set up https://monid.ai/SKILL.md, and then use Monid to for these 300 youtube urls give me title, author, duration and the largest thumbnail that returns 200, then flag the ones with no hd thumbnail at all.

📖 See also YouTube Scraper: Getting Past the Data API Quota

Which endpoint returns what?

EndpointInputReturnsLatency we sawBilling
mrscraper/youtube/videoWatch URL in the bodyTitle, author, duration, thumbnails, formats with byte sizes12.3 sPer call
apify/starvibe/youtube-video-transcriptVideo URLTimestamped transcript plus video detailsAround 7 sPer result
tikhub/api/v1/youtube/web_v2/get_general_search_v2QuerySearch results, to find the ids in the first placeAround 3 sPer call
tikhub/api/v1/youtube/web_v2/search_channelsQueryChannel recordsAround 7 sPer call
i.ytimg.com/vi/{id}/{name}.jpgVideo id, as a stringOne image, or a 404Under 1 sFree, no key

The first four were verified with monid inspect on 2026-09-28. Billing shape is given rather than figures, because shape drives design and current numbers live on monid.ai/tools. The last row is not ours and is in the table because leaving it out would be dishonest: it is the right answer for a single image.

The pipeline most people actually want is row three or four to find the videos, then row one to resolve each of them, then the last row to serve the image you already know exists.

When should you not do any of this?

Four cases.

You have one video. Paste the URL into a browser, right-click, save. Everything above is about scale and certainty, and neither matters for one image.

You only need a small thumbnail. hqdefault answered for all four of our videos and came in between 15,921 and 32,195 bytes. If your layout shows a 480-pixel card, the whole 404 problem disappears, because it only affects the three high-resolution names.

You want the video, not the picture. A thumbnail is a poster frame. If your job is the audio, the captions or the content, a transcript endpoint is a different tool and the wider social scraping comparison is the better starting point.

You are about to republish someone's artwork. A thumbnail is a creative work owned by the uploader. Linking to YouTube's own URL in a context that credits the video is ordinary practice. Copying thumbnails into your own product as if they were your assets is a different act, and the fact that the URL is unauthenticated is not permission.

And the disclosure: this is our blog, we sell the metadata endpoint in that table, and the first section of this post tells you to use a free URL instead when you have one video. The endpoint is worth its call when you need a title, a duration, or proof that the size you are about to request exists.

Conclusion

The predictable URL is real and it works. https://i.ytimg.com/vi/{id}/maxresdefault.jpg needs no key and no quota, and for a single thumbnail there is nothing further to discuss. What the shortcut hides is that three of the six names are conditional. On 2026-09-28 we checked all six against four videos: default, mqdefault and hqdefault answered every time, while sddefault, maxresdefault and hq720 all returned 404 for the same video, the oldest upload in the set. The high-resolution names follow what was uploaded, not what YouTube can serve.

Two smaller things worth keeping. The byte range across working names on a single video was 2,888 to 179,638, so the name you pick by reflex is a storage decision at any real volume. And maxresdefault and hq720 were byte-identical on two videos and different on a third, so neither implies the other.

For a list, the choice is between a free HEAD ladder that tells you which image exists and a per-call endpoint that also tells you the title, the author, the duration and every format with its size. Use the ladder when you only need pixels. Use the call when you need a caption or certainty.

Free next step: run monid inspect -p mrscraper -e /youtube/video and note that the URL goes in the body rather than the query string, which is the 400 we paid nothing for. Start at monid.ai.

FAQ

Does maxresdefault always exist?

No, and that is the single most common bug in thumbnail code. It existed for three of our four test videos and returned 404 for the fourth, which was the oldest upload in the set. The name reflects the resolution of the source file the uploader provided, so any video that was never uploaded above 720p simply has no maxresdefault, and YouTube does not redirect you to a smaller one or return an error body explaining it. In a browser you notice immediately. In a template that writes an img tag from a video id, you get a broken image and no log line. Either check with a HEAD request before you commit to the name, or resolve the video once through an endpoint that lists the formats it really has.

What is the difference between hqdefault, sddefault and hq720?

They are three fixed sizes, nominally 480 by 360, 640 by 480 and 1280 by 720. In our measurements hqdefault was the largest name that never failed, answering for all four videos at 15,921 to 32,195 bytes, which makes it the safe default for a card or a list. sddefault failed on the same video as the high-resolution names. hq720 is the odd one: it shares its nominal size with maxresdefault and on two of our three videos it returned a byte-identical response, while on the third the two differed by 71,000 bytes. There is no benefit we could measure in preferring it, so we would leave it out of a fallback ladder entirely.

How do you do this for thousands of videos?

Decide first whether you need metadata or only pixels, because the answer changes the cost by orders of magnitude. If you only need images, a HEAD ladder over the free URLs is the right tool: five requests worst case per video, no key, no quota, and you stop at the first 200. Cache the winning name per video id so you pay the ladder once. If you need titles, authors, durations or the real format list, that is one paid call per video, and the way to keep it sane is to filter the list first. Search endpoints return ids cheaply, so narrow to the videos you actually care about before you resolve any of them, and store every resolved record with a timestamp so a rerun is a diff rather than a repeat.

Can you just use the thumbnails in your own product?

A thumbnail is part of a creative work that belongs to the person who uploaded the video, and the fact that the image sits on an unauthenticated URL is not a licence. Embedding it next to a link that credits the video and the channel is the normal, expected use and is what the predictable URL exists for. Copying a large set of thumbnails into your own asset store and presenting them as your own catalogue, stripping the attribution, or using someone's face in an advertisement are all different acts with different risk, and none of them become acceptable because the fetch was easy. If you are building something commercial on top of other people's uploads, read YouTube's terms and take advice, rather than taking our word or anyone else's blog post for it.

Last updated September 2026.

download youtube thumbnailyoutube thumbnail urlmaxresdefaultyoutube thumbnail apivideo metadata