blob: 393977b7f02aa1232fe58118eb4eb39538344b09 [file] [log] [blame]
Joe Gregoriod67010d2012-11-05 08:57:06 -05001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Joe Gregorio52a5c532013-01-24 16:19:07 -050075<h1><a href="youtube_v3.html">YouTube Data API</a> . <a href="youtube_v3.search.html">search</a></h1>
Joe Gregoriod67010d2012-11-05 08:57:06 -050076<h2>Instance Methods</h2>
77<p class="toc_element">
Joe Gregorio52a5c532013-01-24 16:19:07 -050078 <code><a href="#list">list(part=None, channelId=None, videoSyndicated=None, videoCaption=None, publishedAfter=None, regionCode=None, type=None, topicId=None, publishedBefore=None, videoDimension=None, videoLicense=None, maxResults=None, relatedToVideoId=None, videoDefinition=None, pageToken=None, videoDuration=None, q=None, videoEmbeddable=None, videoCategoryId=None, order=None)</a></code></p>
79<p class="firstline">Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.</p>
Joe Gregoriod67010d2012-11-05 08:57:06 -050080<p class="toc_element">
81 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<h3>Method Details</h3>
84<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -050085 <code class="details" id="list">list(part=None, channelId=None, videoSyndicated=None, videoCaption=None, publishedAfter=None, regionCode=None, type=None, topicId=None, publishedBefore=None, videoDimension=None, videoLicense=None, maxResults=None, relatedToVideoId=None, videoDefinition=None, pageToken=None, videoDuration=None, q=None, videoEmbeddable=None, videoCategoryId=None, order=None)</code>
86 <pre>Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.
Joe Gregoriod67010d2012-11-05 08:57:06 -050087
88Args:
Joe Gregorio52a5c532013-01-24 16:19:07 -050089 part: string, The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet.
90
91If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a search result, the snippet property contains other properties that identify the result's title, description, and so forth. If you set part=snippet, the API response will also contain all of those nested properties. (required)
92 channelId: string, The channelId parameter indicates that the API response should only contain resources created by the channel
93 videoSyndicated: string, The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com.
Joe Gregoriod67010d2012-11-05 08:57:06 -050094 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -050095 any - Return all videos, syndicated or not.
96 true - Only retrieve syndicated videos.
97 videoCaption: string, The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions.
Joe Gregoriod67010d2012-11-05 08:57:06 -050098 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -050099 any - Do not filter results based on caption availability.
100 closedCaption - Only include videos that have captions.
101 none - Only include videos that do not have captions.
102 publishedAfter: string, The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
103 regionCode: string, The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
104 type: string, The type parameter restricts a search query to only retrieve a particular type of resource.
105 topicId: string, The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.
106 publishedBefore: string, The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
107 videoDimension: string, The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500108 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -0500109 2d - Restrict search results to exclude 3D videos.
110 3d - Restrict search results to only include 3D videos.
111 any - Include both 3D and non-3D videos in returned results. This is the default value.
112 videoLicense: string, The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500113 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -0500114 any - Return all videos, regardless of which license they have, that match the query parameters.
115 creativeCommon - Only return videos that have a Creative Commons license. Users can reuse videos with this license in other videos that they create. Learn more.
116 youtube - Only return videos that have the standard YouTube license.
117 maxResults: integer, USE_DESCRIPTION --- channels:list:maxResults
118 relatedToVideoId: string, The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video.
119 videoDefinition: string, The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500120 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -0500121 any - Return all videos, regardless of their resolution.
122 high - Only retrieve HD videos.
123 standard - Only retrieve videos in standard definition.
124 pageToken: string, USE_DESCRIPTION --- channels:list:pageToken
125 videoDuration: string, The videoDuration parameter filters video search results based on their duration.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500126 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -0500127 any - Do not filter video search results based on their duration. This is the default value.
128 long - Only include videos longer than 20 minutes.
129 medium - Only include videos that are between four and 20 minutes long (inclusive).
130 short - Only include videos that are less than four minutes long.
131 q: string, The q parameter specifies the query term to search for.
132 videoEmbeddable: string, The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500133 Allowed values
Joe Gregorio52a5c532013-01-24 16:19:07 -0500134 any - Return all videos, embeddable or not.
135 true - Only retrieve embeddable videos.
136 videoCategoryId: string, The videoCategoryId parameter filters video search results based on their category.
137 order: string, The order parameter specifies the method that will be used to order resources in the API response.
138 Allowed values
139 date - Resources are sorted in reverse chronological order based on the date they were created.
140 rating - Resources are sorted from highest to lowest rating.
141 relevance - Resources are sorted based on their relevance to the search query. This is the default value for this parameter.
142 viewCount - Resources are sorted from highest to lowest number of views.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500143
144Returns:
145 An object of the form:
146
147 { # A paginated list of search results returned as the response to a youtube.search.list call.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500148 "nextPageToken": "A String", # The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
149 "kind": "youtube#searchListResponse", # The type of the API response. For this operation, the value will be youtube#searchListResponse.
150 "items": [ # A list of results that match the search criteria.
151 { # A search result contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data.
152 "snippet": { # Basic details about a search result, including title, description and thumbnails of the item referenced by the search result. # The snippet object contains basic details about a search result, such as its title or description. For example, if the search result is a video, then the title will be the video's title and the description will be the video's description.
153 "title": "A String", # The title to display for the search result.
154 "channelId": "A String", # The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies.
155 "description": "A String", # A description of the search result.
156 "publishedAt": "A String", # The creation date and time of the resource that the search result identifies. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
157 "thumbnails": { # A map of thumbnail images associated with the search result. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.
158 "a_key": { # The thumbnail image's name. This value is used as the key in the snippet.thumbnails map.
159 "url": "A String", # The thumbnail image's URL.
160 "width": 42,
161 "height": 42,
Joe Gregoriod67010d2012-11-05 08:57:06 -0500162 },
163 },
164 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500165 "kind": "youtube#searchResult", # The type of the API response. For this resource, the value will be youtube#searchResult.
166 "etag": "A String", # The ETag of the search result.
167 "id": { # A resource id is a generic reference that points to another YouTube resource. # The id object contains information that can be used to uniquely identify the resource that matches the search request.
168 "kind": "A String", # The kind, or type, of the referred resource.
169 "channelId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel.
170 "playlistId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist.
171 "videoId": "A String", # The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500172 },
173 },
174 ],
Joe Gregorio52a5c532013-01-24 16:19:07 -0500175 "etag": "A String", # The ETag for the response.
176 "prevPageToken": "A String", # The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.
177 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # The pageInfo object encapsulates paging information for the search result set.
178 "totalResults": 42, # The total number of results in the result set.
179 "resultsPerPage": 42, # The number of results included in the API response.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500180 },
181 }</pre>
182</div>
183
184<div class="method">
185 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
186 <pre>Retrieves the next page of results.
187
188Args:
189 previous_request: The request for the previous page. (required)
190 previous_response: The response from the request for the previous page. (required)
191
192Returns:
193 A request object that you can call 'execute()' on to request the next
194 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500195 </pre>
Joe Gregoriod67010d2012-11-05 08:57:06 -0500196</div>
197
198</body></html>