Skip to content

Search YouTube videos

POST/v1/tools/youtube.search.videos/callsNeeds an API key

Returns the YouTube videos that match a search, with channel, date and views. Use it to see which videos rank for a query.

Tool youtube.search.videos on YouTube. Contract version 1, released 2026-10-27.

Over REST, send the input in the body. Over MCP, pass the same input to call_tool.

Both return the full response: the call's ID, status and cost, with this tool's result in output.

Input

querystringRequired

The search query.

sortstring· default relevance

Order of the results: relevance (YouTube's ranking), newest, most_viewed or top_rated.

relevance
newest
most_viewed
top_rated
time_rangestring

Only videos published in the last hour, day, week, month or year.

hour
day
week
month
year
durationstring

Only videos of this length: short (under 4 minutes), medium (4 to 20 minutes) or long (over 20 minutes).

short
medium
long
next_page_tokenstring

Fetches the next page. Take it from pagination.next_page_token of the previous page, and send the same query, sort, time_range and duration.

Output

A successful call returns these blocks in its output. A field not marked required can be null.

videos

A list of rows. Always present, possibly empty.

idstringRequired

YouTube's identifier of the video. The video is at https://www.youtube.com/watch?v= followed by it.

urlstring

Address of the video on youtube.com.

titlestring
snippetstring

An excerpt of the video's description, as the search shows it.

published_atstring

When the video was published, in ISO 8601.

duration_msinteger

Length of the video, in milliseconds.

preview_image_urlstring

Address of the video's thumbnail.

author_idstring

YouTube's identifier of the channel that published the video, which begins with UC.

author_usernamestring

The channel's handle, without the @.

author_namestring

The channel's name.

author_image_urlstring

Address of the channel's profile picture.

author_verifiedboolean

Whether YouTube marks the channel as verified.

view_countinteger

Number of times the video was watched.

pagination

One object. Can be null. How to fetch the next page. Null on the last page.

next_page_tokenstringRequired

Send as next_page_token to fetch the next page.