YouTube API v2.0 – User Profiles and Accounts

Note: The YouTube Data API (v2) has been officially deprecated as of March 4, 2014. Please refer to our deprecation policy for more information. Please use the YouTube Data API (v3) for new integrations and migrate applications still using the v2 API to the v3 API as well.

A user profile contains information about a user, such as the user's hobbies, occupation, or favorite books, music and movies. Any personal information that appears in a user profile feed will have been entered by that user for publication on YouTube. The YouTube Data API allows you to retrieve user profiles.

In addition, API version 2.1 supports two additional operations for users who have unlinked Google Accounts. As discussed in the API versioning section, these are users who have a Google Account but who do not have a YouTube username. The username also identifies the YouTube channel associated with the user's uploaded videos. Those two operations are described below:

  • You can upgrade an unlinked Google Account to also be associated with a YouTube username. This operation also creates the YouTube channel for the user.

  • Before actually attempting to associate a user's unlinked Google Account with a new YouTube channel, you can retrieve a feed of unused YouTube usernames that are similar to a hint that you provide.

Retrieving a user's profile

This section explains how to retrieve an entry containing information about a specific user's profile.

  • To request the currently logged-in user's profile, send a GET request to the following URL. Note: For this request, you must provide an authentication token, which enables YouTube to identify the user.
  • To request another user's profile, send a GET request to the following URL. Note that this request does not require authentication.

    In the URL above, you should replace the text userId with the user's YouTube user ID. For backward compatibility purposes, the API also supports having the user's YouTube username specified instead.

An API response to a request for a user profile contains a single <entry> tag. The profile entry contains the following information:

  • Several tags in the yt namespace identify personal information that the user added to his YouTube profile, such as his age, favorite books, occupation or school.

  • The <media:thumbnail> tag contains a picture that the user has uploaded to his profile or, if no such picture exists, a default image.

  • The <yt:statistics> tag contains statistics about the user, including the number of people who have viewed the user's channel, the number of videos the user has watched, the number of people who subscribe to the user's uploaded videos, and the total number of views for all of the user's videos.

  • A series of <gd:feedLink> tags provide URLs for retrieving the user's uploaded videos, favorite videos, playlists, and subscriptions.

The following XML shows a sample API response containing a user profile:

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns=''
  <category scheme=''
  <title>Google Developers Channel</title>
  <summary>This channel is the home for videos of interest to developers.</summary>
  <link rel=''
  <link rel='related' type='text/html'
  <link rel='alternate' type='text/html'
  <link rel='self' type='application/atom+xml'
  <yt:aboutMe>My favorite number is 33.</yt:aboutMe>
  <gd:feedLink rel=''
    href='' countHint='4'/>
  <gd:feedLink rel=''
  <gd:feedLink rel=''
  <gd:feedLink rel=''
    href='' countHint='4'/>
  <gd:feedLink rel=''
    href='' countHint='1'/>
  <yt:hobbies>Testing YouTube APIs</yt:hobbies>
  <yt:hometown>Philadelphia, PA</yt:hometown>
  <yt:location>Boston, MA 02043, US</yt:location>
  <yt:maxUploadDuration seconds='930'/>
  <yt:movies>Aqua Teen Hungerforce</yt:movies>
  <yt:music>Elliott Smith</yt:music>
  <yt:occupation>Technical Writer</yt:occupation>
  <yt:school>University of North Carolina</yt:school>
  <media:thumbnail url=''/>
  <yt:statistics lastWebAccess='2008-02-25T16:03:38.000-08:00'
      viewCount='9' videoWatchCount='21' subscriberCount='1'
  <yt:username display="GoogleDevelopers">googledevelopers</yt:username>

Associating an unlinked Google Account with a YouTube channel

You can upgrade an unlinked Google Account so that it is associated with a YouTube username (and channel). This process is explained in the Creating a YouTube channel document, which describes the process of spawning an Android WebView, iOS UIWebView, or similar object, to allow a user to create a YouTube channel and then return control to your application.

Note: The process explained in that document replaces an API call for upgrading an unlinked Google Account that has since been deprecated.

pagination links

« Previous
Watch History
Next »
Activity feeds