how to get youtube thumbnail and information using url

0
4272

how to Get YouTube video Data in JSON format?
How do I get the title of a youtube video if I have the Video Id?

Overview

we can get json out of any video with the help of any youtube video url with the below magical url link.

http://www.youtube.com/oembed?format=json&url={you video url goes here}

Example PHP Code

<?php
$data = file_get_contents("https://www.youtube.com/oembed?format=json
                           &url=https://www.youtube.com/watch?v=_7s-6V_0nwA");
 $json = json_decode($data);
 var_dump($json);
?>

thanks for watching Subscribe us for more videos!

Summary

How to Get Youtube Video Thumbnail and Other Information like Title,channel name and url and thumbnail in json output.
we can use it any programing language.we will also see the demo for php language
and see the sample code out in form of var_dump output.