YouTube to MP3 Downloader avatar

YouTube to MP3 Downloader

Pricing

from $20.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 $20.00 / 1,000 audio file saveds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

15

Total users

9

Monthly active users

12 days ago

Last modified

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, then saves one audio record per track to Apify key-value storage and returns MCP-ready JSON. Each dataset row represents one track and includes useful fields such as title, artist, durationSeconds, audioFormat, bitrateKbps, fileKey, fileName, status, and scrapedAt.

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: suitable, 320, 256, 192, or 128
embedMetadatabooleantrueWrites ID3 tags and embeds thumbnail cover art
includePlaylistbooleanfalseExpands playlist URLs
maxResultsinteger20Caps total tracks saved in one run
maxDurationMinutesinteger120Skips videos longer than the chosen duration threshold
maxFileSizeMbinteger100Skips tracks whose final audio file exceeds the size cap
includeMetadataJsonbooleanfalseSaves raw yt-dlp 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 yt-dlp
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
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 yt-dlp metadata JSON when enabled
statusstringsuccess, skipped, or incomplete
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",
"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 uses yt-dlp and ffmpeg to extract audio from the URLs you provide, then transcodes each track into the format and bitrate you choose. 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 concise dataset row is written for each track. Residential proxies are the default network option, and 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. The primary billed event is Audio file saved, and a run also includes actor start usage. Open the live Pricing tab on Apify for the current event costs and platform charges.

Example in words: if a run saves three tracks, the event-based part of billing reflects three saved audio events plus the run start, and Apify platform compute and proxy usage are billed separately according to your account settings and the live Pricing tab.

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 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 yt-dlp metadata JSON.
  • 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, while the run also includes actor start usage and Apify platform usage.

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, fileKey, status, and scrapedAt are the most direct for routing, while videoId, uploadDate, and thumbnail add context.

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 yt-dlp 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.