API Overview Guide
|Custom Player and Widgets||Player APIs with Embedded Player||Data API and Chromeless Player|
The Video Bar is a simple way to have a strip of video thumbnails on your site. After clicking on a thumbnail, a floating player opens to play the video right on your site. There is a simple wizard to get you started, as well as a Programming Guide to help you tweak it. Be sure to read the section on YouTube-specific functionality.
Video Search Control
The Video Search Control brings the power of the Google AJAX Search API to your site, giving you the ability to search through YouTube's massive amounts of content. Each search box is pre-configured with a set of tags that you define and displays thumbnails for the video results. These videos can then be played without leaving the page. Use the wizard to get started, and then read the Programming Guide for how to customize the player with CSS, automatically search based on site links, save user searches, and more!
Sometimes it's nice to have control over your website without having to edit it. Many websites benefit from having video content, but updating this content can be difficult. This is where the YouTube custom player comes to the rescue. You can customize a YouTube player and populate it with videos you specify. Once the custom player is on your site, you can easily update the appearance or content by logging into your YouTube account and clicking on Custom Video Players.
When creating a custom player, you are able to choose from a number of themes for the player. The videos that a custom player displays can be all of the videos on your YouTube channel, all of your favorite videos, or any custom playlist you have created. By creating playlists and hooking them up to a custom player, you can easily control what is displayed on your website without ever leaving YouTube!
The following sections discuss each option and their uses:
The embedded player is the simplest way to place a YouTube video on a webpage. To customize the behavior and color of the player, you can use the documented Player Parameters. The code to display this player can be quickly generated from a program, making it possible to find a video using the Data API and then display it using the embedded player.
Interface elements and controls around content is sometimes referred to as "chrome" (e.g. the browser buttons on the top of a webpage.) The chromeless player is, by definition, a YouTube video with no controls. This makes it easy to customize within Flash or HTML.
The Data API allows a program to perform many of the operations available on the YouTube website. It is possible to search for videos, retrieve standard feeds, and see related content. A program can also authenticate as a user to upload videos, modify user playlists, and more.
The Data API is primarily for developers who are used to programming in server-side languages. It is useful for sites or applications that wish to have a deeper integration with YouTube. This integration could be a web application allowing users to upload video to YouTube. It could also be a device or desktop application that brings the YouTube experience to a new platform. The Data API gives you programmatic access to the video and user information stored on YouTube. With this, you can personalize your site or application with the user's existing information as well as perform actions on their behalf (like commenting on and rating videos.)
If you are curious about how the Data API works at the basic level using XML and HTTP, you can read the Protocol Guide. This guide details the requests and responses that the YouTube API servers expect and return. To learn more about the structure of these requests and responses, read the Reference Guide. This guide defines the API's feed types, HTTP request parameters, HTTP response codes, and XML elements. You may also want to read about the Google Data Protocol and the Atom Publishing Protocol, which are the standards upon which the Data API is built.
To make working with the API easier, we have a number of client libraries that abstract the API into a language-specific object model. These client libraries are open source and can be used and modified under the Apache License 2.0. There are Developer's Guides for Java, .NET, PHP, and Python as well as sample code.