Search Parameters

The following parameters apply for all youtube search.

max-results

The max-results parameter specifies the maximum number of results that should be included in the result set. This parameter works in conjunction with the start-index parameter to determine which results to return.

For example, to request the second set of 10 results – i.e. results 11-20 – set the max-results parameter to 10 and the start-index parameter to 11. The default value of this parameter is 25, and the maximum value is 50. However, for displaying lists of videos, we recommend that you set the max-results parameter to 10.

start-index

The start-index parameter specifies the index of the first matching result that should be included in the result set. This parameter uses a one-based index, meaning the first result is 1, the second result is 2 and so forth. This parameter works in conjunction with the max-results parameter to determine which results to return.

For example, to request the second set of 10 results – i.e. results 11-20 – set the start-index parameter to 11 and the max-results parameter to 10

orderby

The orderby parameter specifies the sorting order of the matching result.

orderby=view_count (sort by the most view count)

orderby=published (sort by the published date)

orderby=rating (sort by most highest rating)

orderby=relevance (sort by relevance)

time

The time parameter is supported for search feeds and for a number of standard feeds.

Valid values for this parameter are today (1 day), this_week (7 days), this_month (1 month) and all_time. The default value for this parameter is all_time.

time=today, this_week, this_month or all_time

This parameter is supported for the following feeds and charts:

top_rated 

top_favorites

most_popular (only supported values are today and all_time)

most_discussed

most_responded

Search video on Youtube

query=search keyword

for example, search for NBA:

<feed>
<updated>1349671804324</updated>
<titleKeyword>YouTube Videos matching query: nba</titleKeyword>
<linkNext>

http://gdata.youtube.com/feeds/api/videos?q=nba&;start-index=26&max-results=25&safeSearch=none&orderby=relevance&client=AI39si4MPNEYG5Wgh4ZWMG80t7rVjVg0gFtrr-rP6s_KQlx6ojSQTkJjLd06ReJ4N8o07HwmaEnQEaskBk0CwmwDTawbbM54wQ

</linkNext>
<totalResults>915168</totalResults>
<startIndex>1</startIndex>
<itemsPerPage>25</itemsPerPage>
<entry>
    <id>ipbEb6-jKm4</id>
    <published>1349386924000</published>
    <updated>1349667405000</updated>
    <title>NBA Rooks: Golden State Warriors</title>
    <authorName>NBA</authorName>
    <authorUri>http://gdata.youtube.com/feeds/api/users/NBA</authorUri>
    <mediaCategory>Sports</mediaCategory>
    <mediaDescription>
        NBA Rooks follows the Golden State Warriors' rookies, Harrison Barnes, Draymond Green, and Festus Ezeli, as they make the transition to life in the NBA. Show premieres November 7th, 2012 on NBA TV.
    </mediaDescription>
    <mediaPlayer>http://www.youtube.com/watch?v=ipbEb6-jKm4&;feature=youtube_gdata_player</mediaPlayer>
    <mediaFlash url="http://www.youtube.com/v/ipbEb6-jKm4?version=3&;f=videos&c=AI39si4MPNEYG5Wgh4ZWMG80t7rVjVg0gFtrr-rP6s_KQlx6ojSQTkJjLd06ReJ4N8o07HwmaEnQEaskBk0CwmwDTawbbM54wQ&app=youtube_gdata" type="application/x-shockwave-flash" medium="video" expression="FULL" duration="226" />
    <media3gpp url="rtsp://v8.cache6.c.youtube.com/CoYBCxDcu98CGn0Jbiqjr2_ElooTGA0gDRRCYkFJMzlzaTRNUE5FWUc1V2doNFpXTUc4MHQ3clZqVmcwZ0Z0cnItclA2c19LUWx4Nm9qU1FUa0pqTGQwNlJlSjROOG8wN0h3bWFFblFFYXNrQmswQ3dtd0RUYXdiYk01NHdRSAZSBnZpZGVvcww=/0/0/0/video.3gp" type="video/3gpp" medium="video" expression="FULL" duration="226" />
    <media3gpp url="rtsp://v3.cache3.c.youtube.com/CoYBCxDcu98CGn0Jbiqjr2_ElooTGBEgERRCYkFJMzlzaTRNUE5FWUc1V2doNFpXTUc4MHQ3clZqVmcwZ0Z0cnItclA2c19LUWx4Nm9qU1FUa0pqTGQwNlJlSjROOG8wN0h3bWFFblFFYXNrQmswQ3dtd0RUYXdiYk01NHdRSAZSBnZpZGVvcww=/0/0/0/video.3gp" type="video/3gpp" medium="video" expression="FULL" duration="226" />
    <thumbnail url="http://i.ytimg.com/vi/ipbEb6-jKm4/default.jpg" height="90" width="120" time="00:01:53" />
    <thumbnail url="http://i.ytimg.com/vi/ipbEb6-jKm4/mqdefault.jpg" height="180" width="320" />
    <thumbnail url="http://i.ytimg.com/vi/ipbEb6-jKm4/hqdefault.jpg" height="360" width="480" />
    <thumbnail url="http://i.ytimg.com/vi/ipbEb6-jKm4/1.jpg" height="90" width="120" time="00:00:56.500" />
    <thumbnail url="http://i.ytimg.com/vi/ipbEb6-jKm4/2.jpg" height="90" width="120" time="00:01:53" />
    <thumbnail url="http://i.ytimg.com/vi/ipbEb6-jKm4/3.jpg" height="90" width="120" time="00:02:49.500" />
    <statistics>
           <favoriteCount>0</favoriteCount>
           <viewCount>82622</viewCount>
           <numDislikes>12</numDislikes>
           <numLikes>860</numLikes>
           <ratingCount>872</ratingCount>
           <ratingAverage>4.944954</ratingAverage>
      </statistics>
</entry>
<entry>
    <id>2Acjgyt40rU</id>
    <published>1349188034000</published>
    <updated>1349668681000</updated>
    <title>Dwight Howard Media Day Interview</title>
    <authorName>NBA</authorName>
    <authorUri>http://gdata.youtube.com/feeds/api/users/NBA</authorUri>
    <mediaCategory>Sports</mediaCategory>
    <mediaDescription>
    Dwight Howard talks with NBA TV about his new team, the Los Angeles Lakers, and what his role is going to be for the upcoming 2012-2013 season.
    </mediaDescription>
    <mediaPlayer>http://www.youtube.com/watch?v=2Acjgyt40rU&;feature=youtube_gdata_player</mediaPlayer>
    <mediaFlash url="http://www.youtube.com/v/2Acjgyt40rU?version=3&;f=videos&c=AI39si4MPNEYG5Wgh4ZWMG80t7rVjVg0gFtrr-rP6s_KQlx6ojSQTkJjLd06ReJ4N8o07HwmaEnQEaskBk0CwmwDTawbbM54wQ&app=youtube_gdata" type="application/x-shockwave-flash" medium="video" expression="FULL" duration="181" />
    <media3gpp url="rtsp://v6.cache5.c.youtube.com/CoYBCxDcu98CGn0JtdJ4K4MjB9gTGA0gDRRCYkFJMzlzaTRNUE5FWUc1V2doNFpXTUc4MHQ3clZqVmcwZ0Z0cnItclA2c19LUWx4Nm9qU1FUa0pqTGQwNlJlSjROOG8wN0h3bWFFblFFYXNrQmswQ3dtd0RUYXdiYk01NHdRSAZSBnZpZGVvcww=/0/0/0/video.3gp" type="video/3gpp" medium="video" expression="FULL" duration="181" />
    <media3gpp url="rtsp://v5.cache5.c.youtube.com/CoYBCxDcu98CGn0JtdJ4K4MjB9gTGBEgERRCYkFJMzlzaTRNUE5FWUc1V2doNFpXTUc4MHQ3clZqVmcwZ0Z0cnItclA2c19LUWx4Nm9qU1FUa0pqTGQwNlJlSjROOG8wN0h3bWFFblFFYXNrQmswQ3dtd0RUYXdiYk01NHdRSAZSBnZpZGVvcww=/0/0/0/video.3gp" type="video/3gpp" medium="video" expression="FULL" duration="181" />
    <thumbnail url="http://i.ytimg.com/vi/2Acjgyt40rU/default.jpg" height="90" width="120" time="00:01:30.500" />
    <thumbnail url="http://i.ytimg.com/vi/2Acjgyt40rU/mqdefault.jpg" height="180" width="320" />
    <thumbnail url="http://i.ytimg.com/vi/2Acjgyt40rU/hqdefault.jpg" height="360" width="480" />
    <thumbnail url="http://i.ytimg.com/vi/2Acjgyt40rU/1.jpg" height="90" width="120" time="00:00:45.250" />
    <thumbnail url="http://i.ytimg.com/vi/2Acjgyt40rU/2.jpg" height="90" width="120" time="00:01:30.500" />
    <thumbnail url="http://i.ytimg.com/vi/2Acjgyt40rU/3.jpg" height="90" width="120" time="00:02:15.750" />
    <statistics>
          <favoriteCount>0</favoriteCount>
          <viewCount>81968</viewCount>
          <numDislikes>85</numDislikes>
          <numLikes>797</numLikes>
          <ratingCount>882</ratingCount>
          <ratingAverage>4.6145124</ratingAverage>
    </statistics>
</entry>
..

Get standard video on Youtube

Get the video by feed_id and time:

For example, feed_id is recently_featured

{feed_id}

feed_id=top_rated (Top Rated : This feed contains the most highly rated YouTube videos.)

feed_id=top_favorites (Top favorites : This feed contains videos most frequently flagged as favorite videos.)

feed_id=most_shared ( Most Shared : This feed lists the YouTube videos most frequently shared on Facebook and Twitter. This feed is available as an experimental feature. )

feed_id=most_popular (Most Popular : This feed contains the most popular YouTube videos, selected using an algorithm that combines many different signals to determine overall popularity.)

feed_id=most_recent (Most Recent : This feed contains the videos most recently submitted to YouTube.)

feed_id=most_discussed (Most Discussed : This feed contains the YouTube videos that have received the most comments)

feed_id=most_responded (Most Responded : This feed contains YouTube videos that receive the most video responses.)

feed_id=recently_featured (Recently featured: This feed contains videos recently featured on the YouTube home page or featured videos tab.)

feed_id=on_the_web (Trending videos: This feed lists trending videos as seen on YouTube Trends, which surfaces popular videos as their popularity is increasing and also analyzes broader trends developing within the YouTube community. )

Get single video by Id with Comments

Get the video by id:

For example, id is 9bZkp7q19f0

Note the result contains a list of comments

<Entry>
      <id>9bZkp7q19f0</id>
      <published>1342338392000</published>
      <updated>1349672119000</updated>
      <title>PSY - GANGNAM STYLE (강남스타일) M/V</title>
      <authorName>officialpsy</authorName>
      <authorUri>http://gdata.youtube.com/feeds/api/users/officialpsy</authorUri>
      <mediaCategory>Music</mediaCategory>
      <mediaDescription>
            PSY - Gangnam Style (강남스타일) ▶ NOW available on iTunes: http://Smarturl.it/psygangnam ▶ About PSY from YG Ent.: http://ygfamily.com/artist/About.asp?LANGDIV=E&;ATYPE=2&ARTIDX=15 ▶ PSY's Products on eBay: http://stores.ebay.com/ygentertainment ▶ YG-eShop: http://www.ygeshop.com/shop/goods/goods_view.php?&;goodsno=962 From 2 years of break, PSY is finally coming back with his 6th album 'PSY6甲'! The album's weighty title song 'Gangnam Style' is composed solely by PSY himself from lyrics to choreography. The song is characterized by its strongly addictive beats and lyrics, and is thus certain to penetrate the foundations of modern philosophy. 가수 싸이가 6집 앨범 '싸이6甲(싸이육갑)'으로 2년 만에 전격 컴백한다! 타이틀 곡은 싸이가 직접 작사·작곡한 '강남스타일'로 싸이는 멜로디, 가사, 안무 등 다방면에서 강한 중독성을 보여 줄 예정이다. For More Information @ http://www.facebook.com/officialpsy http://twitter.com/psy_oppa http://twitter.com/ygent_official http://me2day.net/psyfive http://www.psypark.com App Store: http://goo.gl/l9TU6 Google Play: http://goo.gl/UiEn1
      </mediaDescription>
      <mediaPlayer>http://www.youtube.com/watch?v=9bZkp7q19f0&;feature=youtube_gdata_player</mediaPlayer>
      <mediaFlash url="http://www.youtube.com/v/9bZkp7q19f0?version=3&;f=videos&c=AI39si4MPNEYG5Wgh4ZWMG80t7rVjVg0gFtrr-rP6s_KQlx6ojSQTkJjLd06ReJ4N8o07HwmaEnQEaskBk0CwmwDTawbbM54wQ&app=youtube_gdata" type="application/x-shockwave-flash" medium="video" expression="FULL" duration="253" />
      <media3gpp url="rtsp://v2.cache5.c.youtube.com/CoYBCxDcu98CGn0J_fW1uqdktvUTGA0gDRRCYkFJMzlzaTRNUE5FWUc1V2doNFpXTUc4MHQ3clZqVmcwZ0Z0cnItclA2c19LUWx4Nm9qU1FUa0pqTGQwNlJlSjROOG8wN0h3bWFFblFFYXNrQmswQ3dtd0RUYXdiYk01NHdRSAZSBnZpZGVvcww=/0/0/0/video.3gp" type="video/3gpp" medium="video" expression="FULL" duration="253" />
      <media3gpp url="rtsp://v4.cache3.c.youtube.com/CoYBCxDcu98CGn0J_fW1uqdktvUTGBEgERRCYkFJMzlzaTRNUE5FWUc1V2doNFpXTUc4MHQ3clZqVmcwZ0Z0cnItclA2c19LUWx4Nm9qU1FUa0pqTGQwNlJlSjROOG8wN0h3bWFFblFFYXNrQmswQ3dtd0RUYXdiYk01NHdRSAZSBnZpZGVvcww=/0/0/0/video.3gp" type="video/3gpp" medium="video" expression="FULL" duration="253" />
      <thumbnail url="http://i.ytimg.com/vi/9bZkp7q19f0/default.jpg" height="90" width="120" time="00:02:06.500" />
      <thumbnail url="http://i.ytimg.com/vi/9bZkp7q19f0/mqdefault.jpg" height="180" width="320" />
      <thumbnail url="http://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg" height="360" width="480" />
      <thumbnail url="http://i.ytimg.com/vi/9bZkp7q19f0/1.jpg" height="90" width="120" time="00:01:03.250" />
      <thumbnail url="http://i.ytimg.com/vi/9bZkp7q19f0/2.jpg" height="90" width="120" time="00:02:06.500" />
      <thumbnail url="http://i.ytimg.com/vi/9bZkp7q19f0/3.jpg" height="90" width="120" time="00:03:09.750" />
      <statistics>
            <favoriteCount>0</favoriteCount>
            <viewCount>402076641</viewCount>
            <numDislikes>170998</numDislikes>
            <numLikes>3679040</numLikes>
            <ratingCount>3850038</ratingCount>
            <ratingAverage>4.8223414</ratingAverage>
      </statistics>
      <comments>
            <comment>
                  <commentPublished>2012-10-08T04:55:18.000Z</commentPublished>
                  <commentTitle>30 likes, what you ...</commentTitle>
                  <commentContent>30 likes, what you worried about? lol</commentContent>
                  <commentAuthor>princessliz15</commentAuthor>
                  <commentAuthorUri>http://gdata.youtube.com/feeds/api/users/princessliz15</commentAuthorUri>
            </comment>
            <comment>
                  <commentPublished>2012-10-08T04:55:16.000Z</commentPublished>
                  <commentTitle>arghhhhhh</commentTitle>
                  <commentContent>arghhhhhh</commentContent>
                  <commentAuthor>donsalta1441</commentAuthor>
                  <commentAuthorUri>http://gdata.youtube.com/feeds/api/users/donsalta1441</commentAuthorUri>
            </comment>
            <comment>
                  <commentPublished>2012-10-08T04:55:15.000Z</commentPublished>
                  <commentTitle>I am about to dance ...</commentTitle>
                  <commentContent>I am about to dance to this song in front of my boyfriend. idgaf:D</commentContent>
                  <commentAuthor>Valentina Karina Rodriguez</commentAuthor>
                  <commentAuthorUri>http://gdata.youtube.com/feeds/api/users/Xxi9wB4tzI1AawvzS5e9nQ</commentAuthorUri>
            </comment>

        ...
        <comments>