Skip to content

YouTube Search v2 API

Search YouTube and return one page of results (videos, shorts, channels, playlists) in YouTube's own ranking, like /search, with cleaner fields: every video and short row carries `published_at` (ISO 8601 upload date-time with its UTC offset), `duration_seconds` (integer, the real video length; null for a live stream) and `views` (exact integer). Also returns `next_page_token` and `estimated_results`. Invalid parameter values answer 400 naming the parameter.

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

Parameters

NameRequiredExampleDescription
querystring in queryOptionalpython tutorialsearch text
typestring in queryOptionalallall, video (regular videos only: no shorts, channels or playlists), short, channel, playlist or movieOne of all, video, short, channel, playlist, movie
sortstring in queryOptionalrelevancerelevance or popularityOne of relevance, popularity
upload_datestring in queryOptionalanyany, today, week, month or yearOne of any, today, week, month, year
durationstring in queryOptionalanyany, short (under 4 min), medium (4-20 min) or long (over 20 min), YouTube's own length bucketsOne of any, short, medium, long
min_durationinteger in queryOptionalNonekeep only videos/shorts at least this many seconds long (drops channels, playlists and live streams)
max_durationinteger in queryOptionalNonekeep only videos/shorts at most this many seconds long (drops channels, playlists and live streams)
langstring in queryOptionalenISO 639-1 language code (e.g. en, de, ja); results in that language are ranked first
regionstring in queryOptionalUSISO 3166-1 alpha-2 country code (e.g. US, DE, JP) the search is run for
page_tokenstring in queryOptionalNone`next_page_token` from a previous call; it carries that call's filters, so other parameters are ignored

Response fields

querystringe.g."python tutorial"
estimated_resultsintegere.g.9903244
resultsobject[]16 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"
published_atstringe.g."2024-08-20T06:00:54-07:00"
durationstringe.g."12:00:00"
duration_secondsintegere.g.43200
views_textstringe.g."13,708,537 views"
viewsintegere.g.13708537
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."eyJjIjoiRXZJRUVnOXdlWFJvYjI0Z2RIVjBiM0pwWVd3YTNnUlRRbE5EUVZGMGNHVkViR3BWYlVaRFlURmFiRTFKU1VKRE1uUjRaRVZSTVZwSVFuVlBWVTAwWjJkRlRGZ3pWbEpqYTI5M1ZrZDBZV0pIVDBOQlUwcFJWRWhPTlZwWE9XbGxiR1EwWWtSa2QySXdkelZUYkZKWFpWYzFhMU15VlRKTmJXeHNZakEwZEZSV2IzcG5aMFZwVlVWNGVtVlhWblpaYm5CWVpVZDNNMkl5TVVWaU1GWmFZMjVLYlUweU9WbGtiR2cwV1ZSYVRsVkhaR3hoTkVsQ1F6TktiV015VGxkVmVrSXlaRWRLTTJkblJXbFZSWGQwWWpOT2NGSlVaM2RXUjFaVlpFUkthMDlYU20xV2JteFZZVlpvUzFGVE1WWldSV2gxVG14a00xWlpTVUpETTFFMFkwWkNhMU14YkhkaU0yUktaMmRGVEdJeFZrdGlNbmhUVGxkS1dVNXRaVU5CVVhSdFZqSndlbHBIYUZOTk0yOTZXVFJKUWtsc1FrMVhiRUpoWTFSQ2VWZ3hTbUZVTURseVZsWkdhVmxZVVRSVVNHeFNZVmRyZWs1dFRrdGFha3BVVmpGVFEwRlJkRXhPVlhSWFVsWlZlbGxYUm14VldVbENRM3BPYm1OSGJGTldlVEZxWlVjeGNtZG5SV2xWUlhoVllXeEtNbEpIT1RaamJWSnpaVWR2TVdReVpFbE9TRVp5Wkc1a1ZGUXlVa2xVUlRsRVpVUkZkMXB2U1VKSmJFSk5WakIwY1dGRmNEQmpWbHBDV1cwMWVGRnVhR3BhUjNCWF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26T23:56:22.899Z"
ageintegere.g.0

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_v2' \
  -H "Authorization: Bearer $MAVI_KEY"

YouTube Search v2 API questions

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

What does the YouTube Search v2 API return?

Search YouTube and return one page of results (videos, shorts, channels, playlists) in YouTube's own ranking, like /search, with cleaner fields: every video and short row carries `published_at` (ISO 8601 upload date-time with its UTC offset), `duration_seconds` (integer, the real video length; null for a live stream) and `views` (exact integer). Also returns `next_page_token` and `estimated_results`. Invalid parameter values answer 400 naming the parameter. The response has query, estimated_results, results, next_page_token, pagination, fetched_at and age.

Which parameters does the YouTube Search v2 API take?

Every parameter of GET /search_v2 is optional. You can pass query, type, sort, upload_date, duration, min_duration, max_duration, lang, region and page_token.

How much does one YouTube Search v2 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 v2 API?

Send an HTTPS GET request to https://api.maviapi.com/v1/sites/youtube/search_v2 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 v2 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.