YouTube to MP3 Downloader
Pricing
from $20.00 / 1,000 audio file saveds
YouTube to MP3 Downloader
Convert authorized YouTube videos and playlists to MP3 (or m4a, opus, wav, flac) with chosen bitrate, ID3 tags and thumbnail cover art. Saves each track to Apify key-value storage and returns MCP-ready JSON. Built for AI agents and SEO.
Pricing
from $20.00 / 1,000 audio file saveds
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Share
Convert authorized YouTube videos and playlists into clean, tagged MP3 files — or M4A, Opus, WAV, and FLAC — at the bitrate you choose. Every track is transcoded with yt-dlp + ffmpeg, tagged with ID3 metadata and embedded thumbnail cover art, saved to Apify key-value storage, and returned as MCP-ready JSON for AI agents and automation.
What it does
Give it one or more YouTube URLs (single videos, Shorts, or playlists). For each track it:
- Downloads the best available audio stream.
- Transcodes to your chosen format and bitrate.
- Embeds ID3 tags (title, artist, upload date) and the video thumbnail as cover art.
- Saves the file to the key-value store and returns a structured row with a direct download key.
When to use it
- Build an audio archive of talks, lectures, podcasts, or interviews you have rights to.
- Turn a playlist you own into a set of tagged MP3s in one run.
- Feed audio into transcription, diarization, or music-analysis pipelines.
- Let an AI agent fetch YouTube audio as a structured tool call (MCP-ready).
Do not use it to download content you do not own or have permission to use. See the legal note below.
Output
One dataset row per track, plus the audio file in the key-value store.
| Field | Description |
|---|---|
title | Video / track title |
artist | Uploader / channel (written to the ID3 artist tag) |
videoId | YouTube video ID |
durationSeconds | Track length |
audioFormat | mp3, m4a, opus, wav, or flac |
bitrateKbps | Target bitrate for lossy formats (null for VBR / lossless) |
fileKey | Key-value store key to download the audio file |
fileSizeBytes | Saved file size |
thumbnail | Cover-art image URL |
uploadDate | YYYYMMDD when available |
status | success, skipped, or failed |
error | Actionable message when a track could not be produced |
scrapedAt | ISO 8601 timestamp |
Audio files are stored under keys like audio-{videoId}-{slug}.mp3. Each row's fileKey points to its file.
Pricing
Pay per result (PPE):
- Actor start — $0.00005 per run
- Audio file saved — $0.02 per track successfully saved
Failed, skipped, and invalid URLs are not charged the per-track fee. A typical single-track run costs about $0.02. You also pay Apify platform compute + proxy usage.
Input
| Field | Type | Default | Notes |
|---|---|---|---|
videoUrls | array | — | YouTube video / playlist URLs (required) |
authorizationConfirmed | boolean | false | Must be true to download |
audioFormat | enum | mp3 | mp3, m4a, opus, wav, flac |
audioBitrate | enum | 192 | best, 320, 256, 192, 128 (lossy only) |
embedMetadata | boolean | true | ID3 tags + thumbnail cover art |
includePlaylist | boolean | false | Expand playlist URLs |
maxResults | integer | 20 | Total track cap per run (1–200) |
maxDurationMinutes | integer | 120 | Skip longer videos |
maxFileSizeMb | integer | 100 | Skip larger files |
includeMetadataJson | boolean | false | Save raw yt-dlp metadata JSON |
cookiesTxt | string (secret) | — | Netscape cookies.txt for restricted videos |
proxyConfiguration | object | Residential | Apify proxy settings |
Example input
{"videoUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],"authorizationConfirmed": true,"audioFormat": "mp3","audioBitrate": "192","embedMetadata": true}
Playlist example
{"videoUrls": [{ "url": "https://www.youtube.com/playlist?list=PLxxxxxxxx" }],"authorizationConfirmed": true,"includePlaylist": true,"maxResults": 25,"audioFormat": "mp3","audioBitrate": "320"}
Use with the Apify API
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("khadinakbar/youtube-to-mp3-downloader").call(run_input={"videoUrls": [{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}],"authorizationConfirmed": True,"audioFormat": "mp3","audioBitrate": "192",})for row in client.dataset(run["defaultDatasetId"]).iterate_items():print(row["title"], row["fileKey"], row["status"])
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });const run = await client.actor('khadinakbar/youtube-to-mp3-downloader').call({videoUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],authorizationConfirmed: true,audioFormat: 'mp3',audioBitrate: '192',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Download a saved file from the key-value store using its fileKey:
https://api.apify.com/v2/key-value-stores/{storeId}/records/{fileKey}
MCP and AI agents
This actor is MCP-ready. It returns compact, flat JSON with stable keys and a direct fileKey for each track, so agents can request YouTube audio as a single tool call and hand the file to a downstream transcription or analysis step. Expose it via https://mcp.apify.com?tools=khadinakbar/youtube-to-mp3-downloader.
FAQ
Which format should I pick? MP3 for maximum compatibility, M4A/Opus for smaller high-quality files, WAV/FLAC when you need lossless audio for editing.
Does it embed cover art? Yes, when embedMetadata is on (default). The video thumbnail is embedded and ID3 tags are written.
Can it download a whole playlist? Yes — set includePlaylist: true and raise maxResults. The cap applies to the whole run to keep cost predictable.
Why residential proxy? YouTube heavily rate-limits datacenter IPs. Residential proxy is the default for reliability.
Age-restricted or members-only videos? Provide your own cookiesTxt (Netscape format). Only use cookies you are allowed to use.
A video returned "restricted_media"? Some premium/VEVO music and age-restricted videos are DRM-gated by YouTube and cannot be downloaded without a logged-in session. The run still succeeds and marks that track skipped with a clear message. To download it, supply cookiesTxt from an account allowed to view it. The vast majority of YouTube content (regular videos, talks, lectures, Shorts, most music, Creative Commons) downloads without cookies.
Legal
This actor is a technical tool for downloading audio you own or are legally permitted to download. You are solely responsible for how you use it and for complying with YouTube's Terms of Service and all applicable copyright laws. Downloading copyrighted content without permission may be illegal in your jurisdiction. The authorizationConfirmed checkbox must be set to true to confirm you have the necessary rights. This actor does not bypass paywalls, DRM, or access controls.
