Media, Film & Knowledge

YouTube API

The YouTube API returns videos, channels, playlists, comments and transcripts as clean JSON.

11 actionsLive JSON1,000 free creditsMCP-ready
Get a free keyOpen in playground

🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.

The primary search endpoint returns type-tagged results (video, shorts, channel, playlist) with a continuation token for paging, and you can pull a video_detail, comments, a channel and its videos and shorts, a playlist, related videos, and a video's transcript. It is built for content research, competitor monitoring and AI pipelines that need YouTube data without OAuth quotas or a scraper. One ReefAPI key, one shared credit pool, the standard envelope.

Live example

Real request and response JSON

Captured from the indexed primary action, search, on .

Captured request
{
  "method": "POST",
  "url": "https://api.reefapi.com/youtube/v1/search",
  "headers": {
    "x-api-key": "$REEF_KEY",
    "content-type": "application/json"
  },
  "body": {
    "query": "lofi hip hop",
    "type": "video",
    "limit": 20
  }
}
Captured response
{
  "ok": true,
  "meta": {
    "api": "youtube",
    "endpoint": "search",
    "mode": "live",
    "latency_ms": 2579.7,
    "record_count": 20,
    "bytes": 714589,
    "cache_hit": false,
    "completeness_pct": 100,
    "stop_reason": "limit_reached",
    "type": "video",
    "estimated_results": 811289
  },
  "data": {
    "results": [
      {
        "type": "video",
        "video_id": "n61ULEU7CO0",
        "title": "Best of lofi hip hop 2021 ✨ [beats to relax/study to]",
        "channel": "Lofi Girl",
        "channel_id": "UCSJ4gkVC6NrvII8umztf0Ow",
        "views": "55,992,199 views",
        "views_int": 55992199,
        "published": "4 years ago",
        "length": "6:10:58",
        "description": "Listen on Spotify, Apple music and more → https://fanlink.tv/BestofLofi2021 The new Lofi Girl compilation “Best of 2021” is out now ...",
        "thumbnails": [
          {
            "url": "[trimmed-depth]",
            "width": "[trimmed-depth]",
            "height": "[trimmed-depth]"
          },
          {
            "url": "[trimmed-depth]",
            "width": "[trimmed-depth]",
            "height": "[trimmed-depth]"
          }
        ],
        "url": "https://www.youtube.com/watch?v=n61ULEU7CO0"
      },
      {
        "type": "video",
        "video_id": "X4VbdwhkE10",
        "title": "lofi hip hop radio 📚 beats to relax/study to",
        "channel": "Lofi Girl",
        "channel_id": "UCSJ4gkVC6NrvII8umztf0Ow",
        "views": "9,409 watching",
        "views_int": 9409,
        "published": null,
        "length": null,
        "description": "Listen on Spotify, Apple music and more → https://lnk.to/lofi-hiphop-beats-to-relax-study-to02 | Lofi Girl on all social media ...",
        "thumbnails": [
          {
            "url": "[trimmed-depth]",
            "width": "[trimmed-depth]",
            "height": "[trimmed-depth]"
          },
          {
            "url": "[trimmed-depth]",
            "width": "[trimmed-depth]",
            "height": "[trimmed-depth]"
          }
        ],
        "url": "https://www.youtube.com/watch?v=X4VbdwhkE10"
      },
      {
        "type": "video",
        "video_id": "rPjez8z61rI",
        "title": "lofi hip hop radio – beats to sleep/study/relax to ☕",
        "channel": "STEEZYASFUCK",
        "channel_id": "UCsIg9WMfxjZZvwROleiVsQg",
        "views": "363 watching",
        "views_int": 363,
        "published": null,
        "length": null,
        "description": "Lofi Hip-Hop Beats on Spotify: → https://fanlink.to/LofiHipHop Welcome to our 24/7 lofi hip-hop live stream. Good for relaxing ...",
        "thumbnails": [
          {
            "url": "[trimmed-depth]",
            "width": "[trimmed-depth]",
            "height": "[trimmed-depth]"
          }
        ],
        "url": "https://www.youtube.com/watch?v=rPjez8z61rI"
      }
    ],
    "count": 20,
    "estimated_results": 811289,
    "continuation": "EvAEEgxsb2ZpIGhpcCBob3Aa3ARFcnNEa2dHM0F6b3JFaWQ1YjNWMGRXSmxYMnhwZG1WZlluSnZZV1JqWVhOMFgzTjBZWFIxY3owd0lEcDBlWEJsT25KZ0JFcUhBd29jQ2d4c2IyWnBJR2hwY0NCb2IzRHlBUVVLQTBGc2JOZ0NBYmdEWVFxbEFmSUJDQW9HVTJodmNuUnp3Z0tRQVNoaElIbHZkWFIxWW1WZmMyaHZjblJ6WDJSbFptbHVhWFJwYjI0Z09uUjVjR1U2Y2lBb2JpQjViM1YwZFdKbFgyWnNZV2RmYUdGelgzQnlaVzFwWlhKbFgzWnBaR1Z2WDIxbGRHRmtZWFJoUFRFZ09uUjVjR1U2Y2lrZ0tHNGdlVzkxZEhWaVpWOW1iR0ZuWDJoaGMxOXNhWFpsWDNOMGNtVmhiVjl0WlhSaFpHRjBZVDB4SURwMGVYQmxPbklwS2ZnQ0FiZ0RHZ29XOGdFTENnbFZibmRoZEdOb1pXVEtBZ0lZQWJnREhBb1U4Z0VKQ2dkWFlYUmphR1ZreWdJQ0dBSzRBMG9LT3ZJQkNBb0dWbWxrWlc5endnSWFlVzkxZEhWaVpW",
    "query": "lofi hip hop",
    "type": "video"
  }
}
Actions

What the YouTube API does

ActionDescriptionConcrete use caseKey params
searchsearch videos/channels/playlists/shorts with filters (upload date, duration, sort order, features)Content platforms call search to search videos/channels/playlists/shorts with filters (upload date, duration, sort order, feat….query, type, limit, continuation, upload_date, ...
video_detailvideo metadata: title/views/likes/date/channel/description (+ duration/keywords/thumbnails/caption-langs best-effort)Research tools call video_detail to get video metadata.video_id
video_detailsBATCH engagement enrichment — pass up to 50 video_ids in ONE call, get likes + description (+ optional comment_count) per video. Built to enrich channel_videos/channel_shorts lists (which don't carry likes) without one call per video.Community analysts call video_details to get bATCH engagement enrichment.video_ids, include_comment_count
commentsvideo comments (text/author/likes/replies), paginated, sortable by top or newestMedia monitors call comments to get video comments (text/author/likes/replies), paginated, sortable by top or newest.video_id, limit, continuation, sort
channelchannel detail: subs/videoCount/description/linksContent platforms call channel to get channel detail.channel_id, handle, url
transcriptvideo transcript/captions (timed segments + full text) select any language the video has via 'lang'; format=text|segmentsResearch tools call transcript to get video transcript/captions (timed segments + full text) select any language the video has via….video_id, lang, format
playlistlist a playlist's videos (id/title/channel/duration/position), paginatedCommunity analysts call playlist to list a playlist's videos (id/title/channel/duration/position), paginated.playlist_id, limit, continuation
channel_videosa channel's uploads (Videos tab): video_id/title/views/duration, paginatedMedia monitors call channel_videos to get a channel's uploads (Videos tab).channel_id, handle, url, limit, continuation
channel_shortsa channel's Shorts tab (video_id/title/views/views_int/thumbnails), paginated — the Shorts that the Videos tab (channel_videos) omits; works for shorts-only channelsContent platforms call channel_shorts to get a channel's Shorts tab (video_id/title/views/views_int/thumbnails), paginated.channel_id, handle, url, limit, continuation
relatedrecommended/related videos for a video_id (from the watch page)Research tools call related to get recommended/related videos for a video_id (from the watch page).video_id, limit
channel_aboutfull channel About panel: total views, joined date, country, links, descriptionCommunity analysts call channel_about to get full channel About panel.channel_id, handle, url
Code samples

Call search from your stack

curl -X POST https://api.reefapi.com/youtube/v1/search \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"query":"lofi hip hop","type":"video","limit":20}'
MCP one-liner
Ask your MCP-connected assistant: call reefapi.youtube.search with {"query":"lofi hip hop","type":"video","limit":20}.
Use cases

Who uses this API and why

  • Content teams call search and channel_videos to track a competitor's uploads and performance.
  • AI and research pipelines pull transcript to summarize or search the spoken content of a video.
  • Comment-analysis tools use comments to measure audience sentiment on a video at scale.
FAQ

Questions developers ask before integrating

What is the YouTube API?

YouTube API is a ReefAPI endpoint group for video details, search, comments and transcripts. It returns live JSON through POST requests under /youtube/v1.

Is the YouTube API free to try?

Yes. ReefAPI starts with 1,000 free credits, no card required. YouTube calls use the same shared credit balance as every other ReefAPI engine.

Do I need a YouTube login or account?

No login to YouTube is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.

How fresh is the YouTube data?

The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.

How many credits does the YouTube API use?

YouTube actions currently cost 1-2 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.

Can I call YouTube from an AI assistant or MCP client?

Yes. Connect ReefAPI once through MCP and your assistant can call youtube actions with the same key, credit pool and JSON envelope used by normal REST requests.

Is the YouTube API a YouTube scraper?

It is the managed alternative to a DIY YouTube scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same video details, search, comments and transcripts back as clean JSON.

Why does my YouTube scraper keep getting blocked?

Most YouTube scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked or failed calls are free.

docs / youtube

YouTube

Video details, search, comments and transcripts.

base /youtube/v111 endpoints
post/youtube/v1/video_detail1 credit

video metadata: title/views/likes/date/channel/description (+ duration/keywords/thumbnails/caption-langs best-effort)

ParameterAllowed / rangeDescription
video_idrequiredYouTube video id (11 chars) or any watch/youtu.be/shorts/embed URL.
Try in playground →
post/youtube/v1/video_details1 credit

BATCH engagement enrichment — pass up to 50 video_ids in ONE call, get likes + description (+ optional comment_count) per video. Built to enrich channel_videos/channel_shorts lists (which don't carry likes) without one call per video.

ParameterAllowed / rangeDescription
video_idsoptionalUp to 50 video ids or watch URLs to enrich in one batch.
include_comment_count = falseoptionalAlso fetch total comment_count per video (1 extra call/video → higher cost+latency). Default off (likes + description only).
Try in playground →
post/youtube/v1/comments1 credit

video comments (text/author/likes/replies), paginated, sortable by top or newest

ParameterAllowed / rangeDescription
video_idoptionalYouTube video id (11 chars) or any watch/youtu.be/shorts/embed URL.
limit = 20optional1–200How many items to return (1-200). Paged internally; clamped to range.
sort = topoptionaltop · newestComment ordering (ignored when paging an existing `continuation`).
continuationoptionalNext-page token from a previous response's `continuation` (provide this instead of the primary id to fetch the next page).
Try in playground →
post/youtube/v1/channel1 credit

channel detail: subs/videoCount/description/links

ParameterAllowed / rangeDescription
channel_idrequiredChannel id (UC…), an @handle, or a channel URL — any one resolves the channel.
Try in playground →
post/youtube/v1/transcript1 credit

video transcript/captions (timed segments + full text) select any language the video has via 'lang'; format=text|segments

ParameterAllowed / rangeDescription
video_idrequiredYouTube video id (11 chars) or any watch/youtu.be/shorts/embed URL.
lang = enoptionalPreferred caption language code (e.g. en, es, de). Falls back to an available track; see available_languages in the response.
format = segmentsoptionalsegments · textOutput shape. 'text' omits the per-cue segments[] array.
Try in playground →
post/youtube/v1/playlist1 credit

list a playlist's videos (id/title/channel/duration/position), paginated

ParameterAllowed / rangeDescription
playlist_idoptionalPlaylist id (PL…/UU…/OLAK…), a full playlist URL (…?list=…), or a VL… browseId.
limit = 100optional1–200How many items to return (1-200). Paged internally; clamped to range.
continuationoptionalNext-page token from a previous response's `continuation` (provide this instead of the primary id to fetch the next page).
Try in playground →
post/youtube/v1/channel_videos2 credits

a channel's uploads (Videos tab): video_id/title/views/duration, paginated

ParameterAllowed / rangeDescription
channel_idrequiredChannel id (UC…), an @handle, or a channel URL — any one resolves the channel.
limit = 30optional1–200How many items to return (1-200). Paged internally; clamped to range.
continuationoptionalNext-page token from a previous response's `continuation` (provide this instead of the primary id to fetch the next page).
Try in playground →
post/youtube/v1/channel_shorts1 credit

a channel's Shorts tab (video_id/title/views/views_int/thumbnails), paginated — the Shorts that the Videos tab (channel_videos) omits; works for shorts-only channels

ParameterAllowed / rangeDescription
channel_idrequiredChannel id (UC…), an @handle, or a channel URL — any one resolves the channel.
limit = 30optional1–200How many items to return (1-200). Paged internally; clamped to range.
continuationoptionalNext-page token from a previous response's `continuation` (provide this instead of the primary id to fetch the next page).
Try in playground →
post/youtube/v1/channel_about2 credits

full channel About panel: total views, joined date, country, links, description

ParameterAllowed / rangeDescription
channel_idrequiredChannel id (UC…), an @handle, or a channel URL — any one resolves the channel.
Try in playground →