blob: 23c7e31c03a4fdb1fa94ee0695b585fe16a94ceb [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">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070078 <code><a href="#list">list(part, forDeveloper=None, locationRadius=None, videoDefinition=None, order=None, forContentOwner=None, videoType=None, topicId=None, videoEmbeddable=None, videoDuration=None, forMine=None, maxResults=None, relevanceLanguage=None, publishedAfter=None, pageToken=None, q=None, regionCode=None, onBehalfOfContentOwner=None, location=None, videoDimension=None, type=None, videoSyndicated=None, channelId=None, eventType=None, publishedBefore=None, videoCategoryId=None, channelType=None, relatedToVideoId=None, videoLicense=None, safeSearch=None, videoCaption=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Retrieves a list of search resources</p>
John Asmuth614db982014-04-24 15:46:26 -040080<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">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070085 <code class="details" id="list">list(part, forDeveloper=None, locationRadius=None, videoDefinition=None, order=None, forContentOwner=None, videoType=None, topicId=None, videoEmbeddable=None, videoDuration=None, forMine=None, maxResults=None, relevanceLanguage=None, publishedAfter=None, pageToken=None, q=None, regionCode=None, onBehalfOfContentOwner=None, location=None, videoDimension=None, type=None, videoSyndicated=None, channelId=None, eventType=None, publishedBefore=None, videoCategoryId=None, channelType=None, relatedToVideoId=None, videoLicense=None, safeSearch=None, videoCaption=None, x__xgafv=None)</code>
86 <pre>Retrieves a list of search resources
John Asmuth614db982014-04-24 15:46:26 -040087
88Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -070089 part: string, The &lt;code&gt;&lt;strong&gt;part&lt;/strong&gt;&lt;/code&gt; parameter specifies a
90comma-separated list of one or more &lt;code&gt;search&lt;/code&gt; resource properties
91that the API response will include. Set the parameter value to
92&lt;code&gt;snippet&lt;/code&gt;. (required) (repeated)
93 forDeveloper: boolean, Restrict the search to only retrieve videos uploaded using the project id
94of the authenticated user.
95 locationRadius: string, Filter on distance from the location (specified above).
96 videoDefinition: string, Filter on the definition of the videos.
97 order: string, Sort order of the results.
98 forContentOwner: boolean, Search owned by a content owner.
99 videoType: string, Filter on videos of a specific type.
100 topicId: string, Restrict results to a particular topic.
101 videoEmbeddable: string, Filter on embeddable videos.
102 videoDuration: string, Filter on the duration of the videos.
103 forMine: boolean, Search for the private videos of the authenticated user.
104 maxResults: integer, The &lt;code&gt;&lt;strong&gt;maxResults&lt;/strong&gt;&lt;/code&gt; parameter specifies the
105maximum number of items that should be returned in the result set.
106 relevanceLanguage: string, Return results relevant to this language.
107 publishedAfter: string, Filter on resources published after this date.
108 pageToken: string, The &lt;code&gt;&lt;strong&gt;pageToken&lt;/strong&gt;&lt;/code&gt; parameter identifies a specific
109page in the result set that should be returned. In an API response, the
110&lt;code&gt;nextPageToken&lt;/code&gt; and &lt;code&gt;prevPageToken&lt;/code&gt; properties
111identify other pages that could be retrieved.
112 q: string, Textual search terms to match.
113 regionCode: string, Display the content as seen by viewers in this country.
114 onBehalfOfContentOwner: string, &lt;strong&gt;Note:&lt;/strong&gt; This parameter is intended exclusively for YouTube
115content partners.&lt;br&gt;&lt;br&gt;The
116&lt;code&gt;&lt;strong&gt;onBehalfOfContentOwner&lt;/strong&gt;&lt;/code&gt; parameter indicates
117that the
118request&#x27;s authorization credentials identify a YouTube CMS user who is
119acting on behalf of the content owner specified in the parameter value.
120This parameter is intended for YouTube content partners that own and manage
121many different YouTube channels. It allows content owners to authenticate
122once and get access to all their video and channel data, without having to
123provide authentication credentials for each individual channel. The CMS
124account that the user authenticates with must be linked to the specified
125YouTube content owner.
126 location: string, Filter on location of the video
127 videoDimension: string, Filter on 3d videos.
128 type: string, Restrict results to a particular set of resource types from One Platform. (repeated)
129 videoSyndicated: string, Filter on syndicated videos.
130 channelId: string, Filter on resources belonging to this channelId.
131 eventType: string, Filter on the livestream status of the videos.
132 publishedBefore: string, Filter on resources published before this date.
133 videoCategoryId: string, Filter on videos in a specific category.
134 channelType: string, Add a filter on the channel search.
135 relatedToVideoId: string, Search related to a resource.
136 videoLicense: string, Filter on the license of the videos.
137 safeSearch: string, Indicates whether the search results should include restricted content as
138well as standard content.
139 videoCaption: string, Filter on the presence of captions on the videos.
140 x__xgafv: string, V1 error format.
John Asmuth614db982014-04-24 15:46:26 -0400141 Allowed values
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700142 1 - v1 error format
143 2 - v2 error format
John Asmuth614db982014-04-24 15:46:26 -0400144
145Returns:
146 An object of the form:
147
148 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700149 &quot;nextPageToken&quot;: &quot;A String&quot;, # The token that can be used as the value of the &lt;code&gt;pageToken&lt;/code&gt;
150 # parameter to retrieve the next page in the result set.
151 &quot;visitorId&quot;: &quot;A String&quot;, # The &lt;code&gt;visitorId&lt;/code&gt; identifies the visitor.
152 &quot;pageInfo&quot;: { # Paging details for lists of resources, including total number of items # General pagination information.
153 # available and number of resources returned in a single page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;resultsPerPage&quot;: 42, # The number of results included in the API response.
155 &quot;totalResults&quot;: 42, # The total number of results in the result set.
John Asmuth614db982014-04-24 15:46:26 -0400156 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700157 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
158 &quot;eventId&quot;: &quot;A String&quot;, # Serialized EventId of the request which produced this response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;tokenPagination&quot;: { # Stub token pagination template to suppress results.
John Asmuth614db982014-04-24 15:46:26 -0400160 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700161 &quot;prevPageToken&quot;: &quot;A String&quot;, # The token that can be used as the value of the &lt;code&gt;pageToken&lt;/code&gt;
162 # parameter to retrieve the previous page in the result set.
163 &quot;regionCode&quot;: &quot;A String&quot;,
164 &quot;kind&quot;: &quot;youtube#searchListResponse&quot;, # Identifies what kind of resource this is. Value: the fixed string
165 # &lt;code&gt;&quot;youtube#searchListResponse&quot;&lt;/code&gt;.
166 &quot;items&quot;: [ # Pagination information for token pagination.
167 { # A search result contains information about a YouTube video, channel, or
168 # playlist that matches the search parameters specified in an API request.
169 # While a search result points to a uniquely identifiable resource, like a
170 # video, it does not have its own persistent data.
171 &quot;kind&quot;: &quot;youtube#searchResult&quot;, # Identifies what kind of resource this is. Value: the fixed string
172 # &lt;code&gt;&quot;youtube#searchResult&quot;&lt;/code&gt;.
173 &quot;snippet&quot;: { # Basic details about a search result, including title, description and # The &lt;code&gt;snippet&lt;/code&gt; object contains basic details about a search
174 # result, such as its title or description. For example, if the search result
175 # is a video, then the title will be the
176 # video&#x27;s title and the description will be the video&#x27;s description.
177 # thumbnails of the item referenced by the search result.
178 &quot;description&quot;: &quot;A String&quot;, # A description of the search result.
179 &quot;channelTitle&quot;: &quot;A String&quot;, # The title of the channel that published the resource that the search result
180 # identifies.
181 &quot;publishedAt&quot;: &quot;A String&quot;, # The creation date and time of the resource that the search result
182 # identifies. The value is specified in &lt;a
183 # href=&quot;//www.w3.org/TR/NOTE-datetime&quot;&gt;ISO 8601&lt;/a&gt;
184 # format.
185 &quot;thumbnails&quot;: { # Internal representation of thumbnails for a YouTube resource. # A map of thumbnail images associated with the search result. For each
186 # object in the map, the key is the name of the thumbnail image, and the
187 # value is an object that contains other information about the thumbnail.
188 &quot;medium&quot;: { # A thumbnail is an image representing a YouTube resource. # The medium quality image for this resource.
189 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
190 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
191 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
192 },
193 &quot;standard&quot;: { # A thumbnail is an image representing a YouTube resource. # The standard quality image for this resource.
194 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
195 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
196 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
197 },
198 &quot;default&quot;: { # A thumbnail is an image representing a YouTube resource. # The default image for this resource.
199 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
200 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
201 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
202 },
203 &quot;maxres&quot;: { # A thumbnail is an image representing a YouTube resource. # The maximum resolution quality image for this resource.
204 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
205 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
206 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
207 },
208 &quot;high&quot;: { # A thumbnail is an image representing a YouTube resource. # The high quality image for this resource.
209 &quot;width&quot;: 42, # (Optional) Width of the thumbnail image.
210 &quot;url&quot;: &quot;A String&quot;, # The thumbnail image&#x27;s URL.
211 &quot;height&quot;: 42, # (Optional) Height of the thumbnail image.
212 },
213 },
214 &quot;title&quot;: &quot;A String&quot;, # The title of the search result.
215 &quot;liveBroadcastContent&quot;: &quot;A String&quot;, # It indicates if the resource (video or channel) has upcoming/active live
216 # broadcast content. Or it&#x27;s &quot;none&quot; if there is not any upcoming/active
217 # live broadcasts.
218 &quot;channelId&quot;: &quot;A String&quot;, # The value that YouTube uses to uniquely identify the channel that
219 # published the resource that the search result identifies.
220 },
221 &quot;id&quot;: { # A resource id is a generic reference that points to another YouTube resource. # The &lt;code&gt;id&lt;/code&gt; object contains information that can be used to
222 # uniquely identify the resource that matches the search request.
223 &quot;kind&quot;: &quot;A String&quot;, # The type of the API resource.
224 &quot;videoId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the referred resource, if
225 # that resource is a video. This property is only present if the
226 # &lt;code&gt;resourceId.kind&lt;/code&gt; value is &lt;code&gt;youtube#video&lt;/code&gt;.
227 &quot;channelId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the referred resource, if
228 # that resource is a channel. This property is only present if the
229 # &lt;code&gt;resourceId.kind&lt;/code&gt; value is &lt;code&gt;youtube#channel&lt;/code&gt;.
230 &quot;playlistId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the referred resource, if
231 # that resource is a playlist. This property is only present if the
232 # &lt;code&gt;resourceId.kind&lt;/code&gt; value is &lt;code&gt;youtube#playlist&lt;/code&gt;.
233 },
234 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
235 },
236 ],
John Asmuth614db982014-04-24 15:46:26 -0400237 }</pre>
238</div>
239
240<div class="method">
241 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
242 <pre>Retrieves the next page of results.
243
244Args:
245 previous_request: The request for the previous page. (required)
246 previous_response: The response from the request for the previous page. (required)
247
248Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400250 page. Returns None if there are no more items in the collection.
251 </pre>
252</div>
253
254</body></html>