Is there a YouTube API that can give me structured metadata about a video? -


using youtube api, how can fetch structured data video? instance, given video movie trailer, how can find movie title or topic in structured format, , other interesting metadata such celebrities featured or director?

yes. v3 api allows do via videos/list. here's example api call using trailer dark knight rises:

get https://www.googleapis.com/youtube/v3/videos?part=topicdetails&id=g8evye9tuyk&fields=items%2ftopicdetails%2ftopicids&key={your_api_key}

(to developer key, follow instructions in our video tutorial).

that sets:

topic: topicdetails id: g8evye9tuyk fields: items/topicdetails/topicids

in response body, get:

{  "items": [   {    "topicdetails": {     "topicids": [      "/m/0bpm4yw",      "/m/01d5g",      "/m/0btpm6",      "/m/0184dt",      "/m/02vxn"     ]    }   }  ] } 

these correspond freebase mids, can lookup using freebase api. instance, first response corresponds freebase entity dark knight rises (movie). once entity, can related entities such director, actors, or genre.

play around api explorer bit. when you're ready translate code, watch out video turning api reference code.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -