blob: b180f403194a30f511ad54f7871cddb59df04f65 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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
Bu Sun Kimd059ad82020-07-22 17:02:09 -070075<h1><a href="youtube_v3.html">YouTube Data API v3</a> . <a href="youtube_v3.search.html">search</a></h1>
John Asmuth614db982014-04-24 15:46:26 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080081 <code><a href="#list">list(part, pageToken=None, order=None, videoType=None, relevanceLanguage=None, forMine=None, channelId=None, videoDuration=None, videoEmbeddable=None, videoCategoryId=None, onBehalfOfContentOwner=None, channelType=None, publishedAfter=None, videoDimension=None, q=None, videoSyndicated=None, locationRadius=None, publishedBefore=None, topicId=None, videoDefinition=None, maxResults=None, videoCaption=None, safeSearch=None, forDeveloper=None, eventType=None, location=None, type=None, forContentOwner=None, relatedToVideoId=None, regionCode=None, videoLicense=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Retrieves a list of search resources</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088 <code class="details" id="close">close()</code>
89 <pre>Close httplib2 connections.</pre>
90</div>
91
92<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080093 <code class="details" id="list">list(part, pageToken=None, order=None, videoType=None, relevanceLanguage=None, forMine=None, channelId=None, videoDuration=None, videoEmbeddable=None, videoCategoryId=None, onBehalfOfContentOwner=None, channelType=None, publishedAfter=None, videoDimension=None, q=None, videoSyndicated=None, locationRadius=None, publishedBefore=None, topicId=None, videoDefinition=None, maxResults=None, videoCaption=None, safeSearch=None, forDeveloper=None, eventType=None, location=None, type=None, forContentOwner=None, relatedToVideoId=None, regionCode=None, videoLicense=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070094 <pre>Retrieves a list of search resources
John Asmuth614db982014-04-24 15:46:26 -040095
96Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 part: string, The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet. (required) (repeated)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080098 pageToken: string, The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 order: string, Sort order of the results.
100 Allowed values
101 searchSortUnspecified -
102 date - Resources are sorted in reverse chronological order based on the date they were created.
103 rating - Resources are sorted from highest to lowest rating.
104 viewCount - Resources are sorted from highest to lowest number of views.
105 relevance - Resources are sorted based on their relevance to the search query. This is the default value for this parameter.
106 title - Resources are sorted alphabetically by title.
107 videoCount - Channels are sorted in descending order of their number of uploaded videos.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800108 videoType: string, Filter on videos of a specific type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109 Allowed values
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800110 videoTypeUnspecified -
111 any - Return all videos.
112 movie - Only retrieve movies.
113 episode - Only retrieve episodes of shows.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 relevanceLanguage: string, Return results relevant to this language.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800115 forMine: boolean, Search for the private videos of the authenticated user.
116 channelId: string, Filter on resources belonging to this channelId.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700117 videoDuration: string, Filter on the duration of the videos.
118 Allowed values
119 videoDurationUnspecified -
120 any - Do not filter video search results based on their duration. This is the default value.
121 short - Only include videos that are less than four minutes long.
122 medium - Only include videos that are between four and 20 minutes long (inclusive).
123 long - Only include videos longer than 20 minutes.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800124 videoEmbeddable: string, Filter on embeddable videos.
125 Allowed values
126 videoEmbeddableUnspecified -
127 any - Return all videos, embeddable or not.
128 true - Only retrieve embeddable videos.
129 videoCategoryId: string, Filter on videos in a specific category.
130 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request&#x27;s authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
131 channelType: string, Add a filter on the channel search.
132 Allowed values
133 channelTypeUnspecified -
134 any - Return all channels.
135 show - Only retrieve shows.
136 publishedAfter: string, Filter on resources published after this date.
137 videoDimension: string, Filter on 3d videos.
138 Allowed values
139 any -
140 2d - Restrict search results to exclude 3D videos.
141 3d - Restrict search results to only include 3D videos.
142 q: string, Textual search terms to match.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700143 videoSyndicated: string, Filter on syndicated videos.
144 Allowed values
145 videoSyndicatedUnspecified -
146 any - Return all videos, syndicated or not.
147 true - Only retrieve syndicated videos.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800148 locationRadius: string, Filter on distance from the location (specified above).
149 publishedBefore: string, Filter on resources published before this date.
150 topicId: string, Restrict results to a particular topic.
151 videoDefinition: string, Filter on the definition of the videos.
152 Allowed values
153 any - Return all videos, regardless of their resolution.
154 standard - Only retrieve videos in standard definition.
155 high - Only retrieve HD videos.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700156 maxResults: integer, The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800157 videoCaption: string, Filter on the presence of captions on the videos.
158 Allowed values
159 videoCaptionUnspecified -
160 any - Do not filter results based on caption availability.
161 closedCaption - Only include videos that have captions.
162 none - Only include videos that do not have captions.
163 safeSearch: string, Indicates whether the search results should include restricted content as well as standard content.
164 Allowed values
165 safeSearchSettingUnspecified -
166 none - YouTube will not filter the search result set.
167 moderate - YouTube will filter some content from search results and, at the least, will filter content that is restricted in your locale. Based on their content, search results could be removed from search results or demoted in search results. This is the default parameter value.
168 strict - YouTube will try to exclude all restricted content from the search result set. Based on their content, search results could be removed from search results or demoted in search results.
169 forDeveloper: boolean, Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.
170 eventType: string, Filter on the livestream status of the videos.
171 Allowed values
172 none -
173 upcoming - The live broadcast is upcoming.
174 live - The live broadcast is active.
175 completed - The live broadcast has been completed.
176 location: string, Filter on location of the video
177 type: string, Restrict results to a particular set of resource types from One Platform. (repeated)
178 forContentOwner: boolean, Search owned by a content owner.
179 relatedToVideoId: string, Search related to a resource.
180 regionCode: string, Display the content as seen by viewers in this country.
181 videoLicense: string, Filter on the license of the videos.
182 Allowed values
183 any - Return all videos, regardless of which license they have, that match the query parameters.
184 youtube - Only return videos that have the standard YouTube license.
185 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700186 x__xgafv: string, V1 error format.
John Asmuth614db982014-04-24 15:46:26 -0400187 Allowed values
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700188 1 - v1 error format
189 2 - v2 error format
John Asmuth614db982014-04-24 15:46:26 -0400190
191Returns:
192 An object of the form:
193
194 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700195 &quot;eventId&quot;: &quot;A String&quot;, # Serialized EventId of the request which produced this response.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800196 &quot;nextPageToken&quot;: &quot;A String&quot;, # The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
197 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
198 &quot;visitorId&quot;: &quot;A String&quot;, # The visitorId identifies the visitor.
199 &quot;prevPageToken&quot;: &quot;A String&quot;, # The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.
200 &quot;kind&quot;: &quot;youtube#searchListResponse&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#searchListResponse&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700201 &quot;items&quot;: [ # Pagination information for token pagination.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700202 { # 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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800203 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700204 &quot;snippet&quot;: { # 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&#x27;s title and the description will be the video&#x27;s description.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800205 &quot;liveBroadcastContent&quot;: &quot;A String&quot;, # It indicates if the resource (video or channel) has upcoming/active live broadcast content. Or it&#x27;s &quot;none&quot; if there is not any upcoming/active live broadcasts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700206 &quot;publishedAt&quot;: &quot;A String&quot;, # The creation date and time of the resource that the search result identifies. The value is specified in ISO 8601 format.
207 &quot;thumbnails&quot;: { # Internal representation of thumbnails for a YouTube resource. # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700208 &quot;maxres&quot;: { # A thumbnail is an image representing a YouTube resource. # The maximum resolution quality image for this resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700209 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700211 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700212 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700213 &quot;standard&quot;: { # A thumbnail is an image representing a YouTube resource. # The standard quality image for this resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700214 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700215 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
216 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
217 },
218 &quot;default&quot;: { # A thumbnail is an image representing a YouTube resource. # The default image for this resource.
219 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
220 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
221 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
222 },
223 &quot;medium&quot;: { # A thumbnail is an image representing a YouTube resource. # The medium quality image for this resource.
224 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
225 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
226 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700227 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800228 &quot;high&quot;: { # A thumbnail is an image representing a YouTube resource. # The high quality image for this resource.
229 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
230 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
231 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
232 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700233 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800234 &quot;channelTitle&quot;: &quot;A String&quot;, # The title of the channel that published the resource that the search result identifies.
235 &quot;description&quot;: &quot;A String&quot;, # A description of the search result.
236 &quot;channelId&quot;: &quot;A String&quot;, # The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies.
237 &quot;title&quot;: &quot;A String&quot;, # The title of the search result.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700238 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700239 &quot;kind&quot;: &quot;youtube#searchResult&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#searchResult&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700240 &quot;id&quot;: { # 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.
241 &quot;videoId&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700242 &quot;kind&quot;: &quot;A String&quot;, # The type of the API resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700243 &quot;channelId&quot;: &quot;A String&quot;, # 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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800244 &quot;playlistId&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700245 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700246 },
247 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 &quot;tokenPagination&quot;: { # Stub token pagination template to suppress results.
249 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800250 &quot;regionCode&quot;: &quot;A String&quot;,
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700251 &quot;pageInfo&quot;: { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # General pagination information.
252 &quot;totalResults&quot;: 42, # The total number of results in the result set.
253 &quot;resultsPerPage&quot;: 42, # The number of results included in the API response.
254 },
John Asmuth614db982014-04-24 15:46:26 -0400255 }</pre>
256</div>
257
258<div class="method">
259 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
260 <pre>Retrieves the next page of results.
261
262Args:
263 previous_request: The request for the previous page. (required)
264 previous_response: The response from the request for the previous page. (required)
265
266Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400268 page. Returns None if there are no more items in the collection.
269 </pre>
270</div>
271
272</body></html>