Endpoints
/dash
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
| Parameter | Description |
|---|---|
VIDEO_ID | In the path, for example /dash/aqz-KE-bpKQ.mpd. |
key | Your API key. Already set in dashUrl. |
webm | true 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
langand aRole:mainfor the original,dubfor an automatic dub,alternatefor the rest. Video sets come first, then the original audio, then the others. - Every representation points at a
/streamlink and usesSegmentBasewith 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
| Status | Meaning |
|---|---|
400 | Missing or invalid video ID. |
404 | The video has no streams, or none that can go into a manifest. The body says why. |
502 | YouTube’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.
The manifest URL and every link in it contain your key. See Authentication before you use this on a public page.