Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use <a href="https://developers.google.com/youtube/v3/" rel="noreferrer"><strong>YouTube Data API</strong></a> to retrieve video thumbnails, caption, description, rating, statistics and more. API version 3 requires a key*. Obtain the key and create a <a href="https://developers.google.com/youtube/v3/docs/videos/list" rel="noreferrer"><strong>videos: list</strong></a> request:</p> <pre><code>https://www.googleapis.com/youtube/v3/videos?key=YOUR_API_KEY&amp;part=snippet&amp;id=VIDEO_ID </code></pre> <p><strong>Example PHP Code</strong></p> <pre><code>$data = file_get_contents("https://www.googleapis.com/youtube/v3/videos?key=YOUR_API_KEY&amp;part=snippet&amp;id=T0Jqdjbed40"); $json = json_decode($data); var_dump($json-&gt;items[0]-&gt;snippet-&gt;thumbnails); </code></pre> <p><strong>Output</strong></p> <pre><code>object(stdClass)#5 (5) { ["default"]=&gt; object(stdClass)#6 (3) { ["url"]=&gt; string(46) "https://i.ytimg.com/vi/T0Jqdjbed40/default.jpg" ["width"]=&gt; int(120) ["height"]=&gt; int(90) } ["medium"]=&gt; object(stdClass)#7 (3) { ["url"]=&gt; string(48) "https://i.ytimg.com/vi/T0Jqdjbed40/mqdefault.jpg" ["width"]=&gt; int(320) ["height"]=&gt; int(180) } ["high"]=&gt; object(stdClass)#8 (3) { ["url"]=&gt; string(48) "https://i.ytimg.com/vi/T0Jqdjbed40/hqdefault.jpg" ["width"]=&gt; int(480) ["height"]=&gt; int(360) } ["standard"]=&gt; object(stdClass)#9 (3) { ["url"]=&gt; string(48) "https://i.ytimg.com/vi/T0Jqdjbed40/sddefault.jpg" ["width"]=&gt; int(640) ["height"]=&gt; int(480) } ["maxres"]=&gt; object(stdClass)#10 (3) { ["url"]=&gt; string(52) "https://i.ytimg.com/vi/T0Jqdjbed40/maxresdefault.jpg" ["width"]=&gt; int(1280) ["height"]=&gt; int(720) } } </code></pre> <p>* Not only that you need a key, you might be asked for billing information depending on the number of API requests you plan to make. However, few million requests per day are free.</p> <p><a href="http://salman-w.blogspot.com/2010/01/retrieve-youtube-video-title.html" rel="noreferrer">Source article</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload