YouTube to audio (MP3, M4A, WAV, FLAC...)
youtube_to_audioConvert a public YouTube video or Shorts URL into an audio file (MP3, M4A, WAV, FLAC, and more) and get a short-lived download link; optionally clip by start/end time.
Instructions
Convert a public YouTube video or Shorts URL to an audio file and return a short-lived download link. Supports mp3 (default), m4a, wav, flac, aac, opus, ogg, webm; bitrate 128/192/256/320 kbps or standard/best; optional clip via startTime/endTime in seconds. Sources up to 3 hours. Returns link, fileName, fileSize and durationSeconds. Waits up to ~2 minutes; if the conversion is still running, returns a jobId to check later with get_job. The link expires (about 30 minutes), so download it promptly. Private, removed, age-restricted and live videos are not supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | YouTube video/Shorts URL (e.g. https://www.youtube.com/watch?v=jNQXAC9IVRw) or an 11-character video ID | |
| format | No | Output audio format. Default: mp3 | |
| endTime | No | Clip end in seconds (optional, must be greater than startTime) | |
| quality | No | Audio quality: kbps (128, 192, 256, 320), 'standard', or 'best'. Ignored for lossless wav/flac. Default: standard | |
| startTime | No | Clip start in seconds (optional) | |
| maxWaitSeconds | No | How long to wait for completion before returning a jobId. Default: 120 |