YouTube to MP3 Downloader avatar

YouTube to MP3 Downloader

Pricing

from $10.00 / 1,000 audio file saveds

Go to Apify Store
YouTube to MP3 Downloader

YouTube to MP3 Downloader

Convert authorized YouTube videos and playlists to MP3, M4A, Opus, WAV or FLAC with your chosen bitrate, ID3 tags and thumbnail cover art. Each track is saved to Apify key-value storage with a clean JSON record.

Pricing

from $10.00 / 1,000 audio file saveds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

26

Total users

5

Monthly active users

12 days ago

Last modified

Features

Limited permissions

Share

What is YouTube to MP3 Downloader?

YouTube to MP3 Downloader converts authorized YouTube videos and playlists into MP3, M4A, Opus, WAV, or FLAC files with the bitrate, tags, and thumbnail cover art you choose. It accepts full YouTube video, Shorts, embed, and playlist URLs, processes three tracks at a time, saves each audio file to Apify key-value storage, and returns MCP-ready JSON with a direct downloadUrl for every file. Each dataset row represents one track and includes title, artist, durationSeconds, audioFormat, bitrateKbps, fileKey, downloadUrl, status, and scrapedAt.

You pay only for files that were saved: $0.012 per audio file on the Free and Bronze plans, $0.011 on Silver, and $0.010 on Gold and higher, plus Apify platform usage (about $0.01 for a short clip and about $0.04 for a 4-minute song, because the audio is fetched through a residential proxy at about $8 per GB). Failed, skipped, and too-long videos are not charged. Tip: sourceQuality: light cuts the platform usage of speech and lectures by about half.

What's new

  • Lower price per saved file with Store plan discounts.
  • Three tracks are processed at the same time, so lists finish faster. Every track has a time cap and the run stops starting new tracks before its time limit, so one slow video cannot stall the run.
  • The page is read once per track instead of twice, and a free direct connection is tried before any paid proxy traffic.
  • New downloadUrl field and an agentSummary in the run output for AI agents.
  • New optional trim (startSeconds, endSeconds) and an optional sourceQuality: light setting that reads a smaller audio stream and cuts proxy traffic by roughly half for speech and lectures.

Best fit and connected workflows

This Actor fits workflows that start from a specific YouTube URL and end with a structured audio file ready for a downstream step.

  • Convert a single authorized YouTube video into a tagged audio file for transcription, review, or archival.
  • Expand a specific playlist URL into track-level audio files with a run cap that keeps storage and billing predictable.
  • Capture metadata-rich audio for agent workflows that need direct file keys and dataset rows.
  • Pair it with YouTube Channel Videos Scraper -- Metadata & Metrics when your earlier step is channel discovery and your next step is audio extraction from selected video URLs.

Practical scenario

Maya manages a research archive. She starts with a playlist URL from a lecture series she is authorized to download, turns on includePlaylist, and sets maxResults to keep the first run focused. The dataset returns title, artist, durationSeconds, audioFormat, fileKey, and status for each track. Maya reviews the saved files, then uses the fileKey values to route each audio file into transcription next.

Input fields

FieldTypeDefaultPurpose
videoUrlsarrayrequiredFull YouTube video or playlist URLs to convert to audio
audioFormatstringmp3Output format: mp3, m4a, opus, wav, or flac
audioBitratestring192Bitrate for lossy formats: best, 320, 256, 192, or 128
sourceQualitystringstandardstandard reads the best audio stream; light reads a smaller one (about half the proxy traffic), best for speech
startSecondsintegeremptyKeep audio from this second onward
endSecondsintegeremptyStop at this second (must be greater than startSeconds)
embedMetadatabooleantrueWrites ID3 tags and embeds thumbnail cover art
includePlaylistbooleanfalseExpands playlist URLs
maxResultsinteger20Caps total tracks saved in one run (1 to 200)
maxDurationMinutesinteger120Skips videos longer than the chosen duration threshold
maxFileSizeMbinteger100Skips tracks whose final audio file exceeds the size cap
maxDownloadMegabytesinteger0Optional media transfer budget in MB; 0 means no budget
includeMetadataJsonbooleanfalseSaves raw video metadata JSON
cookiesTxtstring (secret)emptyOptional Netscape cookies.txt content for authorized YouTube sessions
proxyConfigurationobjectResidentialProxy settings for YouTube requests

Focused input example

{
"videoUrls": [
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
],
"audioFormat": "mp3",
"audioBitrate": "192",
"embedMetadata": true,
"includePlaylist": false,
"maxResults": 20,
"maxDurationMinutes": 120,
"maxFileSizeMb": 100,
"includeMetadataJson": false
}

Output fields

One dataset row is produced per audio track. The row includes the original YouTube URL, audio format, saved file details, status, and a timestamp. When metadata embedding is on, the saved file also includes ID3 tags and thumbnail cover art.

FieldTypeMeaning
videoUrlstringOriginal YouTube URL submitted or expanded from a playlist
canonicalUrlstring or nullCanonical webpage URL returned by the extractor
videoIdstring or nullYouTube video ID
titlestring or nullVideo or track title
artiststring or nullUploader or channel name
channelUrlstring or nullUploader or channel URL
durationSecondsnumber or nullTrack duration in seconds
viewCountnumber or nullView count at extraction time
uploadDatestring or nullUpload date in YYYYMMDD format when available
thumbnailstring or nullThumbnail URL, embedded as cover art when tagging is on
audioFormatstringOutput audio format used for the track
bitrateKbpsnumber or nullTarget bitrate for lossy formats
fileKeystring or nullKey-value store key for the saved audio file
downloadUrlstring or nullDirect link to the saved audio file
routestring or nullHow the audio was fetched: direct, proxy, or signed-link
fileNamestring or nullSaved file name
fileExtensionstring or nullSaved file extension
fileSizeBytesnumber or nullSaved file size in bytes
contentTypestring or nullMIME type used when saving the file
metadataKeystring or nullKey-value store key for raw video metadata JSON when enabled
statusstringsuccess, skipped (too long or too large), or failed
errorstring or nullPlain explanation when a track was skipped or failed
scrapedAtstringISO 8601 timestamp for the record

Illustrative output record

{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"canonicalUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"videoId": "dQw4w9WgXcQ",
"title": "Example Track Title",
"artist": "Example Channel",
"channelUrl": "https://www.youtube.com/@examplechannel",
"durationSeconds": 212,
"viewCount": 123456,
"uploadDate": "20061025",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"audioFormat": "mp3",
"bitrateKbps": 192,
"fileKey": "audio-dQw4w9WgXcQ-example-track-title.mp3",
"downloadUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/audio-dQw4w9WgXcQ-example-track-title.mp3",
"route": "proxy",
"fileName": "example-track-title.mp3",
"fileExtension": "mp3",
"fileSizeBytes": 3456789,
"contentType": "audio/mpeg",
"metadataKey": "metadata-dQw4w9WgXcQ.json",
"status": "success",
"scrapedAt": "2026-07-01T12:34:56.000Z"
}

How it works

This Actor reads each video once, then extracts the audio and transcodes it into the format and bitrate you choose. It first tries a free direct connection; YouTube usually blocks data center addresses, so it then switches to a fresh residential proxy session, retrying on up to three fresh sessions. If all are blocked, it can fall back to a backup link route when one is available. When metadata embedding is on, it writes ID3 tags including title, artist, and upload date, and embeds the thumbnail as cover art. Each saved track is stored in Apify key-value storage, and a dataset row is written for each track. Optional cookies.txt content can be supplied for sessions that need your authorized YouTube access.

Pricing

This Actor uses Pay per event plus Apify platform usage.

PlanAudio file saved
Free, Bronze$0.012
Silver$0.011
Gold and higher$0.010

A tiny start fee ($0.00005) applies once per run. Failed, skipped, too-long, and invalid URLs are never charged for the file event. The live Pricing tab always shows the current numbers.

Cost example (measured, Free plan): a 19-second clip costs $0.012 for the file plus about $0.009 platform usage, roughly $0.021 in total. A 3.7-minute song costs $0.012 plus about $0.037 platform usage (about 3.6 MB of audio through a residential proxy at roughly $8 per GB, plus a little compute), roughly $0.049 in total. With sourceQuality: light the same song moves about half the traffic, so platform usage drops to about $0.02 and the total to about $0.032. Ten short clips cost roughly $0.21.

Use with AI agents (MCP)

This Actor is usable through Apify MCP as a structured tool for authorized YouTube audio conversion. It returns compact dataset rows and storage keys that agents can read directly, then hand off to transcription, analysis, or archival steps.

Tool description: Convert YouTube video or playlist URLs into one audio record per track, save the audio files in Apify key-value storage, and return MCP-ready dataset rows with track metadata, file keys, and status.

Actor identity: khadinakbar/youtube-to-mp3-downloader

Convert the YouTube URLs I provide into MP3 files, keep the result under 20 tracks, and return the dataset rows with fileKey, title, artist, and status so I can route each saved file into transcription next.

Output interpretation:

  • Read one dataset row per track.
  • Use status to route each row into the next step.
  • Use fileKey (or downloadUrl) to fetch the saved audio from key-value storage.
  • Use videoUrl, videoId, title, and artist for provenance and tracking.
  • Use metadataKey when includeMetadataJson is enabled and you need the full video metadata JSON.
  • Use downloadUrl to fetch the audio file directly.
  • Use maxResults to bound the number of saved-track events in a run.
  • Use includePlaylist when the URL you supply is a specific playlist you want expanded track by track.
  • The dataset is paginated through the Apify Dataset API, and the key-value store can be read directly from the returned storage keys.
  • Cost guidance: each successfully saved track maps to the Audio file saved event ($0.012 on the Free plan), plus Apify platform usage of about $0.01 to $0.04 per track.

Apify API example

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("khadinakbar/youtube-to-mp3-downloader").call(run_input={
"videoUrls": [
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
],
"audioFormat": "mp3",
"audioBitrate": "192",
"embedMetadata": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["title"], item["fileKey"], item["status"])

Best results and outcome guidance

  • Use full YouTube URLs for the videos or playlist entries you want converted.
  • Keep includePlaylist off for a single track, and turn it on for a specific playlist URL when you want every track in that playlist.
  • Use maxResults to shape the total number of saved tracks in a run.
  • Choose audioFormat based on your downstream step: mp3 for broad compatibility, m4a or opus for efficient lossy audio, and wav or flac for lossless output.
  • Leave embedMetadata on when you want ID3 tags and thumbnail cover art embedded into the file.
  • Add includeMetadataJson when you need raw metadata for audits or richer downstream processing.
  • Supply cookiesTxt only for sessions you are allowed to use, such as authorized access to age-restricted or members-only content. Some media-stream requests require YouTube access proof even when metadata is public; the Actor works within YouTube access controls, so permitted access (rather than a generated PO token or proxy rotation) is what opens those streams.

Continue the workflow

Design note

I found that the dataset contract includes fileName, fileExtension, contentType, and metadataKey alongside fileKey, which makes the saved audio and optional metadata easy to route separately in automation.

FAQ

When should I use this Actor instead of a channel scraper?
Use it when your next step is audio extraction from a specific YouTube video or playlist URL, not channel discovery or keyword search.

Can I process a playlist in one run?
Yes. Set includePlaylist to true and provide a playlist URL. maxResults caps the total number of saved tracks in that run.

Which output fields are most useful for agents?
title, artist, audioFormat, downloadUrl, fileKey, status, and error are the most direct for routing, while videoId, uploadDate, and thumbnail add context. The run output (OUTPUT) also carries a plain-language agentSummary.

Can I save just part of a video?
Yes. Set startSeconds and endSeconds. The full video is still read, but the saved file contains only that part.

Why does a song cost more than a short clip?
Platform usage follows the audio size because the audio is fetched through a residential proxy. Use sourceQuality: light for speech and lectures to cut that part by about half.

What if YouTube asks for sign-in?
The track is retried on a fresh residential session. If every route is blocked, the row shows access_proof_required and is not charged. You can supply cookiesTxt only from an account that is allowed to view the media.

Does it download video or subtitles?
No. This Actor produces audio only. For video use All-in-One Media Downloader or Facebook Video Downloader; for captions use Video Subtitle Extractor or YouTube Transcript and Subtitle Data Scraper; for Shorts metadata use YouTube Shorts Scraper.

How can I connect this with a channel workflow?
Use YouTube Channel Videos Scraper -- Metadata & Metrics to collect a set of video URLs first, then send the selected URLs into this downloader.

What if I need raw metadata too?
Turn on includeMetadataJson and the Actor stores the full video metadata JSON in key-value storage for each successful track.

Responsible use

Respect copyright, YouTube's terms and any rights-holder requirements when you download and use audio.