Method: search.list

Retrieves a list of search resources

HTTP request

GET https://youtube.googleapis.com/youtube/v3/search

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
q

string

Textual search terms to match.

type[]

string

Restrict results to a particular set of resource types.

order

enum

Sort order of the results.

Valid values of this enum field are:

  • date
  • rating
  • viewCount
  • relevance
  • title
  • videoCount
relevanceLanguage

string

Return results relevant to this language.

videoDimension

enum

Filter on 3d videos.

Valid values of this enum field are:

  • any
  • 2d
  • 3d
videoDefinition

enum

Filter on the definition of the videos.

Valid values of this enum field are:

  • any
  • standard
  • high
videoLicense

enum

Filter on the license of the videos.

Valid values of this enum field are:

  • any
  • youtube
  • creativeCommon
videoDuration

enum

Filter on the duration of the videos.

Valid values of this enum field are:

  • any
  • short
  • medium
  • long
videoCaption

enum

Filter on the presence of captions on the videos.

Valid values of this enum field are:

  • any
  • closedCaption
  • none
videoEmbeddable

enum

Filter on embeddable videos.

Valid values of this enum field are:

  • any
  • true
videoSyndicated

enum

Filter on syndicated videos.

Valid values of this enum field are:

  • any
  • true
videoCategoryId

string

Filter on videos in a specific category.

videoType

enum

Filter on videos of a specific type.

Valid values of this enum field are:

  • any
  • movie
  • episode
eventType

enum

Filter on the livestream status of the videos.

Valid values of this enum field are:

  • none
  • upcoming
  • live
  • completed
location

string

Filter on location of the video

locationRadius

string

Filter on distance from the location (specified above).

channelId

string

Filter on resources belonging to this channelId.

publishedAfter

string (Timestamp format)

Filter on resources published after this date.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

publishedBefore

string (Timestamp format)

Filter on resources published before this date.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

topicId

string

Restrict results to a particular topic.

videoPaidProductPlacement

enum

Valid values of this enum field are:

  • any
  • true
forContentOwner

boolean

Search owned by a content owner.

regionCode

string

Display the content as seen by viewers in this country.

channelType

enum

Add a filter on the channel search.

Valid values of this enum field are:

  • any
  • show
forMine

boolean

Search for the private videos of the authenticated user.

forDeveloper

boolean

Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.

maxResults

integer (uint32 format)

The maxResults parameter specifies the maximum number of items that should be returned in the result set.

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.

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.

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.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "etag": string,
  "nextPageToken": string,
  "prevPageToken": string,
  "regionCode": string,
  "pageInfo": {
    "totalResults": integer,
    "resultsPerPage": integer
  },
  "items": [
    {
      object (SearchResult)
    }
  ]
}
Fields
kind

string

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

etag

string

Etag of this resource.

nextPageToken

string

The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.

prevPageToken

string

The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.

regionCode

string

pageInfo

object

General pagination information.

pageInfo.totalResults

integer

The total number of results in the result set.

pageInfo.resultsPerPage

integer

The number of results included in the API response.

items[]

object (SearchResult)

A list of search results that match the search criteria.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.readonly
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.