YouTube Audio Download API

Request audio formats other than MP3 with the shared download endpoint. The active pricing list includes M4A, WEBM, AAC, FLAC, Opus, OGG, Vorbis, and WAV; OGG and Vorbis share one output format.

First request

GET

Use the shared API host unless the dashboard shows an account-specific hostname.

curl --get "https://p.savenow.to/ajax/download.php" \
  --data-urlencode "url=https://www.youtube.com/watch?v=VIDEO_ID" \
  --data "format=m4a" \
  --data "apikey=YOUR_API_KEY"

Use active audio format values

The public pricing endpoint lists m4a, webm, aac, flac, opus, ogg, vorbis, and wav as audio values. The vorbis key maps to the same OGG output format as ogg.

Choose a container and codec

The V2 profiles map m4a to AAC, webm to Opus audio, aac to ADTS AAC, flac to FLAC, opus to Opus, ogg and vorbis to OGG Vorbis, and wav to PCM WAV. Inspect the returned file before presenting codec details to your users.

Poll the accepted job

A successful request returns a job id. Poll /ajax/progress.php until progress reaches 1000. Use download_url only when success is 1 or true and the URL is non-empty; otherwise stop and display the returned error.

Keep MP3 separate

MP3 has its own guide because the legacy endpoint accepts audio_quality while the V2 MP3 profile targets 320 kbps. The other format keys select an output format, not a promised bitrate.

Check duration and wallet rules

Each audio request is billed by the selected format and applicable duration rules. Estimate costs and ensure the API key has balance before processing production traffic.

Feature details

Format selection

Use the exact key

Send a format value from the current pricing table. The endpoint treats ogg and vorbis as aliases for the same OGG output.

Do not assume a bitrate

The format name identifies the output container or codec. It does not promise a bitrate for the source or final file.

Check the resulting media

Read the file headers or probe the completed download when your product needs to display a codec, bitrate, or duration.

Job handling

Start one job

Create the job with a single video URL, format, and server-side API key.

Poll without the key

Use the returned id with /ajax/progress.php. Progress polling does not need the API key.

Stop on terminal failure

At progress 1000, require success=1 or true and a non-empty download_url before passing the file to another service.

Parameters

m4a AAC in MP4 container Use format=m4a for an M4A audio output.
webm Opus audio in WebM Use format=webm for an audio-only WebM output.
aac AAC Use format=aac for an AAC ADTS output.
flac Lossless codec Use format=flac for a FLAC output. The source still limits the available audio quality.
opus Opus Use format=opus for an Opus output.
ogg / vorbis Same OGG output Both keys map to format id 14 and produce OGG Vorbis.
wav PCM WAV Use format=wav for a PCM WAV output. File size can be much larger than compressed audio formats.

Request examples

cURL M4A request

bash
curl --get "https://p.savenow.to/ajax/download.php" --data-urlencode "url=https://www.youtube.com/watch?v=VIDEO_ID" --data "format=m4a" --data "apikey=YOUR_API_KEY"

Node.js WAV request

javascript
const apiKey = process.env.VDA_API_KEY;
if (!apiKey) throw new Error('Set VDA_API_KEY on the server.');

const params = new URLSearchParams({
  url: 'https://www.youtube.com/watch?v=VIDEO_ID',
  format: 'wav',
  apikey: apiKey,
});

const response = await fetch(`https://p.savenow.to/ajax/download.php?${params}`);
if (!response.ok) throw new Error(`Download request failed: ${response.status}`);

const job = await response.json();
if (!job.success || !job.id) throw new Error(job.message || 'The audio job was not accepted.');
console.log({ id: job.id, progressUrl: job.progress_url });

Python Opus request

python
import os
import requests

response = requests.get(
    "https://p.savenow.to/ajax/download.php",
    params={
        "url": "https://www.youtube.com/watch?v=VIDEO_ID",
        "format": "opus",
        "apikey": os.environ["VDA_API_KEY"],
    },
    timeout=30,
)
response.raise_for_status()
job = response.json()
if not job.get("success") or not job.get("id"):
    raise RuntimeError(job.get("message") or "The audio job was not accepted.")
print({"id": job["id"], "progress_url": job.get("progress_url")})

Important details

Read the MP3 guide

MP3 bitrate behavior differs between the legacy and V2 paths. Use the focused guide for the request parameter and profile details.

Open the YouTube to MP3 API guide

Review the current prices

Audio output is billable by format and duration. Check the live pricing table before choosing a format for production jobs.

Review audio pricing

Keep API keys server-side

Use an environment variable or secret manager in server code. Never put a production API key in browser JavaScript.

Get an API key

Related guides

Continue building

OpenAPI docs

Download YAML or JSON specs and inspect downloader, progress, and subtitle endpoints.

Read docs

Embed resources

Keep button, card, widget, and REST paths reachable for existing users and migrations.

View resources

Common questions

Which non-MP3 audio formats can I request?

The active pricing API lists m4a, webm, aac, flac, opus, ogg, vorbis, and wav. The ogg and vorbis keys map to the same OGG Vorbis output.

What bitrate will an audio file use?

A format key selects an output format, not a guaranteed bitrate. Inspect the completed file when your application needs its actual codec or bitrate.

How do I request MP3?

Use the separate YouTube to MP3 API guide. It explains the legacy audio_quality parameter and the V2 MP3 profile.

Does one request download a playlist?

No. Each request creates one video job. Use the playlist workflow guide to enumerate individual video URLs and submit them one at a time.