1. Home
  2. Documentation
  3. search_videos

search_videos

Find YouTube videos with a text query. Each call returns one page containing only videos, usually around 20 results.

Search YouTube videos. REST: POST /v1/search

Parameters

Send a query and, optionally, a language and region for the results.

NameTypeRequiredDescription
querystringYesQuery with 1 to 200 characters after trimming leading and trailing whitespace.
languagestringNoResults language, used as hl. Example: en.
regionstringNoISO 3166-1 alpha-2 region, used as gl. Example: US.
cursorstringNoOpaque base64url cursor received in nextCursor. Omit on the first page.

Examples

The example searches for the user's own fictional workshop.

TEXT
Find the Small business spreadsheets from scratch workshop from my channel.

Your assistant calls search_videos with {"query": "Small business spreadsheets from scratch My channel", "language": "en", "region": "US"}.

Response

The REST API returns the result directly as JSON with HTTP 200, without a job.

200 OK
{
  "results": [
    {
      "videoId": "MinhaAula_0",
      "url": "https://www.youtube.com/watch?v=MinhaAula_0",
      "title": "Small business spreadsheets from scratch",
      "channel": "My channel",
      "channelId": "UCa9Rk2pLm7QwX4sTn1vB3cE",
      "durationSeconds": 2520,
      "uploadDate": "2026-10-21",
      "viewCount": 1240,
      "thumbnailUrl": "https://i.ytimg.com/vi/MinhaAula_0/hqdefault.jpg",
      "isLive": false
    }
  ],
  "nextCursor": null
}
FieldDescription
resultsList of videos. Channels, playlists and other result types are excluded. May be empty or contain fewer than 20 videos.
results[].videoId, results[].urlVideo ID and canonical URL.
results[].title, results[].channel, results[].channelIdTitle, channel name and channel ID.
results[].durationSecondsDuration in seconds, or null when unavailable.
results[].uploadDateISO date when possible, published text such as 2 days ago, or null when unavailable.
results[].viewCountNumber of views, or null when unavailable.
results[].thumbnailUrl, results[].isLiveThumbnail URL and whether the video is live.
nextCursorOpaque base64url cursor for the next page, or null when there are no more pages.

To continue, send nextCursor as cursor, keeping the same query, language and region. Do not interpret or change the cursor. Each next page is a new call.

Limits

Each successful page, even empty, uses 1 unit of metadataPerDay, shared with get_video_info and get_video_comments, including POST /v1/info and POST /v1/comments. It does not use the transcription quota. Failures and blocked requests are not charged.

LimitFreeStarterPro
Metadata per day506005,000
Calls per minute, shared101010

The limit of 10 calls per minute is shared by search_videos, get_video_info, get_video_comments and get_usage, including the corresponding REST routes. OAuth and all account keys share the limits. The daily counter resets at 00:00 UTC.

Errors

Use the code to choose the next step.

SituationCodeHTTPWhat to do
Invalid query or parameterinvalid_request400Check the parameters
Missing or invalid credentialunauthorized401Connect your account or check the key
Too many calls per minuterate_limited429Wait for the time in Retry-After
Daily metadata limit reachedmetadata_daily_limit429Wait until 00:00 UTC
Service temporarily unavailableyoutube_blocked, service_unavailable503Try again later

See plans and quota and all error codes.