Skip to content

Last updated

Changelog

YouTube API

HealthyRead-only

YouTube data as JSON: search videos, shorts, channels and playlists, video details and comments, channel profiles and uploads, playlist contents, and search suggestions. Generated from youtube.com.

Base URL
https://api.maviapi.com/v1/sites/youtube
10
Endpoints
3 min ago
Last verified
99.6%
Uptime / 7d
1547ms
p50 latency
GET/search5 credits per call

Search

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`.

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

search text

stringOptionalin query

all, video, short, channel, playlist or movie

stringOptionalin query

relevance or popularity

stringOptionalin query

any, today, week, month or year

stringOptionalin query

any, short (under 3 min), medium (3-20 min) or long (over 20 min)

stringOptionalin query

`next_page_token` from a previous call to get the next page (other parameters are then ignored)

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"
Try itLive
GET
https://api.maviapi.com/v1/sites/youtube/search?query=python%20tutorial&type=all&sort=relevance&upload_date=any&duration=any
Request
curl "https://api.maviapi.com/v1/sites/youtube/search?query=python%20tutorial&type=all&sort=relevance&upload_date=any&duration=any" \
-H "Authorization: Bearer $MAVI_KEY"
Example1.8 KB
{
  "query": "python tutorial",
  "estimated_results": 10051029,
  "results": [
    {
      "type": "video",
      "video_id": "ix9cRaBkVe0",
      "url": "https://www.youtube.com/watch?v=ix9cRaBkVe0",
      "title": "Python Full Course for free 🐍",
      "channel_name": "Bro Code",
      "channel_id": "UC4SVo0Ue36XCfOyb5Lh1viQ",
      "channel_handle": "@BroCodez",
      "published": "2 years ago",
      "duration": "12:00:00",
      "duration_seconds": 43200,
      "views_text": "13,587,986 views",
      "views": 13587986,
      "is_live": false,
      "description_snippet": "python #tutorial #beginners Python tutorial for beginners' full course 2024 *Learn Python in 1 HOUR* ...",
      "thumbnail": "https://i.ytimg.com/vi/ix9cRaBkVe0/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLDsLPZCX5PFS2a-Wng9IwGAduPqOQ"
    }
  ],
  "next_page_token": "Es4FEg9weXRob24gdHV0b3JpYWwaugVTQlNDQVF0cGVEbGpVbUZDYTFabE1JSUJDMHMxUzFaRlZUTmhZV1ZSZ2dFTGEzRjBSRFZrY0c0NVF6aUNBU0pRVEhONVpXOWllbGQ0YkRkd2IwdzVTbFJXZVc1a1MyVTJNbWxsYjA0dFRWb3pnZ0VMWmxkcWMyUm9Vak42TTJPQ0FTSlFUSE41Wlc5aWVsZDRiRGR2YlVSdlJWbHljbVl6YjFoMldIaGhOazFRWjJWcmdnRUxYM1ZSY2tvd1ZHdGFiR09DQVF0NlJrRTBjR04wVWxJeFo0SUJJbEJNTFc5emFVVTRNRlJsVkhReVpEbGlabFo1VkdsWVNrRXRWVlJJYmpaWGQxV0NBUXR5Wm5OalZsTXdkblJpZDRJQklsQk1XbEJhY1RCeVgxSmFUMDlyVlZGaVlYUTRUSGxSYVdrek5tTktaakpUVjFTQ0FTSlFURmRMYW1oS2RIRldRV0p1Y1VKNFkyUnFWa2RuVkROMVZsSXhNR0o2VkVWQ2dnRWlVRXhVYWxKMlJHOTZjbVJzZUdvMWQyZElOSEZyZG5kVFQyUklURTlEZURFd1pvSUJJbEJNTFc5emFVVTRNRlJsVkhOcmNtRndUbUo2V0doM2IwWlZhVXhEYWtkbldUZUNBU0pRVEhVd1YxODViRWxKT1dGbmQyZ3hXR3BTZERJME1uaEpjRWhvVUZReWJHeG5nZ0VpVUV4SGFuQnNUa1ZSTVdsME9DMHdRMjF2YkdwVE5YbGxWaTFIYkV0VFZVVjBNSUlCQzIwMk55MWlUM0JQYjFCVmdnRUxVbTlmVFZOalZFUm1WVFNDQVF0ME9IQlFaRXRaY0c5M1NZSUJJbEJNVG1OblgwWldPVzQzY1ZwSFprWnNNa0ZPU1Y5NlNWTjZUbkF5TlRkTWQyNnlBUVlLQkFnVUVBSSUzRBiB4OgYIgtzZWFyY2gtZmVlZA%3D%3D"
}

Get all the data, no code

Collect every page of GET /search into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.

Use YouTube API from Claude, ChatGPT and your coding tools

Add this URL as a custom connector and sign in to maviapi. Nothing to install.

How to connect
https://mcp.maviapi.com/mcp

Or run it locally, with each endpoint of YouTube API as its own tool:

claude mcp add maviapi -e MAVIAPI_TOOLS=youtube -- npx -y '@maviapi/mcp'

Import YouTube API into Postman and other tools

How to import

Paste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.

  • OpenAPI 3.1
    https://api.maviapi.com/v1/apis/youtube/openapi.json
  • Postman
    https://api.maviapi.com/v1/apis/youtube/postman.json

The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.

Build with the YouTube API

Choose a starting endpoint

  • Search GET /search

    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`.

    Parameters and response fields for GET /search
    Request parameters
    NameType / locationRequiredDescription
    querystring / queryNosearch text
    typestring / queryNoall, video, short, channel, playlist or movie
    sortstring / queryNorelevance or popularity
    upload_datestring / queryNoany, today, week, month or year
    durationstring / queryNoany, short (under 3 min), medium (3-20 min) or long (over 20 min)
    page_tokenstring / queryNo`next_page_token` from a previous call to get the next page (other parameters are then ignored)
    Response fields
    FieldTypeDescription
    querystring
    estimated_resultsinteger
    resultsobject[]
    results[].typestring
    results[].video_idstring
    results[].urlstring
    results[].titlestring
    results[].channel_namestring
    results[].channel_idstring
    results[].channel_handlestring
    results[].publishedstring
    results[].durationstring
    results[].duration_secondsinteger
    results[].views_textstring
    results[].viewsinteger
    results[].is_liveboolean
    results[].description_snippetstring
    results[].thumbnailstring
    next_page_tokenstring
  • Transcript GET /transcript

    The transcript (captions) of a video in one language, as `rows` of `start` and `duration` (seconds) and `text`, plus every caption language the video has (`languages`, each with code, name and whether it is auto-generated). Human-made captions are preferred over auto-generated ones in the same language. A video without captions returns empty `languages` and `rows`.

    Parameters and response fields for GET /transcript
    Request parameters
    NameType / locationRequiredDescription
    video_idstring / queryNo11-character video id, or any youtube.com / youtu.be video URL
    langstring / queryNocaption language code such as en, de or pt-BR (a bare code like pt also matches pt-BR); one of the video's `languages`. Omit for the video's own default caption language.
    Response fields
    FieldTypeDescription
    video_idstring
    titlestring
    languagestring
    language_namestring
    is_auto_generatedboolean
    languagesobject[]
    languages[].codestring
    languages[].namestring
    languages[].is_auto_generatedboolean
    rowsobject[]
    rows[].startnumber
    rows[].durationnumber
    rows[].textstring
  • Search V2 GET /search_v2

    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.

    Parameters and response fields for GET /search_v2
    Request parameters
    NameType / locationRequiredDescription
    querystring / queryNosearch text
    typestring / queryNoall, video (regular videos only: no shorts, channels or playlists), short, channel, playlist or movie Allowed values: all, video, short, channel, playlist, movie.
    sortstring / queryNorelevance or popularity Allowed values: relevance, popularity.
    upload_datestring / queryNoany, today, week, month or year Allowed values: any, today, week, month, year.
    durationstring / queryNoany, short (under 4 min), medium (4-20 min) or long (over 20 min), YouTube's own length buckets Allowed values: any, short, medium, long.
    min_durationinteger / queryNokeep only videos/shorts at least this many seconds long (drops channels, playlists and live streams)
    max_durationinteger / queryNokeep only videos/shorts at most this many seconds long (drops channels, playlists and live streams)
    langstring / queryNoISO 639-1 language code (e.g. en, de, ja); results in that language are ranked first
    regionstring / queryNoISO 3166-1 alpha-2 country code (e.g. US, DE, JP) the search is run for
    page_tokenstring / queryNo`next_page_token` from a previous call; it carries that call's filters, so other parameters are ignored
    Response fields
    FieldTypeDescription
    querystring
    estimated_resultsinteger
    resultsobject[]
    results[].typestring
    results[].video_idstring
    results[].urlstring
    results[].titlestring
    results[].channel_namestring
    results[].channel_idstring
    results[].channel_handlestring
    results[].publishedstring
    results[].published_atstring
    results[].durationstring
    results[].duration_secondsinteger
    results[].views_textstring
    results[].viewsinteger
    results[].is_liveboolean
    results[].description_snippetstring
    results[].thumbnailstring
    next_page_tokenstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Comments GET /comments

    One page (~20) of comments on a video, each with comment id, text, author (name, channel id, verified/creator flags), published time, like count, reply count, and a `replies_token` that, passed back as `page_token`, lists that comment's replies. Also returns the total comment count (first page) and `next_page_token`.

    Parameters and response fields for GET /comments
    Request parameters
    NameType / locationRequiredDescription
    video_idstring / queryNo11-character video id or video URL
    sortstring / queryNotop or newest
    page_tokenstring / queryNo`next_page_token` or a comment's `replies_token` from a previous call (video_id/sort then ignored)
    Response fields
    FieldTypeDescription
    video_idstring
    total_commentsinteger
    commentsobject[]
    comments[].comment_idstring
    comments[].textstring
    comments[].publishedstring
    comments[].is_replyboolean
    comments[].author_namestring
    comments[].author_channel_idstring
    comments[].author_avatarstring
    comments[].author_is_verifiedboolean
    comments[].author_is_creatorboolean
    comments[].likes_textstring
    comments[].likesinteger
    comments[].repliesinteger
    comments[].replies_tokenstring
    next_page_tokenstring
  • Search Suggestions GET /search_suggestions

    YouTube search autocomplete suggestions for a partial query, as a list of strings (up to ~10).

    Parameters and response fields for GET /search_suggestions
    Request parameters
    NameType / locationRequiredDescription
    querystring / queryNopartial search text
    Response fields
    FieldTypeDescription
    querystring
    suggestionsstring[]
  • Transcripts GET /transcripts

    Transcripts of up to 20 videos in one call, in the order given. Each row in `videos` has `id`, `title`, `language` (caption language code used), `language_name`, `is_auto_generated`, `segments` (each `start` and `duration` in seconds, and `text`) and `chapters` from the video description (each `start` in seconds and `title`; empty when the description lists none). A video without captions, or that cannot be fetched, gives a row with `id` and `error` (`code`, `message`) instead of failing the call; `code` is `invalid_id`, `unavailable`, `no_transcript` or `fetch_failed`.

    Parameters and response fields for GET /transcripts
    Request parameters
    NameType / locationRequiredDescription
    idsstring / queryNocomma-separated video ids or video URLs, at most 20 (duplicates are dropped)
    langstring / queryNocomma-separated caption language codes in order of preference, such as `de,en` (a bare code like pt also matches pt-BR); when none of them exists the video's original caption language is used. Empty for always the original.
    Response fields
    FieldTypeDescription
    countinteger
    videosobject[]
    videos[].idstring
    videos[].titlestring
    videos[].languagestring
    videos[].language_namestring
    videos[].is_auto_generatedboolean
    videos[].segmentsobject[]
    videos[].segments[].startnumber
    videos[].segments[].durationnumber
    videos[].segments[].textstring
    videos[].chaptersstring[]
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • Video GET /video

    Full details of one video: title, description, channel (id, name, handle, subscribers), publish date, duration, view/like/comment counts, category, keywords, live/short flags, thumbnail and related videos.

    Parameters and response fields for GET /video
    Request parameters
    NameType / locationRequiredDescription
    video_idstring / queryNo11-character video id, or any youtube.com / youtu.be video URL
    Response fields
    FieldTypeDescription
    video_idstring
    urlstring
    titlestring
    descriptionstring
    channel_idstring
    channel_namestring
    channel_handlestring
    channel_subscribers_textstring
    channel_subscribersinteger
    publishedstring
    upload_datestring
    duration_secondsinteger
    viewsinteger
    likesinteger
    commentsinteger
    categorystring
    keywordsstring[]
    is_live_contentboolean
    is_live_nowboolean
    is_shortboolean
    is_family_safeboolean
    is_unlistedboolean
    available_countries_countinteger
    thumbnailstring
    relatedobject[]
    related[].typestring
    related[].video_idstring
    related[].urlstring
    related[].titlestring
    related[].channel_namestring
    related[].channel_idstring
    related[].publishedstring
    related[].views_textstring
    related[].viewsinteger
    related[].durationstring
    related[].duration_secondsinteger
    related[].thumbnailstring
  • Channel GET /channel

    Profile of a YouTube channel: id, title, handle, description, subscriber/video/view counts, join date, country, external links, avatar, banner and keywords.

    Parameters and response fields for GET /channel
    Request parameters
    NameType / locationRequiredDescription
    channelstring / queryNochannel id (UC...), @handle, or channel URL
    Response fields
    FieldTypeDescription
    channel_idstring
    urlstring
    titlestring
    handlestring
    descriptionstring
    subscribers_textstring
    subscribersinteger
    video_countinteger
    view_countinteger
    joinedstring
    countrystring
    linksobject[]
    links[].titlestring
    links[].urlstring
    keywordsstring
    is_family_safeboolean
    avatarstring
    bannerstring
    rss_urlstring
  • Playlist GET /playlist

    A playlist's details (title, description, owner channel, video count, total views) and one page (up to ~100) of its videos in order, each with id, url, title, channel, views, published time, duration and thumbnail, plus `next_page_token`.

    Parameters and response fields for GET /playlist
    Request parameters
    NameType / locationRequiredDescription
    playlist_idstring / queryNoplaylist id (PL..., UU..., OLAK...) or a playlist URL
    page_tokenstring / queryNo`next_page_token` from a previous call to get the next page of videos (playlist_id then ignored)
    Response fields
    FieldTypeDescription
    playlist_idstring
    urlstring
    titlestring
    descriptionstring
    channel_namestring
    channel_idstring
    video_countinteger
    viewsinteger
    thumbnailstring
    videosobject[]
    videos[].typestring
    videos[].video_idstring
    videos[].urlstring
    videos[].titlestring
    videos[].channel_namestring
    videos[].channel_idstring
    videos[].publishedstring
    videos[].views_textstring
    videos[].viewsinteger
    videos[].durationstring
    videos[].duration_secondsinteger
    videos[].thumbnailstring
    next_page_tokenstring
  • Channel Videos GET /channel_videos

    One page (~30) of a channel's uploads: videos, shorts, live streams or playlists, each with id, url, title, views, published time, duration and thumbnail, plus `next_page_token`.

    Parameters and response fields for GET /channel_videos
    Request parameters
    NameType / locationRequiredDescription
    channelstring / queryNochannel id (UC...), @handle, or channel URL
    tabstring / queryNovideos, shorts, live or playlists
    sortstring / queryNolatest, popular or oldest (videos, shorts and live tabs)
    page_tokenstring / queryNo`next_page_token` from a previous call (other parameters are then ignored)
    Response fields
    FieldTypeDescription
    channel_idstring
    channel_titlestring
    tabstring
    sortstring
    itemsobject[]
    items[].typestring
    items[].video_idstring
    items[].urlstring
    items[].titlestring
    items[].channel_namestring
    items[].channel_idstring
    items[].publishedstring
    items[].views_textstring
    items[].viewsinteger
    items[].durationstring
    items[].duration_secondsinteger
    items[].thumbnailstring
    next_page_tokenstring

Export YouTube data to CSV

Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.

ListCSV columns
SearchGET /searchtype, video_id, url, title, channel_name, channel_id, channel_handle, published, duration, duration_seconds, views_text, views, is_live, description_snippet, thumbnail
Search V2GET /search_v2type, video_id, url, title, channel_name, channel_id, channel_handle, published, published_at, duration, duration_seconds, views_text, views, is_live, description_snippet, thumbnail
CommentsGET /commentscomment_id, text, published, is_reply, author_name, author_channel_id, author_avatar, author_is_verified, author_is_creator, likes_text, likes, replies, replies_token
TranscriptsGET /transcriptsid, title, language, language_name, is_auto_generated, segments, chapters
VideoGET /videotype, video_id, url, title, channel_name, channel_id, published, views_text, views, duration, duration_seconds, thumbnail
PlaylistGET /playlisttype, video_id, url, title, channel_name, channel_id, published, views_text, views, duration, duration_seconds, thumbnail
Channel VideosGET /channel_videostype, video_id, url, title, channel_name, channel_id, published, views_text, views, duration, duration_seconds, thumbnail

A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work

YouTube API questions

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

Is there an official YouTube API?

Yes. Google offers the YouTube Data API, covering videos, channels, playlists and search results; it needs a Google Account and an API key, and usage has a quota. Source: YouTube Data API (checked 2026-11-25). This YouTube API is a separate, unofficial one: an independent, hosted API from maviapi for the public data on youtube.com. It is not made, endorsed or supported by YouTube.

What data can I get from the YouTube API?

The YouTube API has 10 endpoints. Each returns JSON with the parameters and fields documented above:

  • GET /search: 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…
  • GET /transcript: The transcript (captions) of a video in one language, as `rows` of `start` and `duration` (seconds) and `text`, plus every caption language the video has…
  • GET /search_v2: Search YouTube and return one page of results (videos, shorts, channels, playlists) in YouTube's own ranking, like /search, with cleaner fields: every video…
  • GET /comments: One page (~20) of comments on a video, each with comment id, text, author (name, channel id, verified/creator flags), published time, like count, reply count…
  • GET /search_suggestions: YouTube search autocomplete suggestions for a partial query, as a list of strings (up to ~10).
  • GET /transcripts: Transcripts of up to 20 videos in one call, in the order given.
  • GET /video: Full details of one video: title, description, channel (id, name, handle, subscribers), publish date, duration, view/like/comment counts, category, keywords…
  • GET /channel: Profile of a YouTube channel: id, title, handle, description, subscriber/video/view counts, join date, country, external links, avatar, banner and keywords.
  • GET /playlist: A playlist's details (title, description, owner channel, video count, total views) and one page (up to ~100) of its videos in order, each with id, url, title…
  • GET /channel_videos: One page (~30) of a channel's uploads: videos, shorts, live streams or playlists, each with id, url, title, views, published time, duration and thumbnail…

How much does the YouTube API cost?

Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 5 credits per call. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. Failed calls are free. 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 API?

Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /search:

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

Create a key on your API keys page, or try any endpoint first in the console above with the free test key.

What are the ways to get YouTube data as JSON?

Each way to get YouTube data as JSON fits a different need:

  • YouTube Data API: Google offers the YouTube Data API, covering videos, channels, playlists and search results; it needs a Google Account and an API key, and usage has a quota. Better when you need write access, account data or an agreement with YouTube.
  • Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on youtube.com are yours. Better for a one-off pull from a page that rarely changes.
  • Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
  • RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
  • maviapi: The YouTube API on this page: 10 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.

What happens when youtube.com changes its layout?

Your code does not change. maviapi keeps the YouTube API working when youtube.com changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.

Will an update break my YouTube API integration?

No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.

  • Instagram API

    Public Instagram profiles and posts as JSON: follower and post counts, latest posts with captions, hashtags, likes…

  • Tripadvisor API

    Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…

  • Google Maps API

    Structured data from maps.google.com.