Scott Winn - CNIT 133 - Homework 8

Home

AJAX PHP Example


Start typing a name:



Suggestion:

YouTube Data API v3

The YouTube Data API allows you to access data about a YouTube account and edit the associated content. While this is a public API, it does require a Google account to access the Google API Console, request an API key, and register an application or website. Additionally, access to some API operations requires you to implement OAuth 2.0 authorization.

This API allows common operations (list, insert, update, delete) as well as other resource-specific operations. You are required to access the resources in parts in order to minimize traffic in the API network. In fact this API also allows gzip encoding to further reduce bandwidth. Each part response contains properties and value which are returned as a JSON object.

Example: A YouTube channel resource contains several parts, such as contentDetails, brandingSettings, and a unique ID. contentDetails then has a property called relatedPlaylists which reveals a unique id for the channel's video uploads.

A sample call to get the id of a playlist for all videos on a given channel id:
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?
part=contentDetails
&id=UCK8sQmJBp8GCxrOtXWBpyEA

A suebsequent call to retrieve the playlist resource using the returned playlist id:
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.playlistItems.list?
part=snippet,contentDetails,status
&playlistId=UUK8sQmJBp8GCxrOtXWBpyEA

The YouTube Data API v3 can be found here:
https://developers.google.com/youtube/v3