YouTube API v2.0 – Searching for Playlists

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.

This section explains how to use the API to retrieve a list of playlists matching a user-specified search term. YouTube tries to match the search term to playlist names and descriptions as well as to the metadata fields for videos in each playlist. To search for playlists, send a GET request to the following URL:

YouTube supports the following API query parameters for playlist search:

Note: The q parameter value can contain multiple words, and it can also use the Boolean NOT (-) and OR (|) operators. However, playlist search requests do not support searches for an exact phrase, as described in the q parameter definition.

Sample playlist search request

The following API request searches for the second set of 10 playlists matching the query term "GoogleDevelopers":

This request yields the following response:

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='' xmlns:openSearch='' xmlns:media='' xmlns:batch='' xmlns:yt='' xmlns:gd='' gd:etag='W/"DEAAQH44eip7ImA9WxVUGUQ."'>
  <category scheme='' term=''/>
  <title>YouTube Playlists matching query: GoogleDevelopers</title>
  <link rel='' type='application/atom+xml' href=''/>
  <link rel='' type='application/atom+xml' href=''/>
  <link rel='self' type='application/atom+xml' href=''/>
  <link rel='service' type='application/atomsvc+xml' href=''/>
  <link rel='next' type='application/atom+xml' href=''/>
  <generator version='2.0' uri=''>YouTube data API</generator>
  <entry gd:etag='W/"D0ANRn47eCp7ImA9WxVUF04."'>
    <id>,2008:playlist:snippet: PL5D286BD1D14EAF40</id>
    <category scheme='' term=''/>
    <title>Google Data <b>APIs</b></title>
    <content type='application/atom+xml;type=feed' src=''/>
    <link rel='related' type='application/atom+xml' href=''/>
    <link rel='alternate' type='text/html' href=' PL5D286BD1D14EAF40'/>
    <link rel='self' type='application/atom+xml' href=''/>
    <link rel='edit' type='application/atom+xml' href=''/>
      <media:thumbnail url="" height="90" width="120" yt:name="default"/>
      <media:thumbnail url="" height="180" width="320" yt:name="mqdefault"/>
      <media:thumbnail url="" height="360" width="480" yt:name="hqdefault"/>
    <yt:playlistId> PL5D286BD1D14EAF40</yt:playlistId>

Each entry in the response contains information about a YouTube playlist that matches the search request. Entries contain the following information:

  • The <title> and <summary> tags specify a name and description of the playlist, respectively. (Note that some playlists may not have a description, in which case the <summary> tag will be empty.)

  • The <author> tag identifies the owner of the playlist.

  • The <content> tag identifies the URL that you would use to retrieve a feed of the videos in the playlist.

  • The <link> tags contain links relevant to the playlist, including a link to retrieve the playlist owner's profile data through the API and a link to view the playlist on the YouTube website.

  • The <yt:playlistId> tag contains a value that YouTube uses to uniquely identify a playlist. You could use this value to add a subscription to the playlist.

  • The <yt:countHint> tag specifies the number of videos in the playlist.

pagination links

« Previous
Searching for Channels
Next »
Uploading Videos