My favorites | English | Sign in

More personalization in Google Friend Connect New!

YouTube APIs and Tools

YouTube logo

Developer's Guide: Data API Protocol – Revision History

November 5, 2009

This update contains the following changes:

  • The new caption parameter lets you restrict a search result set to only include videos that have caption tracks. The parameter is specified without a value, and its presence indicates that all videos in the result set must have captions.

  • The prettyprint parameter, which is a standard Google Data API parameter, is now documented for the YouTube Data API. This parameter, which was already supported, may be useful for testing and debugging your application.

  • The description of the video upload process for browser-based uploading has been updated to note that before allowing a user to submit the form for uploading a video, your application should ensure that the user has selected a file to upload. If the user submits the form without specifying a file, YouTube will display an error page indicating that the file was missing in the request but will not redirect the user to the nexturl specified in the request. By ensuring that the user has specified a file, you can prevent the user from reaching that error page.

August 31, 2009

This update contains the following changes:

  • The time parameter is now supported for search queries as well as for standard feeds.

  • The definition of the author parameter has been updated to explain how this parameter functions in a request for a standard feed.

  • The Friend activity feeds section has been updated to note that friend activity feed only contain events for contacts who are explicitly labeled as being in the user's Friends group, and that these feeds do not contain events for all of the user's contacts.

  • The definition of the <yt:state> tag's reasonCode attribute has been updated to better describe the meaning of the limitedSyndication code for a restricted video.

  • The sortorder parameter, which had enabled comments to be sorted in ascending or descending order, has been deprecated.

  • The most_linked standard feed has been deprecated. Queries for this feed will now return an empty feed.

July 29, 2009

This update contains the following changes:

  • The new Video recommendations section explains the new recommendations feed, which contains videos that may appeal to a logged-in user. YouTube selects recommendations for a user based on an algorithm that considers signals from a variety of sources that include the user's favorite videos, recently added playlist videos, recently watched videos, ratings and more.

  • The new Retrieving Insight data for a video section explains how to retrieve Insight reports for a video entry. Note that a video entry only contains a link to an Insight data feed if the authenticated user retrieving the entry owns the video. This section also defines the fields that appear in the Insight reports.

July 21, 2009

This update contains the following changes:

  • The new Providing captions for a video section explains how to add captions to a video file. Captions can help users to locate and understand a video. The new section provides formatting guidelines for caption files and also explains how to create, retrieve, update or delete caption tracks.

June 17, 2009

This update contains the following changes:

  • You can now use the Simple Update Protocol (SUP) to monitor user activity feeds for YouTube users. SUP enables an API provider such as YouTube to notify API users when a feed is updated. SUP is particularly useful for API users that want to monitor many different feeds at once. This functionality will likely be most appealing to sites that maintain their own friend graphs or that want to monitor the activities of many users.

    In conjunction with the SUP change, the User activity feeds section has been updated to explain that the API now supports two query formats for retrieving user activity feeds. Only one of these formats contains hash keys that you will need if you plan to use SUP in your application.

  • The new Developer's Guide adviser lets you tailor the YouTube API documentation to meet the needs of your application.

    • You identify the features that you want to implement and then the adviser hides information about any other features from the left menu.
    • The adviser customizes your pagination links so that you can page back and forth between only the features that you want to use.
    • The adviser stores your preferences in a cookie, so even if you can't finish your application in one browser session, your customized documents will not change.
    • The adviser displays links to edit or clear your preferences as well as a link that you can either bookmark or send to other developers.

April 8, 2009

This update contains the following changes:

  • The new Testing and troubleshooting section explains two resources, an interactive API demo and a staging server, that YouTube provides to help you implement the API. In addition, this section discusses several aspects of an API implementation that developers may find challenging. It provides an overview of each issue and explains how to handle the issue correctly.

  • The Custom query parameters for the YouTube Data API section has been updated to contain a list of parameters used to request any type of feed. The section also now lists parameters that are only used to request a particular type of feed, such as video search results, standard feeds, video feeds or comment feeds. Finally, the API parameter definitions have been updated to highlight cases where a parameter is only supported for search requests.

  • The restriction parameter definition has been updated to note that you should include this parameter in any request to retrieve a list of videos, including search results, playlists, favorite videos, video responses and so forth. If a video in the API response is not playable in the location that you're using to restrict availability of the content, the entry for that video will not contain a <media:content> tag. However, it will contain a <yt:state> tag that indicates that the video is restricted.

March 27, 2009

This update contains the following changes:

  • The new Searching for playlists section explains how to search for YouTube playlists matching a particular keyword or set of keywords.

March 3, 2009

This update contains the following changes:

  • The new Retrieving data for a single video section explains how to submit an API request that returns an Atom entry containing information about a single video.

  • The Videos uploaded by a specific user section has been updated to explain how to ensure that you are requesting the most up-to-date information available when requesting a feed of the logged-in user's uploaded videos.

February 24, 2009

This update contains the following changes:

  • The new Activity feeds section introduces user activity feeds, which let you retrieve a feed of actions that a particular user or set of users has taken on YouTube. This section also includes information about friend activity feeds, which were released in December.

    The Activity feeds section explains the different types of events that are listed in activity feeds. It also explains how user activity feeds and friend activity feeds are different. Finally, it provides instructions for submitting requests for each feed type.

  • The definition of the author parameter has been updated to explain how the parameter is used in a request to retrieve a user activity feed.

December 10, 2008

This update contains the following changes:

  • The new OAuth for web applications section explains how to authenticate users with the OAuth protocol, a standard way for accessing protected data on different websites.

  • The new Friend activity feeds section explains a new type of feed now available via the API. User activity feeds identify actions that an authenticated user's friends have recently taken on the YouTube site. Through the feed, a YouTube user can learn about videos that the user's friends have rated, shared, uploaded or marked as favorites.

  • The Subscriptions, Retrieving a user's subscriptions and Adding a subscription sections have been updated to explain playlist subscriptions, a new subscription type.

  • The new Searching for channels section explains how to search for YouTube channels matching a particular keyword or set of keywords.

  • The new key parameter provides an alternate way to identify your developer key when submitting an API request. The API client libraries always use HTTP request headers to specify your developer key (and client ID). However, developers who are not using one of the client libraries may find it easier to use the key (and client) query parameters to specify those values. The Using a developer key and client ID section has also been updated to explain how to use query parameters rather than HTTP request headers to provide your client ID and developer key.

  • The Deleting a favorite video section has been updated to note that the ID that you specify to delete a favorite video is not that video's <yt:videoid>, but another value that uniquely associates that video with the user who marked it as a favorite. This change only clarifies existing behavior and does not reflect changes in functionality.

  • The Playlists section has been updated to note that YouTube no longer lets playlist owners define custom titles and descriptions for playlist entries. The API still accepts requests that specify custom titles and descriptions, but it ignores those values. If playlist owners have already set custom titles or descriptions for playlist entries, the API will continue to return those values in playlist feeds as previously documented.

November 13, 2008

This update contains the following changes:

  • The API versioning section has been updated to simplify the instructions for specifying the API version that YouTube will use to handle an API request.

  • The new Backward Compatibility Guidelines document identifies API behaviors that may change even if you do not modify the API version that should be used to handle your API requests. The guidelines also identify API behaviors that are not intended to change for a particular API version. Finally, the guidelines discuss best practices for ensuring that your application properly handles API updates.

October 20, 2008

This update contains changes associated with the release of version 2 of the YouTube Data API. YouTube still supports API version 1. (See documentation for API version 1).

  • The new API versioning section explains how to specify the version of the API that YouTube should use to handle the request.

  • All XML examples in this document have been updated to specify that YouTube should use API version 2 to handle the API request. Similarly, all XML examples have been updated to match the output for API version 2.

  • The list of API query parameters has been divided into lists of standard Google Data API query parameters and custom query parameters for the YouTube Data API. In addition, the following API parameters have been updated:

    • The new v parameter can be used to specify the API version that YouTube will use to handle the API request.
    • The new safeSearch parameter indicates whether YouTube should include restricted content as well as standard content. The safeSearch parameter replaces the racy parameter, which has been deprecated with this API release.
    • The location parameter definition now explains how that parameter, in conjunction with the new location-radius parameter, can be used to request videos associated with a particular geographic area.
    • The new strict parameter can be used to instruct YouTube to reject API requests that contain invalid request parameters.
    • The new uploader parameter can be used to restrict search results to only contain partner videos.
    • The name of the vq parameter has changed to q.

  • The values of <id> tags in feed entries no longer specify a URI. In API version 2, the <id> tag value is a URN in a format like tag:youtube,2008:videos or tag:youtube,2008:video:24Ryj1ywoqw or tag:youtube,2008:favorite:24Ryj1ywoqwji5_MqicxSo.

  • The <summary> tag is a new tag that replaces the <yt:description> tag, which has been deprecated with this API release.

  • The <content> tag has replaced the <gd:feedLink> tag in playlists feeds and subscriptions feeds.

  • The type attribute has been removed from the <title> and <content> tags.

  • The <media:credit> tag is a new tag in playlist and inbox feed entries that identifies the YouTube user who uploaded a video. The <author> tag definition has been updated to reflect the fact that in playlist and inbox feed entries, the <author> tag does not identify the user who uploaded the video.

  • The <feed> and <entry> tags both in API responses now include a gd:etag attribute. Etags are a standard Google Data API feature for version 2 APIs, but the YouTube Data API does not use them at this time. Note that etags are also an HTTP standard.

October 3, 2008

This update contains the following changes:

  • The new Authenticating requests from Flash applications section explains how to use the X-HTTP-Method-Override header to submit a GET, PUT or DELETE request from a Flash application. Since Flash applications must send an HTTP POST request to set an Authorization header, the additional X-HTTP-Method-Override header must be set to submit a request that is not actually a POST request.

  • The new sortorder parameter, which is only valid for comments feeds, lets you specify whether the API will return comments in ascending order (oldest to newest) or descending order (newest to oldest).

  • The new Retrieving new subscription videos section explains how to retrieve a feed listing a user's new subscription videos. The feed returns the same list of videos that appears on the Subscriptions page of the user's YouTube account under the New Videos subheading.

August 18, 2008

  • The category parameter now provides an alternate way to search for videos that are in certain categories or are tagged with particular keywords">Browsing with categories and keywords section have all been updated to demonstrate how to use either the category parameter or the standard URL notation for searching by category, keyword or developer tag.

  • The Technical requirements for uploaded videos section contains a small correction. Previously, that section incorrectly stated that you could compress video files using the .zip format before uploading them. The guide now correctly states that you can compress API requests, including video uploads, using gzip transfer-encoding.

July 16, 2008

This update contains the following changes:

  • The newly added Using batch processing with the YouTube Data API section explains how to use batch processing to execute up to 50 operations with a single API request.

  • The guide includes a new section that explains how to add a comment in reply to another comment.

  • The Error responses section now describes service errors. A service error indicates that an API request failed because YouTube's services are temporarily unavailable. The only service error that has been defined thus far indicates that a request failed because the YouTube site is undergoing temporary maintenance.

  • The time query parameter now supports the most_popular standard feed in addition to the top_rated and most_viewed standard feeds.

June 12, 2008

This update contains the following changes:

  • The Messages section has been added to the document to explain new API functionality that enables a user to retrieve, send and delete messages from her inbox.

  • The Uploading videos section has been updated to note that the API will not let you upload additional videos to accounts that already contain 2000 or more videos.

  • The Assigning Developer Tags section has been updated to note that developer tags can only be associated with a video when that video is uploaded. In addition, the developer tags assigned when a video is uploaded cannot be changed thereafter.

  • The Standard feeds section has been updated to reflect the addition of a new feed, which is for YouTube's most popular videos. The section also now includes a short description of each feed.

  • The list of YouTube Data API query parameters has been updated to reflect the addition of the location query parameter. This parameter lets you request videos that have a geographic location specified in their metadata. You do not need to specify a parameter value for this parameter.

  • The Technical requirements for uploaded videos section has been updated to reflect the fact that the maximum size for uploaded videos has been increased from 100MB to 1GB. In addition, this section now correctly notes that the maximum length of uploaded videos is 10 minutes.

May 6, 2008

  • The Videos uploaded by a specific user and Direct uploading sections have been updated to clarify the meaning of the term default when that term appears in an API URL. Specifically, the term default identifies the currently logged-in user in a number of API commands. The user is, in turn, identified by the authentication token that you submit with the request.

  • The Handling the Upload API response section, which discusses the API response for partners that use direct uploading, has been updated to explain the format of the API response in more detail. Specifically, the section now explains how to use the self link in the API response to check the status of an uploaded video.

  • In conjunction with the previous update in this list, the Checking the status of an uploaded video section has also been updated to explain that, if you use the direct uploading method, you can use the self link in the API response to check the status of an uploaded video.

May 2, 2008

  • The Retrieving a user's contacts section has been updated to note that the API returns a maximum of 100 contacts for any given contact feed request even if more contacts match the request parameters.

  • The racy parameter definition has been updated to note that feed entries for videos that contain restricted content will contain the <media:rating> element.

  • The restriction parameter definition has been updated with a recommendation that you always include this parameter in API requests, setting the parameter value to the end user's IP address.

April 7, 2008

This document contains the following changes:

  • The newly added Revision History highlights important changes to this document. The revision history will not mention minor changes such as spelling corrections.

  • The API now supports the client parameter, which provides an alternate way of identifying your application. You can also use the X-GData-Client header to identify your application.

  • The Uploading videos section has been updated to note that the API will not allow you to upload new videos to an account that already contains 1000 or more videos.

  • The Playlists section has been updated to note that a playlist cannot contain more than 200 videos.