Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yes. The v3 API allows you do do this via <a href="https://developers.google.com/youtube/v3/docs/videos/list?hl=de" rel="nofollow">videos/list</a>. Here's an example API call using a trailer for The Dark Knight Rises:</p> <p>GET <a href="https://www.googleapis.com/youtube/v3/videos?part=topicDetails&amp;id=g8evyE9TuYk&amp;fields=items%2FtopicDetails%2FtopicIds&amp;key=" rel="nofollow">https://www.googleapis.com/youtube/v3/videos?part=topicDetails&amp;id=g8evyE9TuYk&amp;fields=items%2FtopicDetails%2FtopicIds&amp;key=</a>{YOUR_API_KEY}</p> <p>(To get a developer key, follow the instructions in our <a href="http://www.youtube.com/watch?v=Im69kzhpR3I&amp;list=PLhBgTdAWkxeB-zCekGukAo0DzmpwBiua2&amp;index=1" rel="nofollow">video tutorial</a>).</p> <p>That sets:</p> <p>topic: topicDetails id: g8evyE9TuYk fields: items/topicDetails/topicIds</p> <p>In the response body, you get:</p> <pre><code>{ "items": [ { "topicDetails": { "topicIds": [ "/m/0bpm4yw", "/m/01d5g", "/m/0btpm6", "/m/0184dt", "/m/02vxn" ] } } ] } </code></pre> <p>These correspond to Freebase mids, which you can lookup using the <a href="http://wiki.freebase.com/wiki/Freebase_API" rel="nofollow">Freebase API</a>. For instance, the first response corresponds to the <a href="http://www.freebase.com/m/0bpm4yw" rel="nofollow">Freebase entity The Dark Knight Rises (movie)</a>. Once you look up the entity, you can look up related entities such as the director, actors, or genre.</p> <p>Play around with the API explorer a bit. When you're ready to translate this into code, watch out video about turning the <a href="http://www.youtube.com/watch?v=GNRMeaz6QRI&amp;list=PLhBgTdAWkxeCMHYCQ0uuLyhydRJGDRNo5" rel="nofollow">API reference into code</a>.</p>
 

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