/youtube/download
POST15 credits25 credits for 1440p and 2160p
a direct link to the file
one POST turns a youtube video into a direct link to the file. pick a quality from 144p to 2160p, or audio only. the download_url needs no api key, so you can hand it straight to your user.
returns a download_url that points at our tunnel and is valid for 10 minutes. 1440p and 2160p cost 25 credits instead of 15 - they are bigger files and heavier to prepare.
parameters
| name | type | description | example |
|---|---|---|---|
| urlrequired | string | youtube video url | https://www.youtube.com/watch?v=6dG1WWjew8s |
| formatrequired | string | audio, mp3, m4a, 144p, 240p, 360p, 480p, 720p, 1080p, 1440p or 2160p | 720p |
every request carries X-Api-Key.
request
curl
curl -X POST 'https://api.fastsaver.io/v1/youtube/download' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"url":"https://www.youtube.com/watch?v=6dG1WWjew8s","format":"720p"}'raw http
http
POST https://api.fastsaver.io/v1/youtube/download
Content-Type: application/json
{
"url": "https://www.youtube.com/watch?v=6dG1WWjew8s",
"format": "2160p"
}response
response
{
"ok": true,
"video_id": "6dG1WWjew8s",
"duration": 577,
"filename": "THE POWER OF TESTOSTERONE - LITVINOV FIT (2160p, av1, youtube).mp4",
"download_url": "https://api.fastsaver.io/v1/tunnel?id=UJLUoLGd1m2t1ScSTW1Lw...",
"thumbnails": {
"low": "https://i.ytimg.com/vi/6dG1WWjew8s/mqdefault.jpg",
"max": "https://i.ytimg.com/vi/6dG1WWjew8s/maxresdefault.jpg"
}
}errors
| status | detail | when | credits |
|---|---|---|---|
| 400 | Invalid format, available formats: audio, 144p, 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p | format is not one of the values above. nothing is charged. | 0 |
| 400 | Insufficient credits. Please top up to your account. | the balance is below the price of this format. | 0 |
| 400 | download.failed | the link has no youtube video id, or we could not get the file. | 0.1 |
| 400 | fetch.timeout | the file was not ready within 30 seconds. | 0.1 |
| 404 | tunnel.not_found | you opened download_url after its 10 minutes. call the endpoint again. | 0 |
limits
download_urlworks for 10 minutes from the call. after that it answers 404.- the link redirects to the file, so a browser or a download manager can follow it.
audio,mp3andm4aask for the same thing: the audio track.- we wait up to 30 seconds for the file. a slower one fails with
fetch.timeout.
see also
- youtube info - every format with its file size, before you pick one
- youtube audio to your bot - a telegram
file_idinstead of a file - credits - what every call costs
- errors - every status code and what to do about it
try it
costs 15 credits · real callgoes straight to the api, never to us
youtube video url
audio, mp3, m4a, 144p, 240p, 360p, 480p, 720p, 1080p, 1440p or 2160p
paste a key, or sign in and it fills itself