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 | |
| 75 | <h1><a href="youtube_v3.html">YouTube Data API</a> . <a href="youtube_v3.search.html">search</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame^] | 78 | <code><a href="#list">list(part=None, eventType=None, channelId=None, videoSyndicated=None, channelType=None, videoCaption=None, publishedAfter=None, onBehalfOfContentOwner=None, forContentOwner=None, regionCode=None, location=None, locationRadius=None, type=None, topicId=None, publishedBefore=None, videoDimension=None, videoLicense=None, maxResults=None, videoType=None, videoDefinition=None, pageToken=None, relatedToVideoId=None, videoDuration=None, forMine=None, q=None, safeSearch=None, videoEmbeddable=None, videoCategoryId=None, order=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 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> |
| 80 | <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"> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame^] | 85 | <code class="details" id="list">list(part=None, eventType=None, channelId=None, videoSyndicated=None, channelType=None, videoCaption=None, publishedAfter=None, onBehalfOfContentOwner=None, forContentOwner=None, regionCode=None, location=None, locationRadius=None, type=None, topicId=None, publishedBefore=None, videoDimension=None, videoLicense=None, maxResults=None, videoType=None, videoDefinition=None, pageToken=None, relatedToVideoId=None, videoDuration=None, forMine=None, q=None, safeSearch=None, videoEmbeddable=None, videoCategoryId=None, order=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 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. |
| 87 | |
| 88 | Args: |
| 89 | 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 | |
| 91 | If 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 | eventType: string, The eventType parameter restricts a search to broadcast events. |
| 93 | Allowed values |
| 94 | completed - Only include completed broadcasts. |
| 95 | live - Only include active broadcasts. |
| 96 | upcoming - Only include upcoming broadcasts. |
| 97 | channelId: string, The channelId parameter indicates that the API response should only contain resources created by the channel |
| 98 | videoSyndicated: string, The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com. |
| 99 | Allowed values |
| 100 | any - Return all videos, syndicated or not. |
| 101 | true - Only retrieve syndicated videos. |
| 102 | channelType: string, The channelType parameter lets you restrict a search to a particular type of channel. |
| 103 | Allowed values |
| 104 | any - Return all channels. |
| 105 | show - Only retrieve shows. |
| 106 | videoCaption: string, The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. |
| 107 | Allowed values |
| 108 | any - Do not filter results based on caption availability. |
| 109 | closedCaption - Only include videos that have captions. |
| 110 | none - Only include videos that do not have captions. |
| 111 | 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). |
| 112 | onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners. |
| 113 | |
| 114 | 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. |
| 115 | forContentOwner: boolean, Note: This parameter is intended exclusively for YouTube content partners. |
| 116 | |
| 117 | The forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated using a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided. |
| 118 | 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame^] | 119 | location: string, The location parameter restricts a search to videos that have a geographical location specified in their metadata. The value is a string that specifies geographic latitude/longitude coordinates e.g. (37.42307,-122.08427) |
| 120 | locationRadius: string, The locationRadius, in conjunction with the location parameter, defines a geographic area. If the geographic coordinates associated with a video fall within that area, then the video may be included in search results. This parameter value must be a floating point number followed by a measurement unit. Valid measurement units are m, km, ft, and mi. For example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi. The API does not support locationRadius parameter values larger than 1000 kilometers. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 121 | type: string, The type parameter restricts a search query to only retrieve a particular type of resource. The value is a comma-separated list of resource types. |
| 122 | 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. |
| 123 | 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). |
| 124 | videoDimension: string, The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos. |
| 125 | Allowed values |
| 126 | 2d - Restrict search results to exclude 3D videos. |
| 127 | 3d - Restrict search results to only include 3D videos. |
| 128 | any - Include both 3D and non-3D videos in returned results. This is the default value. |
| 129 | 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. |
| 130 | Allowed values |
| 131 | any - Return all videos, regardless of which license they have, that match the query parameters. |
| 132 | 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. |
| 133 | youtube - Only return videos that have the standard YouTube license. |
| 134 | maxResults: integer, The maxResults parameter specifies the maximum number of items that should be returned in the result set. |
| 135 | videoType: string, The videoType parameter lets you restrict a search to a particular type of videos. |
| 136 | Allowed values |
| 137 | any - Return all videos. |
| 138 | episode - Only retrieve episodes of shows. |
| 139 | movie - Only retrieve movies. |
| 140 | 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. |
| 141 | Allowed values |
| 142 | any - Return all videos, regardless of their resolution. |
| 143 | high - Only retrieve HD videos. |
| 144 | standard - Only retrieve videos in standard definition. |
| 145 | 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. |
| 146 | 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. |
| 147 | videoDuration: string, The videoDuration parameter filters video search results based on their duration. |
| 148 | Allowed values |
| 149 | any - Do not filter video search results based on their duration. This is the default value. |
| 150 | long - Only include videos longer than 20 minutes. |
| 151 | medium - Only include videos that are between four and 20 minutes long (inclusive). |
| 152 | short - Only include videos that are less than four minutes long. |
| 153 | forMine: boolean, The forMine parameter restricts the search to only retrieve videos owned by the authenticated user. If you set this parameter to true, then the type parameter's value must also be set to video. |
| 154 | q: string, The q parameter specifies the query term to search for. |
| 155 | safeSearch: string, The safeSearch parameter indicates whether the search results should include restricted content as well as standard content. |
| 156 | Allowed values |
| 157 | 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. |
| 158 | none - YouTube will not filter the search result set. |
| 159 | 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. |
| 160 | videoEmbeddable: string, The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage. |
| 161 | Allowed values |
| 162 | any - Return all videos, embeddable or not. |
| 163 | true - Only retrieve embeddable videos. |
| 164 | videoCategoryId: string, The videoCategoryId parameter filters video search results based on their category. |
| 165 | order: string, The order parameter specifies the method that will be used to order resources in the API response. |
| 166 | Allowed values |
| 167 | date - Resources are sorted in reverse chronological order based on the date they were created. |
| 168 | rating - Resources are sorted from highest to lowest rating. |
| 169 | relevance - Resources are sorted based on their relevance to the search query. This is the default value for this parameter. |
| 170 | title - Resources are sorted alphabetically by title. |
| 171 | videoCount - Channels are sorted in descending order of their number of uploaded videos. |
| 172 | viewCount - Resources are sorted from highest to lowest number of views. |
| 173 | |
| 174 | Returns: |
| 175 | An object of the form: |
| 176 | |
| 177 | { |
| 178 | "eventId": "A String", # Serialized EventId of the request which produced this response. |
| 179 | "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. |
| 180 | "kind": "youtube#searchListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#searchListResponse". |
| 181 | "visitorId": "A String", # The visitorId identifies the visitor. |
| 182 | "items": [ # A list of results that match the search criteria. |
| 183 | { # 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. |
| 184 | "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. |
| 185 | "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. |
| 186 | "default": { # A thumbnail is an image representing a YouTube resource. # The default image for this resource. |
| 187 | "url": "A String", # The thumbnail image's URL. |
| 188 | "width": 42, # (Optional) Width of the thumbnail image. |
| 189 | "height": 42, # (Optional) Height of the thumbnail image. |
| 190 | }, |
| 191 | "high": { # A thumbnail is an image representing a YouTube resource. # The high quality image for this resource. |
| 192 | "url": "A String", # The thumbnail image's URL. |
| 193 | "width": 42, # (Optional) Width of the thumbnail image. |
| 194 | "height": 42, # (Optional) Height of the thumbnail image. |
| 195 | }, |
| 196 | "medium": { # A thumbnail is an image representing a YouTube resource. # The medium quality image for this resource. |
| 197 | "url": "A String", # The thumbnail image's URL. |
| 198 | "width": 42, # (Optional) Width of the thumbnail image. |
| 199 | "height": 42, # (Optional) Height of the thumbnail image. |
| 200 | }, |
| 201 | "maxres": { # A thumbnail is an image representing a YouTube resource. # The maximum resolution quality image for this resource. |
| 202 | "url": "A String", # The thumbnail image's URL. |
| 203 | "width": 42, # (Optional) Width of the thumbnail image. |
| 204 | "height": 42, # (Optional) Height of the thumbnail image. |
| 205 | }, |
| 206 | "standard": { # A thumbnail is an image representing a YouTube resource. # The standard quality image for this resource. |
| 207 | "url": "A String", # The thumbnail image's URL. |
| 208 | "width": 42, # (Optional) Width of the thumbnail image. |
| 209 | "height": 42, # (Optional) Height of the thumbnail image. |
| 210 | }, |
| 211 | }, |
| 212 | "title": "A String", # The title of the search result. |
| 213 | "channelId": "A String", # The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies. |
| 214 | "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. |
| 215 | "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. |
| 216 | "channelTitle": "A String", # The title of the channel that published the resource that the search result identifies. |
| 217 | "description": "A String", # A description of the search result. |
| 218 | }, |
| 219 | "kind": "youtube#searchResult", # Identifies what kind of resource this is. Value: the fixed string "youtube#searchResult". |
| 220 | "etag": "A String", # Etag of this resource. |
| 221 | "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. |
| 222 | "kind": "A String", # The type of the API resource. |
| 223 | "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. |
| 224 | "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. |
| 225 | "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. |
| 226 | }, |
| 227 | }, |
| 228 | ], |
| 229 | "tokenPagination": { # Stub token pagination template to suppress results. |
| 230 | }, |
| 231 | "etag": "A String", # Etag of this resource. |
| 232 | "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. |
| 233 | "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. |
| 234 | "totalResults": 42, # The total number of results in the result set. |
| 235 | "resultsPerPage": 42, # The number of results included in the API response. |
| 236 | }, |
| 237 | }</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 | |
| 244 | Args: |
| 245 | previous_request: The request for the previous page. (required) |
| 246 | previous_response: The response from the request for the previous page. (required) |
| 247 | |
| 248 | Returns: |
| 249 | A request object that you can call 'execute()' on to request the next |
| 250 | page. Returns None if there are no more items in the collection. |
| 251 | </pre> |
| 252 | </div> |
| 253 | |
| 254 | </body></html> |