↑ ↓ to move ↵ to open
YouTube API · Endpoint

YouTube Search API

Search YouTube for videos, Shorts, channels, playlists or live streams, filtered by upload date and length and sorted by relevance, date, views or rating.

  • 1 credit per call
  • Failed calls are free
  • Updated
  • youtube.search.query
Response completed
{  "has_more": true,  "pages": 2,  "results_count": 40,  "results": [    {      "title": "Sony WH-1000XM6 Review: Back on the Throne!",      "views": "4,925,722 views",      "view_count": 4925722,      "channel": "Marques Brownlee",      "channel_id": "UCBJycsmduvYEL83R_U4JriQ",      "duration": "9:17",      "duration_seconds": 557,      "type": "video",      "video_id": "XbXXKhfvSF0",      "thumbnails": [        {          "height": 202,          "width": 360        },        {          "height": 404,          "width": 720        }      ]    },    {      "title": "The Only ANC Headphones Worth Buying in 2026",      "views": "132,845 views",      "view_count": 132845,      "channel": "Mark Ellis Reviews",      "channel_id": "UCwwuSBYcErVlOpveYubHv4g",      "duration": "18:37",      "duration_seconds": 1117,      "type": "video",      "video_id": "ljV1iOJmE_E",      "thumbnails": [        {          "height": 202,          "width": 360        },        {          "height": 404,          "width": 720        }      ]    }  ]}
Try it live, free
Input

What you send

The input object of the request, with every field the endpoint accepts.

FieldTypeRequiredWhat it doesExample
query string yes What to search for. noise cancelling headphones review
duration string no Only short, medium or long videos. short · long · medium
filter string no One quick filter: videos, channels, playlists, live, Shorts, or uploads from today, this week, month or year. Use it alone, not with the filters below. videos
limit integer no How many results to return. 40
max_pages integer no How many pages to read in this call. 3
sort string no Relevance, rating, upload date or view count. relevance · rating · upload_date · view_count
type string no Only videos, channels, playlists or movies. video · channel · playlist · movie
upload_date string no Only uploads from the last hour, today, this week, month or year. hour · today · week · month · year
Response

Fields it returns

What each record in the response holds, with the values from the sample above.

FieldTypeWhat it isExample
results[].title string The video's title. Sony WH-1000XM6 Review: Back on the Throne!
results[].views string Views as YouTube writes them. 4,925,722 views
results[].view_count integer Views as a number, read from what YouTube shows. 4,925,722
results[].channel string The channel that posted it. Marques Brownlee
results[].channel_id string YouTube's ID for the channel. UCBJycsmduvYEL83R_U4JriQ
results[].duration string The video's length as YouTube shows it. 9:17
results[].duration_seconds integer The video's length, in seconds. 557
results[].thumbnails array Thumbnail images in different sizes. 2 records
results[].thumbnails[].height integer 202
results[].thumbnails[].width integer 360
results[].type string What kind of item it is, such as video. video
results[].video_id string YouTube's ID for the video. XbXXKhfvSF0
has_more boolean Whether more results are available. true
pages integer How many pages were read for this answer. 2
results array The matching videos. 3 records
results_count integer How many results YouTube reports for the search. 40
REST API · MCP server

Call it from your code, or ask your agent

Set UPSCRAPE_API_KEY to your key and copy a working request.

curl --request POST \  --url https://data.upscrape.com/execute \  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \  --header "Content-Type: application/json" \  --header "Prefer: wait=30" \  --data '{  "capability": "youtube.search.query",  "input": {    "filter": "videos",    "limit": 40,    "max_pages": 3,    "query": "noise cancelling headphones review"  }}'
In your AI agent Claude · Cursor · any MCP client
1Add the Upscrape MCP server
https://data.upscrape.com/mcp
2Ask for the data in plain words

With Upscrape, get the YouTube search for filter "videos" and query "noise cancelling headphones review". Tell me what it costs before you run it, then show the results as a table.

The agent finds the endpoint, shows you the price, and runs it with your credits.
YouTube

More from the YouTube API

Questions

YouTube Search API FAQ

The short answers. The docs have the long ones.

Still have a question? Talk to the people who build the endpoints.
How much does the YouTube Search API cost?

1 credit per successful call, shown before it runs. You buy credits once, and paid credits never expire.

What do I send?

Send query. The input fields below list every option with its type and limits.

Do I need a YouTube login?

No. It reads public YouTube data; nothing runs on your account.

Can my AI agent call it?

Yes, over MCP: the agent finds youtube.search.query, checks its price and runs it with the same credits as the REST API.

Get started

Your first YouTube call is free.

Up to 100 free credits to start, no card needed.