Get a thumbnail from the Vimeo API

Posted in ,

Grabbing the thumbnail URL for a video hosted on YouTube has always been simple. Just stick the video’s unique ID into a URL and bam- there’s your image. When it came to the Vimeo API, on the other hand, it used to be simple.

Recently Vimeo has been in the process of sunsetting it’s classic “SImple” API, also known as version 2. It seems like some videos still appear on the old API and some don’t. Now grabbing a thumbnail requires an developer app, API access, oAuth, and a huge php library to boot.

Luckily, I stumbled upon this approach from the Drupal community. Contrary to the title of this post, the thumbnail isn’t going to come from the Vimeo Developer API exactly, but instead Vimeo’s oEmbed endpoints.

Whether or not the video is public or private, as long as it is allowed to be embedded, vimeo provides an oEmbed endpoint with useful information about the video, including the thumbnail URL. Just grab the sweet JSON information, pull out the thumbnail URL, and enjoy!

This handy little PHP function takes in the embed URL of a Vimeo video, hits the Vimeo API, grabs the oEmbed data, and spits out the thumbnail URL (or false if there are any issues). Play around with is, and see what other data you can grab.


  1. Scott Kondor on June 18, 2018 at 12:40 am

    Thanks a lot! Great code that works without issue.

  2. Spurgeon on June 19, 2018 at 6:08 am

    God bless you abundantly dear Brian!!

  3. Hannah Hudson on July 12, 2018 at 8:34 am

    Thank so much, Brian!!

  4. James Myers on July 26, 2018 at 1:22 pm

    Brian you are the man!

  5. Timothy Johns on September 10, 2018 at 10:07 am

    Don’t think I have a way to install Vimeo’s PHP library… this is a lifesaver! Thanks!

  6. vgfr456 on November 1, 2018 at 9:42 am

    Does it still work?

    • Brian Coords on November 1, 2018 at 10:11 am

      As far as I know!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.