Developer API: Introduction

Getting Started

First, you must have a developer ID. If you do not have one, you can request one by creating a developer profile.

As a sneak preview of the ease-of-use of the API, request the following URL in your web browser to request your own user profile:

http://www.youtube.com/api2_rest?method=youtube.users.get_profile&dev_id=YOUR_DEV_ID&user=YOUTUBE_USER_NAME

You should see results like the following:

   YouTube User YouTube rocks!! 30                 7 .... and more ....  

To maintain backward-compatibility, we have retained the older XML-based API. The older documentation can be found here.

Result Format

All API calls return an XML document. Successful API calls return an XML document of the following form:

 ... response XML document ... 

Failed API calls return an XML document as follows:

 Missing dev_id parameter. </ut_response>

The code element provides the machine-friendly error code that your application can use to determine the error type and handle it appropriately. The description element provides you with a human-readable description of the error.

API Call Interfaces

There are two styles of API calls that you can mix-and-match at your convenience, REST and XML-RPC