Looking for the overview — what this API returns, what it costs, and a call you can run without a key? See the YouTube API page →
Media, Film & Knowledge

YouTube API & Scraper

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

11 actionsLive JSON1,000 free credits$0.67–$1.50 / 1,000 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.

Reference

YouTube id formats: video, channel, handle, playlist and comment

Every action here takes an id, and each id has its own fixed shape. Most id parameters also accept a full URL, which the engine resolves for you. The shapes below were read off live responses on 2026-08-27 rather than from documentation.

IdShape (measured)ExampleAccepted by
video_id11 characters, case sensitivedQw4w9WgXcQvideo_detail, comments, transcript, related; also any watch, youtu.be, shorts or embed URL
channel_idUC + 22 characters, 24 in totalUCuAXFkgsw1L7xaCfnd5JJOwchannel, channel_about, channel_videos, channel_shorts
handle@ plus the channel handle@RickAstleyYTthe same channel_id parameter, which resolves it to the UC id
playlist_idPL + 16 or PL + 32 charactersPL15B1E77BB5708555playlist; UU, OLAK and VL browse ids are accepted too
comment_idUgz-prefixed, 26 charactersUgzge340dBgB75hWBm54AaABAgreturned by comments; not an input
continuationopaque token, around 860 characterstoo long to printthe continuation parameter on search, comments, playlist, channel_videos, channel_shorts

Looking a channel up by @handle returns the UC id in the response, so one call converts a handle you scraped out of a URL into the stable id you should be storing.

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

Are YouTube view and like counts integers or strings?

video_detail returns both. A measured call for dQw4w9WgXcQ on 2026-08-27 returned views 1808420510 as an integer alongside views_text '1,808,420,510 views' as the display string. likes is an integer too, but it is YouTube's own rounded figure: the same video returned 19000000, which is the '19M' the watch page shows rather than an exact count. Nobody can read an exact like count off YouTube, so treat likes as an order of magnitude.

Why do the view counts on channel_videos and playlist look far too small?

Those list surfaces publish an abbreviated label instead of a number. Measured on 2026-08-27, a MrBeast upload came back with views '59M views' and views_int 59, and a playlist row came back with views '9.1B views' and views_int 91. The label in views is correct, the integer derived from it on those list actions is not. For exact figures collect the ids and call video_details, which returned 59748410 for that same video.

What format is the video duration in?

Not ISO-8601. video_detail returns length_seconds as a plain integer, measured at 213 for a three and a half minute video. The list actions instead return a display string in duration or length, such as '20:29' or '6:10:58'. If you need seconds from a list row you have to parse the colon-separated string yourself, or call video_detail for that id.

What format is the publish date?

A US-style display date, not a timestamp. video_detail returned published_date 'Oct 24, 2009' plus published_relative '16 years ago', and the video_details batch returned 'Aug 22, 2026' for a recent upload. The list actions carry only the relative form in published, for example '4 days ago' or '4 years ago'. There is no ISO date anywhere in the video responses, so parse the display string if you need one.

Which action gives the right subscriber count?

channel_about. Measured on 2026-08-27 for UCuAXFkgsw1L7xaCfnd5JJOw it returned subscribers 4540000, matching the 4.54M that video_detail reports inside its channel block, plus view_count 2536701615, video_count 435, country 'United Kingdom' and joined_date 'Joined Feb 1, 2015'. The channel action reads the channel header instead, and on a channel whose header carries a featured link it picked up the wrong element and reported 105000 for the same channel. Use channel_about for counts and channel for the profile fields.

How do I page past the limit on a YouTube search?

Every paginated action caps limit at 200 items per call and returns a continuation token, measured at around 860 characters. Send that token back in the continuation parameter instead of the query or id to get the next page. search also returns estimated_results, which was 798512 for 'lofi hip hop', and meta.stop_reason tells you why the engine stopped, for example 'limit_reached'.

What does the transcript action return, and can I choose a language?

It returns language, language_code, an is_generated flag, segment_count, duration_ms, the full text, and segments[] with start_ms, dur_ms and text per cue. A measured call for dQw4w9WgXcQ returned 61 segments over 211320 ms of a 213-second video with is_generated false, meaning a human-authored track. available_languages lists every track with its own is_generated and translatable flags; that video carried English, English auto-generated, German, Japanese, Brazilian Portuguese and Latin American Spanish among others. Pass lang to pick one.

Why does channel_videos not include a channel's Shorts?

YouTube splits them into separate tabs and so does this API. channel_videos reads the Videos tab, channel_shorts reads the Shorts tab, and a shorts-only channel returns nothing from the first and everything from the second. Neither list carries likes, so if you need engagement for a whole channel, collect the video_ids and pass up to 50 at a time to video_details, which returns likes and description per video in one call.

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.

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 →