John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 75 | <h1><a href="youtube_v3.html">YouTube Data API v3</a> . <a href="youtube_v3.search.html">search</a></h1> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#list">list(part, videoEmbeddable=None, channelType=None, forDeveloper=None, order=None, eventType=None, type=None, forMine=None, videoSyndicated=None, forContentOwner=None, publishedAfter=None, topicId=None, videoDimension=None, regionCode=None, videoCategoryId=None, relatedToVideoId=None, onBehalfOfContentOwner=None, videoCaption=None, videoLicense=None, relevanceLanguage=None, videoType=None, pageToken=None, safeSearch=None, q=None, maxResults=None, videoDefinition=None, channelId=None, locationRadius=None, location=None, publishedBefore=None, videoDuration=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 82 | <p class="firstline">Retrieves a list of search resources</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 83 | <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 Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 88 | <code class="details" id="close">close()</code> |
| 89 | <pre>Close httplib2 connections.</pre> |
| 90 | </div> |
| 91 | |
| 92 | <div class="method"> |
| 93 | <code class="details" id="list">list(part, videoEmbeddable=None, channelType=None, forDeveloper=None, order=None, eventType=None, type=None, forMine=None, videoSyndicated=None, forContentOwner=None, publishedAfter=None, topicId=None, videoDimension=None, regionCode=None, videoCategoryId=None, relatedToVideoId=None, onBehalfOfContentOwner=None, videoCaption=None, videoLicense=None, relevanceLanguage=None, videoType=None, pageToken=None, safeSearch=None, q=None, maxResults=None, videoDefinition=None, channelId=None, locationRadius=None, location=None, publishedBefore=None, videoDuration=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 94 | <pre>Retrieves a list of search resources |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 95 | |
| 96 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 97 | 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) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 98 | videoEmbeddable: string, Filter on embeddable videos. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 99 | Allowed values |
| 100 | videoEmbeddableUnspecified - |
| 101 | any - Return all videos, embeddable or not. |
| 102 | true - Only retrieve embeddable videos. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 103 | channelType: string, Add a filter on the channel search. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 104 | Allowed values |
| 105 | channelTypeUnspecified - |
| 106 | any - Return all channels. |
| 107 | show - Only retrieve shows. |
| 108 | forDeveloper: boolean, Restrict the search to only retrieve videos uploaded using the project id of the authenticated user. |
| 109 | order: string, Sort order of the results. |
| 110 | Allowed values |
| 111 | searchSortUnspecified - |
| 112 | date - Resources are sorted in reverse chronological order based on the date they were created. |
| 113 | rating - Resources are sorted from highest to lowest rating. |
| 114 | viewCount - Resources are sorted from highest to lowest number of views. |
| 115 | relevance - Resources are sorted based on their relevance to the search query. This is the default value for this parameter. |
| 116 | title - Resources are sorted alphabetically by title. |
| 117 | videoCount - Channels are sorted in descending order of their number of uploaded videos. |
| 118 | eventType: string, Filter on the livestream status of the videos. |
| 119 | Allowed values |
| 120 | none - |
| 121 | upcoming - The live broadcast is upcoming. |
| 122 | live - The live broadcast is active. |
| 123 | completed - The live broadcast has been completed. |
| 124 | type: string, Restrict results to a particular set of resource types from One Platform. (repeated) |
| 125 | forMine: boolean, Search for the private videos of the authenticated user. |
| 126 | videoSyndicated: string, Filter on syndicated videos. |
| 127 | Allowed values |
| 128 | videoSyndicatedUnspecified - |
| 129 | any - Return all videos, syndicated or not. |
| 130 | true - Only retrieve syndicated videos. |
| 131 | forContentOwner: boolean, Search owned by a content owner. |
| 132 | publishedAfter: string, Filter on resources published after this date. |
| 133 | topicId: string, Restrict results to a particular topic. |
| 134 | videoDimension: string, Filter on 3d videos. |
| 135 | Allowed values |
| 136 | any - |
| 137 | 2d - Restrict search results to exclude 3D videos. |
| 138 | 3d - Restrict search results to only include 3D videos. |
| 139 | regionCode: string, Display the content as seen by viewers in this country. |
| 140 | videoCategoryId: string, Filter on videos in a specific category. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 141 | relatedToVideoId: string, Search related to a resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 142 | onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request'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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 143 | videoCaption: string, Filter on the presence of captions on the videos. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 144 | Allowed values |
| 145 | videoCaptionUnspecified - |
| 146 | any - Do not filter results based on caption availability. |
| 147 | closedCaption - Only include videos that have captions. |
| 148 | none - Only include videos that do not have captions. |
| 149 | videoLicense: string, Filter on the license of the videos. |
| 150 | Allowed values |
| 151 | any - Return all videos, regardless of which license they have, that match the query parameters. |
| 152 | youtube - Only return videos that have the standard YouTube license. |
| 153 | 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. |
| 154 | relevanceLanguage: string, Return results relevant to this language. |
| 155 | videoType: string, Filter on videos of a specific type. |
| 156 | Allowed values |
| 157 | videoTypeUnspecified - |
| 158 | any - Return all videos. |
| 159 | movie - Only retrieve movies. |
| 160 | episode - Only retrieve episodes of shows. |
| 161 | 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. |
| 162 | safeSearch: string, Indicates whether the search results should include restricted content as well as standard content. |
| 163 | Allowed values |
| 164 | safeSearchSettingUnspecified - |
| 165 | none - YouTube will not filter the search result set. |
| 166 | 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. |
| 167 | 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. |
| 168 | q: string, Textual search terms to match. |
| 169 | maxResults: integer, The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. |
| 170 | videoDefinition: string, Filter on the definition of the videos. |
| 171 | Allowed values |
| 172 | any - Return all videos, regardless of their resolution. |
| 173 | standard - Only retrieve videos in standard definition. |
| 174 | high - Only retrieve HD videos. |
| 175 | channelId: string, Filter on resources belonging to this channelId. |
| 176 | locationRadius: string, Filter on distance from the location (specified above). |
| 177 | location: string, Filter on location of the video |
| 178 | publishedBefore: string, Filter on resources published before this date. |
| 179 | videoDuration: string, Filter on the duration of the videos. |
| 180 | Allowed values |
| 181 | videoDurationUnspecified - |
| 182 | any - Do not filter video search results based on their duration. This is the default value. |
| 183 | short - Only include videos that are less than four minutes long. |
| 184 | medium - Only include videos that are between four and 20 minutes long (inclusive). |
| 185 | long - Only include videos longer than 20 minutes. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 186 | x__xgafv: string, V1 error format. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 187 | Allowed values |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 188 | 1 - v1 error format |
| 189 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 190 | |
| 191 | Returns: |
| 192 | An object of the form: |
| 193 | |
| 194 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 195 | "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # General pagination information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 196 | "resultsPerPage": 42, # The number of results included in the API response. |
| 197 | "totalResults": 42, # The total number of results in the result set. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 198 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 199 | "etag": "A String", # Etag of this resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 200 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 201 | "eventId": "A String", # Serialized EventId of the request which produced this response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 202 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 203 | "regionCode": "A String", |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 204 | "items": [ # Pagination information for token pagination. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 205 | { # 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. |
| 206 | "etag": "A String", # Etag of this resource. |
| 207 | "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. |
| 208 | "publishedAt": "A String", # The creation date and time of the resource that the search result identifies. The value is specified in ISO 8601 format. |
| 209 | "thumbnails": { # 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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 210 | "default": { # A thumbnail is an image representing a YouTube resource. # The default image for this resource. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 211 | "url": "A String", # The thumbnail image's URL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 212 | "width": 42, # (Optional) Width of the thumbnail image. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 213 | "height": 42, # (Optional) Height of the thumbnail image. |
| 214 | }, |
| 215 | "maxres": { # A thumbnail is an image representing a YouTube resource. # The maximum resolution quality image for this resource. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 216 | "url": "A String", # The thumbnail image's URL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 217 | "width": 42, # (Optional) Width of the thumbnail image. |
| 218 | "height": 42, # (Optional) Height of the thumbnail image. |
| 219 | }, |
| 220 | "medium": { # A thumbnail is an image representing a YouTube resource. # The medium quality image for this resource. |
| 221 | "url": "A String", # The thumbnail image's URL. |
| 222 | "width": 42, # (Optional) Width of the thumbnail image. |
| 223 | "height": 42, # (Optional) Height of the thumbnail image. |
| 224 | }, |
| 225 | "standard": { # A thumbnail is an image representing a YouTube resource. # The standard quality image for this resource. |
| 226 | "url": "A String", # The thumbnail image's URL. |
| 227 | "width": 42, # (Optional) Width of the thumbnail image. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 228 | "height": 42, # (Optional) Height of the thumbnail image. |
| 229 | }, |
| 230 | "high": { # A thumbnail is an image representing a YouTube resource. # The high quality image for this resource. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 231 | "url": "A String", # The thumbnail image's URL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 232 | "width": 42, # (Optional) Width of the thumbnail image. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 233 | "height": 42, # (Optional) Height of the thumbnail image. |
| 234 | }, |
| 235 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 236 | "channelId": "A String", # The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies. |
| 237 | "channelTitle": "A String", # The title of the channel that published the resource that the search result identifies. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 238 | "title": "A String", # The title of the search result. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 239 | "description": "A String", # A description of the search result. |
| 240 | "liveBroadcastContent": "A String", # It indicates if the resource (video or channel) has upcoming/active live broadcast content. Or it's "none" if there is not any upcoming/active live broadcasts. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 241 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 242 | "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. |
| 243 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 244 | "kind": "A String", # The type of the API resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 245 | "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. |
| 246 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 247 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 248 | "kind": "youtube#searchResult", # Identifies what kind of resource this is. Value: the fixed string "youtube#searchResult". |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 249 | }, |
| 250 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 251 | "tokenPagination": { # Stub token pagination template to suppress results. |
| 252 | }, |
| 253 | "visitorId": "A String", # The visitorId identifies the visitor. |
| 254 | "kind": "youtube#searchListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#searchListResponse". |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 255 | }</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 | |
| 262 | Args: |
| 263 | previous_request: The request for the previous page. (required) |
| 264 | previous_response: The response from the request for the previous page. (required) |
| 265 | |
| 266 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 267 | A request object that you can call 'execute()' on to request the next |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 268 | page. Returns None if there are no more items in the collection. |
| 269 | </pre> |
| 270 | </div> |
| 271 | |
| 272 | </body></html> |