YouTube Downloader API
This is the only two-step platform, and the reason is honest: on every other source the renditions already exist, so handing you all their links costs us nothing. A YouTube rendition does not exist until it is built — video and audio are separate streams that have to be muxed — so listing eight ready links would be a promise we could not keep. Instead info tells you exactly what each rendition weighs, and create builds the one you choose and returns a signed link with an expiry. The link is served from our side because YouTube signs its own media URLs to the IP that requested them; passed to your server they answer 403.
Links we accept
Any public post URL on these hosts. Short links and country mirrors are resolved for you.
https://www.youtube.com/watch?v=dQw4w9WgXcQhttps://youtu.be/dQw4w9WgXcQhttps://www.youtube.com/shorts/abc123https://music.youtube.com/watch?v=abc
Hosts
youtube.com · youtu.be · youtube-nocookie.com
Request
Step 1 — list the renditions (2 credits)
curl -s "https://api.saveapi.org/v1/youtube/info" \ -H "Authorization: Bearer sk_live_xxxx" \ -G --data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Step 2 — build the one you want (10 credits)
curl -s "https://api.saveapi.org/v1/youtube/create" \ -H "Authorization: Bearer sk_live_xxxx" \ -G --data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \ --data-urlencode "quality=720p"
Response
{
"success": true,
"platform": "youtube",
"source_url": "https://youtu.be/dQw4w9WgXcQ",
"video_id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"author": "Rick Astley",
"duration_seconds": 213,
"duration_str": "3:33",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"is_short": false,
"formats": [
{ "quality": "360p", "file_size": 11330415, "file_size_str": "10.8 MB", "exact": true },
{ "quality": "720p", "file_size": 29884416, "file_size_str": "28.5 MB", "exact": true },
{ "quality": "1080p", "file_size": 80546201, "file_size_str": "76.8 MB", "exact": true }
],
"audio_formats": [
{ "quality": "m4a", "file_size": 3460300, "file_size_str": "3.3 MB", "exact": true },
{ "quality": "mp3", "file_size": 8520000, "file_size_str": "8.1 MB", "exact": false }
],
"credits": { "spent": 2, "remaining": 99998 }
}Questions before you build
- Why two calls instead of one?
- Because a YouTube rendition is work, not a link that is already lying there. info costs one call and tells you the exact size of every quality; create builds the one you picked. Returning eight links from the first call would mean either building eight files or handing you links that break.
- Is there a limit_mb parameter?
- No, and there will not be. limit_mb exists for Telegram bots that must stay under an upload ceiling. Here you get file_size in bytes for every rendition before you commit, so the choice is yours.
- How long does the download link live?
- It carries a signed expiry (expires, a Unix timestamp) and answers 410 after it. Call create again for a fresh one. The link streams the file rather than serving a stored copy, so there is no Range support and no Content-Length — the size you plan against is file_size, which info reported before you chose.
- Are the sizes exact?
- Yes for every rendition except MP3, which we transcode and therefore estimate; the exact flag marks the difference. Video and M4A sizes come straight from the source.