YouTube API

Including the transcript, which is the part you came for

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

no credit card1,000 free credits · instant API key · live in 10 seconds
Missing a YouTube endpoint, or need a source we don't have yet?Contact us real people · same-day reply.
Y
/youtube/v1

11 active endpoints, on 1 and 2 credit tiers.

  • POST/youtube/v1/search
  • POST/youtube/v1/video_detail
  • POST/youtube/v1/video_details
  • POST/youtube/v1/comments
  • POST/youtube/v1/channel
  • POST/youtube/v1/transcript
  • POST/youtube/v1/playlist
  • +4 more

What YouTube endpoints does ReefAPI ship?

11 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.

11 endpoints

search

1 cr

search videos/channels/playlists/shorts with filters (upload date, duration, sort order, feat…

required
query
optional
type, limit, continuation, upload_date, duration, sort_by, features

video_detail

1 cr

video metadata.

required
video_id
optional

video_details

1 cr

BATCH engagement enrichment.

required
video_ids
optional
include_comment_count

comments

1 cr

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

required
video_id
optional
limit, continuation, sort

channel

1 cr

channel detail.

required
channel_id
optional
handle, url

transcript

1 cr

video transcript/captions (timed segments + full text) select any language the video has via…

required
video_id
optional
lang, format

playlist

1 cr

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

required
playlist_id
optional
limit, continuation

channel_videos

2 cr

a channel's uploads (Videos tab).

required
channel_id
optional
handle, url, limit, continuation

channel_shorts

1 cr

a channel's Shorts tab (video_id/title/views/views_int/thumbnails), paginated.

required
channel_id
optional
handle, url, limit, continuation

related

1 cr

recommended/related videos for a video_id (from the watch page).

required
video_id
optional
limit

channel_about

2 cr

full channel About panel.

required
channel_id
optional
handle, url

Every parameter, every allowed value →

YouTube API

3 of 11 endpoints, ready to run

View docs ↗

One video: title, view count as a number, likes, publication date, length, keywords, description and the channel with its subscriber count.

1 credit1 required · 0 optional
POST/youtube/v1/video_detail
ok3478 ms · 1 records · sample
{
  "ok": true,
  "meta": {
    "api": "youtube",
    "endpoint": "video_detail",
    "mode": "live",
    "latency_ms": 3477.6,
    "record_count": 1,
    "cache_hit": false,
    "completeness_pct": 100
  },
  "data": {
    "video_id": "dQw4w9WgXcQ",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
    "views": 1809454852,
    "views_text": "1,809,454,852 views",
    "views_short": null,
    "published_date": "Oct 24, 2009",
    "published_relative": "16 years ago",
    "likes": 19000000,
    "channel": {
      "name": "Rick Astley",
      "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
      "subscribers_text": "4.54M subscribers",
      "subscribers": 4540000,
      "thumbnails": [
        {
          "url": "https://yt3.ggpht.com/MOWpaiGJdgN4aKMI-NGQLL4jMVP3aDORlQpOBWooi0GSE2TGt4_9ncyepk1pCh-yWQ795AhPbw=s48-c-k-c0x00ffffff-no-rj",
          "width": 48,
          "height": 48
        },
        {
          "url": "https://yt3.ggpht.com/MOWpaiGJdgN4aKMI-NGQLL4jMVP3aDORlQpOBWooi0GSE2TGt4_9ncyepk1pCh-yWQ795AhPbw=s88-c-k-c0x00ffffff-no-rj",
          "width": 88,
          "height": 88
        },
        {
          "url": "https://yt3.ggpht.com/MOWpaiGJdgN4aKMI-NGQLL4jMVP3aDORlQpOBWooi0GSE2TGt4_9ncyepk1pCh-yWQ795AhPbw=s176-c-k-c0x00ffffff-no-rj",
          "width": 176,
          "height": 176
        }
      ]
    },
    "description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link to get your copy and listen to Rick’s ‘Never’ playlist ❤️ #RickAstleyNever\nhttps://linktr.ee/rickastleynever\n\n“Never Gonna Give You Up” was a global smash on its release in July 1987, topping the charts in 25 countries including Rick’s native UK and the US Billboard Hot 100.  It also won the Brit Award for Best single in 1988. Stock Aitken and Waterman wrote and produced the track which was the lead-off single and lead track from Rick’s debut LP “Whenever You Need Somebody”.  The album was itself a UK number one and would go on to sell over 15 million copies worldwide.\n\nThe legendary video was directed by Simon West – who later went on to make Hollywood blockbusters such as Con Air, Lara Croft – Tomb Raider and The Expendables 2.  The video passed the 1bn YouTube views milestone on 28 July 2021.\n\nSubscribe to the official Rick Astley YouTube channel: https://RickAstley.lnk.to/YTSubID\n\nFollow Rick Astley:\nFacebook: https://RickAstley.lnk.to/FBFollowID \nTwitter: https://RickAstley.lnk.to/TwitterID \nInstagram: https://RickAstley.lnk.to/InstagramID \nWebsite: https://RickAstley.lnk.to/storeID \nTikTok: https://RickAstley.lnk.to/TikTokID\n\nListen to Rick Astley:\nSpotify: https://RickAstley.lnk.to/SpotifyID \nApple Music: https://RickAstley.lnk.to/AppleMusicID \nAmazon Music: https://RickAstley.lnk.to/AmazonMusicID \nDeezer: https://RickAstley.lnk.to/DeezerID \n\nLyrics:\nWe’re no strangers to love\nYou know the rules and so do I\nA full commitment’s what I’m thinking of\nYou wouldn’t get this from any other guy\n\nI just wanna tell you how I’m feeling\nGotta make you understand\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\nWe’ve known each other for so long\nYour heart’s been aching but you’re too shy to say it\nInside we both know what’s been going on\nWe know the game and we’re gonna play it\n\nAnd if you ask me how I’m feeling\nDon’t tell me you’re too blind to see\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\n#RickAstley #NeverGonnaGiveYouUp #WheneverYouNeedSomebody #OfficialMusicVideo",
    "length_seconds": 213,
    "keywords": [
      "rick astley",
      "Never Gonna Give You Up",
      "nggyu"
    ],
    "is_live": false,
    "thumbnails": [
      {
        "url": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/default.webp",
        "width": 120,
        "height": 90
      },
      {
        "url": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/mqdefault.webp",
        "width": 320,
        "height": 180
      },
      {
        "url": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/hqdefault.webp",
        "width": 480,
        "height": 360
      }
    ],
    "available_captions": [
      {
        "lang": "en",
        "name": "English",
        "kind": null,
        "is_generated": false,
        "translatable": true
      },
      {
        "lang": "en",
        "name": "English (auto-generated)",
        "kind": "asr",
        "is_generated": true,
        "translatable": true
      },
      {
        "lang": "de-DE",
        "name": "German (Germany)",
        "kind": null,
        "is_generated": false,
        "translatable": true
      }
    ]
  }
}
Real response, fetched from the live endpoint with the parameters on the left — trimmed to the first few rows, with seller names left out. Press Try it for the untrimmed response.

How the YouTube API works

YouTube is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.

01
Authenticate
x-api-key header

No OAuth app, no request signing, no per-site account. One key covers all 184 engines.

02
Call
POST /youtube/v1/…

Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.

03
Pay
1 or 2 credits per call

Credits, not seats. Failed and blocked calls are never charged, and cache hits cost nothing.

04
Read
{ ok, data, meta, error }

One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.

Making an hour of video searchable

The reason to reach for YouTube data is rarely the view count. It is that the content is locked inside audio, and the transcript is the only way to index it.

01transcript
POST/youtube/v1/transcript
{"video_id": "dQw4w9WgXcQ"}

Returns timestamped segments plus the full text, the language, and whether the captions were written or auto-generated.

02video_detail
POST/youtube/v1/video_detail
{"video_id": "dQw4w9WgXcQ"}

The metadata to store alongside it — title, channel, publication date and view count as an integer rather than a display string.

Timestamps are the useful half: a search hit inside a transcript becomes a link to the second it was said, rather than a link to the video.

request
curl -X POST https://api.reefapi.com/youtube/v1/video_detail \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"video_id":"dQw4w9WgXcQ"}'
response envelope
{
  "ok": true,
  "data": { … },
  "meta": {
    "api": "youtube",
    "endpoint": "video_detail",
    "mode": "live",
    "latency_ms": …,
    "record_count": …
  },
  "error": null
}

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.

What comes back, and where the gaps are

Measured on a well-known video, a transcript and a search.

Counts are numbers, not display strings

Views and likes come back as integers alongside their formatted forms. Parsing '1.8B views' back into a number is a small, silly, error-prone job and it does not need doing here.

The transcript says whether a human wrote it

Each transcript reports its language, whether it was auto-generated, and the other languages available with a flag for which are translations. Auto-generated captions are usable but noticeably worse on names and technical terms, and a pipeline that treats both the same will produce silently worse results on half its corpus.

Against us: not every video has one

Transcripts exist where captions exist. Many videos have none in any language, and the endpoint says so rather than returning an empty string that reads like a silent video. Design the ingestion path to skip rather than to fail.

Search filters are the real ones

Upload date, duration, features such as subtitles or high definition, and sort order are all parameters, with a continuation token for paging. Filtering upstream rather than fetching and discarding is what keeps a monitoring job affordable.

Search rows are mixed, and say what they are

A result set contains videos, shorts, channels and playlists, and each row carries its type. A short and a long-form video are very different things to a content pipeline, so treating an untyped list as videos will quietly skew any analysis built on it.

What people build with YouTube

The jobs this data is most often used for.

11

endpoints

1/2

credits per call

01

Content teams call search and channel_videos to track a competitor's uploads and performance.

02

AI and research pipelines pull transcript to summarize or search the spoken content of a video.

03

Comment-analysis tools use comments to measure audience sentiment on a video at scale.

What YouTube data costs

The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.

Full pricing →
$0.67–$1.50 / 1,000 credits
  • 1,000 free credits on signup, no card
  • One key, all 184 APIs, one credit pool
  • Failed and blocked calls are never charged
  • Credits roll over and never expire

Call it in two lines

Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.

curl
curl -X POST https://api.reefapi.com/youtube/v1/video_detail \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"video_id":"dQw4w9WgXcQ"}'
python
import requests

r = requests.post(
    "https://api.reefapi.com/youtube/v1/video_detail",
    headers={"x-api-key": REEF_KEY},
    json={
  "video_id": "dQw4w9WgXcQ"
},
)
print(r.json()["data"])
FAQ

Have a question? We got answers.

The questions people actually ask before wiring up YouTube.

Get a free key →
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.

25 Media, Film & Knowledge APIs on the same key

One key, one credit pool, one response envelope. If you are pulling YouTube, you are one call away from the rest of the category — no second contract, no second integration.

Need something this API does not do?

Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.

0/4000

No account needed · we reply from [email protected]

Try it on your own data before you pay anything

The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 183 APIs, and the same envelope everywhere.

Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-08-30.