Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Getting a Youtube video thumbnail using youtube Api

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 149
    Comment on it

    You can use YouTube video related information using YouTube API, using this API you can retrieve details such as video thumbnails, caption, description, statistics and more. You just need to obtain the YouTube key and create a videos: list request:

    $data = file_get_contents("https://www.googleapis.com/youtube/v3/videos?key=YOUR_API_KEY&part=snippet&id=ABOthijGKLj");
    $json = json_decode($data);
    var_dump($json->items[0]->snippet->thumbnails);
    

    In YouTube API V3 we can also use these URLs for getting video thumbnails.They are classified on the basis of

    their quality.
    
    https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/default.jpg -   default
    https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg - medium 
    https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg - high
    https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/sddefault.jpg - standard
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: