Endpoints

/dash

GET/dash/VIDEO_ID.mpdFree, fair use

YouTube serves video and audio as separate tracks. /dash returns an MPEG-DASH manifest that lists both, and a DASH player in the browser plays them together. Nothing is merged on the server; the manifest only points at /stream links.

The /player response carries this link as dashUrl.

Parameters

ParameterDescription
VIDEO_IDIn the path, for example /dash/aqz-KE-bpKQ.mpd.
keyYour API key. Already set in dashUrl.
webmtrue adds the WebM tracks (VP9, Opus). Already set in dashUrl if you called /player with it.

/dash?id=VIDEO_ID works too. The .mpd form is better: some players and browser extensions only recognize a manifest by its file extension.

Play it

A plain <video src> cannot play a manifest. Use a DASH player:

<video id="player" controls width="960"></video>

<script src="https://cdn.jsdelivr.net/npm/dashjs@5.2.1/dist/modern/umd/dash.all.min.js"></script>
<script>
  const player = dashjs.MediaPlayer().create();
  player.initialize(
    document.getElementById('player'),
    'https://api.ytbro.net/dash/aqz-KE-bpKQ.mpd?key=YOUR_KEY',
    false // autoplay
  );
</script>

The player picks a video quality that fits the connection and switches as it goes.

What is in the manifest

  • One adaptation set per container and codec: H.264 and AV1 video are separate sets.
  • On videos with several audio languages, one audio set per language, with lang and a Role: main for the original, dub for an automatic dub, alternate for the rest. Video sets come first, then the original audio, then the others.
  • Every representation points at a /stream link and uses SegmentBase with the init and index ranges from /player.

The manifest is sent as application/dash+xml with Cache-Control: no-store. Every call looks the video up again, so it always reflects what YouTube serves right now.

Errors

StatusMeaning
400Missing or invalid video ID.
404The video has no streams, or none that can go into a manifest. The body says why.
502YouTube’s side failed. Retry after a moment.

Billing

The manifest itself is not billed. Every segment the player then loads is a /stream request and billed at PRICE. A DASH player loads in segments, so expect many requests per playback.

Key in the page

The manifest URL and every link in it contain your key. See Authentication before you use this on a public page.