A subclass of FeedQuery, to create an YouTube query URI.
The YouTube Data API supports the following standard Google Data query parameters.
Name Definition
alt The alt parameter specifies the format of the feed to be returned.
Valid values for this parameter are atom, rss and json. The default
value is atom and this document only explains the format of Atom responses.
author The author parameter restricts the search to videos uploaded by a
particular YouTube user. The Videos uploaded by a specific user
section discusses this parameter in more detail.
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 for all Google Data APIs 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.
Please see the Google Data APIs Protocol Reference for more information about standard Google
Data API functionality or about these specific parameters.
Custom parameters for the YouTube Data API
In addition to the standard Google Data query parameters, the YouTube Data API defines
the following API-specific query parameters. These parameters are only available on video
and playlist feeds.
Name Definition
orderby The orderby parameter specifies the value that will be used to sort videos in the
search result set. Valid values for this parameter are relevance, published, viewCount
and rating. In addition, you can request results that are most relevant to a specific
language by setting the parameter value to relevance_lang_languageCode, where
languageCode is an ISO 639-1 two-letter language code. (Use the values zh-Hans for
simplified Chinese and zh-Hant for traditional Chinese.) In addition, please note that
results in other languages will still be returned if they are highly relevant to the
search query term.
The default value for this parameter is relevance for a search results feed. For a
playlist feed, the default ordering is based on the position of each video in the playlist.
For a user's playlists or subscriptions feed, the default ordering is arbitrary.
client The client parameter is an alphanumeric string that identifies your application. The
client parameter is an alternate way of specifying your client ID. You can also use the
X-GData-Client request header to specify your client ID. Your application does not need to
specify your client ID twice by using both the client parameter and the X-GData-Client
request header, but it should provide your client ID using at least one of those two methods.
format The format parameter specifies that videos must be available in a particular video format.
Your request can specify any of the following formats:
Value Video Format
1 RTSP streaming URL for mobile video playback. H.263 video (up to 176x144) and AMR audio.
5 HTTP URL to the embeddable player (SWF) for this video. This format is not available for a
video that is not embeddable. Developers commonly add format=5 to their queries to restrict
results to videos that can be embedded on their sites.
6 RTSP streaming URL for mobile video playback. MPEG-4 SP video (up to 176x144) and AAC audio
lr The lr parameter restricts the search to videos that have a title, description or keywords in a
specific language. Valid values for the lr parameter are ISO 639-1 two-letter language codes.
You can also use the values zh-Hans for simplified Chinese and zh-Hant for traditional Chinese. This
parameter can be used when requesting any video feeds other than standard feeds.
restriction The restriction parameter identifies the IP address that should be used to filter videos
that can only be played in specific countries. By default, the API filters out videos that cannot
be played in the country from which you send API requests. This restriction is based on your
client application's IP address.
To request videos playable from a specific computer, include the restriction parameter
in your request and set the parameter value to the IP address of the computer where the videos
will be played Ð e.g. restriction=255.255.255.255.
To request videos that are playable in a specific country, include the restriction parameter in your
request and set the parameter value to the ISO 3166 two-letter country code of the country where
the videos will be played Ð e.g. restriction=DE.
time The time parameter, which is only available for the top_rated, top_favorites, most_viewed,
most_discussed, most_linked and most_responded standard feeds, restricts the search to videos
uploaded within the specified time. 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.
Namespace:
Google.GData.YouTube
Assembly:
Google.GData.YouTube (in Google.GData.YouTube.dll)
Version: 1.4.0.2