Skip to documentation
Browse documentation

Search

Search videos, Shorts, channels, playlists and live broadcasts using the legacy filter or composable type, upload_date, duration and sort selectors.

Capability ID youtube.search.query
Maximum runtime 60 seconds
View raw

POST /execute Shared execution endpoint

Input parameters

duration string optional

Restrict video results by duration. Allowed values: `short`, `long`, `medium`.

Available values shortlongmedium
filter string optional

Legacy single selector. Do not combine with type, upload_date, duration or sort. Allowed values: `videos`, `channels`, `playlists`, `live`, `shorts`, `today`, `week`, `month`, `year`.

Example videos
Available values videoschannelsplaylistsliveshortstodayweekmonthyear
limit integer optional

Maximum number of results to return. From 1 to 500. Default: `100`.

Example 40
max_pages integer optional

Maximum number of result pages to fetch. From 1 to 100. Default: `5`.

Example 3
query string required

Search query

Example noise cancelling headphones review
sort string optional

Order results by the source's native sort. Allowed values: `relevance`, `rating`, `upload_date`, `view_count`.

Available values relevanceratingupload_dateview_count
type string optional

Restrict results to one content type. Allowed values: `video`, `channel`, `playlist`, `movie`.

Available values videochannelplaylistmovie
upload_date string optional

Restrict results to a recent upload window. Allowed values: `hour`, `today`, `week`, `month`, `year`.

Available values hourtodayweekmonthyear

Response

Successful output is returned in results[0].data.

Raw platform output is intentionally open-ended and may evolve with the upstream source.

Illustrative sample The example response is shown in the response panel.

Illustrative output fields

Values illustrate one response. Read the guidance above for missing values and limits; fields can vary with the requested operation and the data available.

PathObserved typeExample
has_more boolean true
pages integer 2
query string noise cancelling headphones review
results array 3 items
results array 3 items
results_count integer 40

Execution behavior

A 200 response completed inline. A 202 response was queued; poll GET /jobs/:id until the job reaches completed or failed.