Skip to content

YouTube Search API

Search YouTube and return one page (~20) of results: videos, shorts, channels and playlists, each with its id, url, title, channel, view count, publish time, duration and thumbnail where applicable, plus `next_page_token` for the following page and `estimated_results`.

GEThttps://api.maviapi.com/v1/sites/youtube/search5 credits per call

Parameters

NameRequiredExampleDescription
querystring in queryOptionalpython tutorialsearch text
typestring in queryOptionalallall, video, short, channel, playlist or movie
sortstring in queryOptionalrelevancerelevance or popularity
upload_datestring in queryOptionalanyany, today, week, month or year
durationstring in queryOptionalanyany, short (under 3 min), medium (3-20 min) or long (over 20 min)
page_tokenstring in queryOptionalNone`next_page_token` from a previous call to get the next page (other parameters are then ignored)

Response fields

querystringe.g."python tutorial"
estimated_resultsintegere.g.10051029
resultsobject[]15 fields
typestringe.g."video"
video_idstringe.g."ix9cRaBkVe0"
urlstringe.g."https://www.youtube.com/watch?v=ix9cRaBkVe0"
titlestringe.g."Python Full Course for free 🐍"
channel_namestringe.g."Bro Code"
channel_idstringe.g."UC4SVo0Ue36XCfOyb5Lh1viQ"
channel_handlestringe.g."@BroCodez"
publishedstringe.g."2 years ago"
durationstringe.g."12:00:00"
duration_secondsintegere.g.43200
views_textstringe.g."13,587,986 views"
viewsintegere.g.13587986
is_livebooleane.g.false
description_snippetstringe.g."python #tutorial #beginners Python tutorial for beginners' full course 2024 *Learn Python in 1 HOUR* ..."
thumbnailstringe.g."https://i.ytimg.com/vi/ix9cRaBkVe0/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLDsLPZCX5PFS2a-Wng9IwGAduPqOQ"
next_page_tokenstringe.g."Es4FEg9weXRob24gdHV0b3JpYWwaugVTQlNDQVF0cGVEbGpVbUZDYTFabE1JSUJDMHMxUzFaRlZUTmhZV1ZSZ2dFTGEzRjBSRFZrY0c0NVF6aUNBU0pRVEhONVpXOWllbGQ0YkRkd2IwdzVTbFJXZVc1a1MyVTJNbWxsYjA0dFRWb3pnZ0VMWmxkcWMyUm9Vak42TTJPQ0FTSlFUSE41Wlc5aWVsZDRiRGR2YlVSdlJWbHljbVl6YjFoMldIaGhOazFRWjJWcmdnRUxYM1ZSY2tvd1ZHdGFiR09DQVF0NlJrRTBjR04wVWxJeFo0SUJJbEJNTFc5emFVVTRNRlJsVkhReVpEbGlabFo1VkdsWVNrRXRWVlJJYmpaWGQxV0NBUXR5Wm5OalZsTXdkblJpZDRJQklsQk1XbEJhY1RCeVgxSmFUMDlyVlZGaVlYUTRUSGxSYVdrek5tTktaakpUVjFTQ0FTSlFURmRMYW1oS2RIRldRV0p1Y1VKNFkyUnFWa2RuVkROMVZsSXhNR0o2VkVWQ2dnRWlVRXhVYWxKMlJHOTZjbVJzZUdvMWQyZElOSEZyZG5kVFQyUklURTlEZURFd1pvSUJJbEJNTFc5emFVVTRNRlJsVkhOcmNtRndUbUo2V0doM2IwWlZhVXhEYWtkbldUZUNBU0pRVEhVd1YxODViRWxKT1dGbmQyZ3hXR3BTZERJME1uaEpjRWhvVUZReWJHeG5nZ0VpVUV4SGFuQnNUa1ZSTVdsME9DMHdRMjF2YkdwVE5YbGxWaTFIYkV0VFZVVjBNSUlCQzIwMk55MWlUM0JQYjFCVmdnRUxVbTlmVFZOalZFUm1WVFNDQVF0ME9IQlFaRXRaY0c5M1NZSUJJbEJNVG1OblgwWldPVzQzY1ZwSFprWnNNa0ZPU1Y5NlNWTjZUbkF5TlRkTWQyNnlBUVlLQkFnVUVBSSUzRBiB4OgYIgtzZWFyY2gtZmVlZA%3D%3D"

Example request

Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.

cURL
curl 'https://api.maviapi.com/v1/sites/youtube/search' \
  -H "Authorization: Bearer $MAVI_KEY"

YouTube Search API questions

What you get, what it costs and how to call it.

What does the YouTube Search API return?

Search YouTube and return one page (~20) of results: videos, shorts, channels and playlists, each with its id, url, title, channel, view count, publish time, duration and thumbnail where applicable, plus `next_page_token` for the following page and `estimated_results`. The response has query, estimated_results, results and next_page_token.

Which parameters does the YouTube Search API take?

Every parameter of GET /search is optional. You can pass query, type, sort, upload_date, duration and page_token.

How much does one YouTube Search API call cost?

One successful call costs 5 credits. A failed call costs nothing. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.

How do I call the YouTube Search API?

Send an HTTPS GET request to https://api.maviapi.com/v1/sites/youtube/search with your API key in the Authorization header, as in the example request on this page. Create a key on your API keys page, or try the endpoint first in the console with the free test key.

Is the YouTube Search API official?

No. It is an independent, hosted API from maviapi for the public data on youtube.com, and it is not made, endorsed or supported by YouTube. Its parameters and response fields are documented on this page.