REST Resource: search

Resource: SearchResult

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.

JSON representation
{
  "kind": string,
  "etag": string,
  "id": {
    "kind": string,
    "videoId": string,
    "channelId": string,
    "playlistId": string
  },
  "snippet": {
    "publishedAt": string,
    "channelId": string,
    "title": string,
    "description": string,
    "thumbnails": {
      object (ThumbnailDetails)
    },
    "channelTitle": string,
    "liveBroadcastContent": enum
  }
}
Fields
kind

string

Identifies what kind of resource this is. Value: the fixed string "youtube#searchResult".

etag

string

Etag of this resource.

id

object

The id object contains information that can be used to uniquely identify the resource that matches the search request.

id.kind

string

The type of the API resource.

id.videoId

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.

id.channelId

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.

id.playlistId

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.

snippet

object

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.

snippet.publishedAt

string

The creation date and time of the resource that the search result identifies. The value is specified in ISO 8601 format.

snippet.channelId

string

The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies.

snippet.title

string

The title of the search result.

snippet.description

string

A description of the search result.

snippet.thumbnails

object (ThumbnailDetails)

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.

snippet.channelTitle

string

The title of the channel that published the resource that the search result identifies.

snippet.liveBroadcastContent

enum

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.

Valid values of this enum field are:

  • none
  • upcoming
  • live
  • completed

Methods

list

Retrieves a list of search resources