|
API
Video player api for YouTube.com, and how to use it.
IntroductionInstead of loading an entire video page to get information about a video, you can retrieve only the small bits that you need and nothing else. Note that it is only useful to make calls to this API if you're not on the page of the video you want, or you're using the embedded player. Another key thing to notice is that the t value is called token in the API. The APIIt is "get_video_info" and takes a video_id parameter: http://www.youtube.com/get_video_info?video_id= What is returnedAn escaped query string containing many parameters. An Example ScriptThe following script is a great example of how to use the API for videos. It looks up all the videos in a playlist, and gets the hidden token value for each one, as well as checks the fmt_map to see if it has an HD video. |
Sign in to add a comment