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`.
https://api.maviapi.com/v1/sites/youtube/search5 credits per callParameters
| Name | Required | Example | Description |
|---|---|---|---|
querystring in query | Optional | python tutorial | search text |
typestring in query | Optional | all | all, video, short, channel, playlist or movie |
sortstring in query | Optional | relevance | relevance or popularity |
upload_datestring in query | Optional | any | any, today, week, month or year |
durationstring in query | Optional | any | any, short (under 3 min), medium (3-20 min) or long (over 20 min) |
page_tokenstring in query | Optional | None | `next_page_token` from a previous call to get the next page (other parameters are then ignored) |
Response fields
querye.g."python tutorial"estimated_resultse.g.10051029results
typee.g."video"video_ide.g."ix9cRaBkVe0"urle.g."https://www.youtube.com/watch?v=ix9cRaBkVe0"titlee.g."Python Full Course for free 🐍"channel_namee.g."Bro Code"channel_ide.g."UC4SVo0Ue36XCfOyb5Lh1viQ"channel_handlee.g."@BroCodez"publishede.g."2 years ago"duratione.g."12:00:00"duration_secondse.g.43200views_texte.g."13,587,986 views"viewse.g.13587986is_livee.g.falsedescription_snippete.g."python #tutorial #beginners Python tutorial for beginners' full course 2024 *Learn Python in 1 HOUR* ..."thumbnaile.g."https://i.ytimg.com/vi/ix9cRaBkVe0/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLDsLPZCX5PFS2a-Wng9IwGAduPqOQ"next_page_tokene.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 '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.