by (14.2k points) edited by
0 like 0 dislike

How I can to get thumbnail image from YouTube video? How do I get a YouTube video thumbnail from the YouTube API?

  • youtube get video thumbnail
  • youtube get video thumb

1 Answer

0 like 0 dislike
by (14.2k points)

Fast answer

In YouTube API V3 we can also use these URLs for obtaining thumbnails. They are classified based on their quality:<insert-youtube-video-id-here>/default.jpg - default<insert-youtube-video-id-here>/mqdefault.jpg - medium<insert-youtube-video-id-here>/hqdefault.jpg - high<insert-youtube-video-id-here>/sddefault.jpg - standard

And for maximum resolution:<insert-youtube-video-id-here>/maxresdefault.jpg

Full answer

Each YouTube video has 4 generated images. They are predictably formatted as follows:<insert-youtube-video-id-here>/0.jpg<insert-youtube-video-id-here>/1.jpg<insert-youtube-video-id-here>/2.jpg<insert-youtube-video-id-here>/3.jpg

First one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:<insert-youtube-video-id-here>/default.jpg

For the high quality version of the thumbnail use a url similar to this:<insert-youtube-video-id-here>/hqdefault.jpg

There is also a medium quality version of the thumbnail, using a url similar to the HQ:<insert-youtube-video-id-here>/mqdefault.jpg

For the standard definition version of the thumbnail, use a url similar to this:<insert-youtube-video-id-here>/sddefault.jpg

For the maximum resolution version of the thumbnail use a url similar to this:<insert-youtube-video-id-here>/maxresdefault.jpg

All of the above urls are available over http too. Additionally, the slightly shorter hostname works in place of in the example urls above.

Alternatively, you can use the YouTube Data API (v3) to get thumbnail images.

Not every YouTube video contains all nine thumbnails, but there are seven thumbnails for every video. They are:

Image size depends on video.

And additionally, next two thumbnails may or may not exist. For HQ videos they exist:

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.