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, 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
Maintained by CommunityActor stats
0
Bookmarked
15
Total users
9
Monthly active users
12 days ago
Last modified
Categories
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
| Field | Type | Default | Purpose |
|---|---|---|---|
videoUrls | array | required | Full YouTube video or playlist URLs to convert to audio |
audioFormat | string | mp3 | Output format: mp3, m4a, opus, wav, or flac |
audioBitrate | string | 192 | Bitrate for lossy formats: suitable, 320, 256, 192, or 128 |
embedMetadata | boolean | true | Writes ID3 tags and embeds thumbnail cover art |
includePlaylist | boolean | false | Expands playlist URLs |
maxResults | integer | 20 | Caps total tracks saved in one run |
maxDurationMinutes | integer | 120 | Skips videos longer than the chosen duration threshold |
maxFileSizeMb | integer | 100 | Skips tracks whose final audio file exceeds the size cap |
includeMetadataJson | boolean | false | Saves raw yt-dlp metadata JSON |
cookiesTxt | string (secret) | empty | Optional Netscape cookies.txt content for authorized YouTube sessions |
proxyConfiguration | object | Residential | Proxy 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.
| Field | Type | Meaning |
|---|---|---|
videoUrl | string | Original YouTube URL submitted or expanded from a playlist |
canonicalUrl | string or null | Canonical webpage URL returned by yt-dlp |
videoId | string or null | YouTube video ID |
title | string or null | Video or track title |
artist | string or null | Uploader or channel name |
channelUrl | string or null | Uploader or channel URL |
durationSeconds | number or null | Track duration in seconds |
viewCount | number or null | View count at extraction time |
uploadDate | string or null | Upload date in YYYYMMDD format when available |
thumbnail | string or null | Thumbnail URL, embedded as cover art when tagging is on |
audioFormat | string | Output audio format used for the track |
bitrateKbps | number or null | Target bitrate for lossy formats |
fileKey | string or null | Key-value store key for the saved audio file |
fileName | string or null | Saved file name |
fileExtension | string or null | Saved file extension |
fileSizeBytes | number or null | Saved file size in bytes |
contentType | string or null | MIME type used when saving the file |
metadataKey | string or null | Key-value store key for raw yt-dlp metadata JSON when enabled |
status | string | success, skipped, or incomplete |
scrapedAt | string | ISO 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, andstatusso I can route each saved file into transcription next.
Output interpretation:
- Read one dataset row per track.
- Use
statusto route each row into the next step. - Use
fileKeyto fetch the saved audio from key-value storage. - Use
videoUrl,videoId,title, andartistfor provenance and tracking. - Use
metadataKeywhenincludeMetadataJsonis enabled and you need the full yt-dlp metadata JSON. - Use
maxResultsto bound the number of saved-track events in a run. - Use
includePlaylistwhen 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 savedevent, while the run also includes actor start usage and Apify platform usage.
Apify API example
import osfrom apify_client import ApifyClientclient = 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
includePlaylistoff for a single track, and turn it on for a specific playlist URL when you want every track in that playlist. - Use
maxResultsto shape the total number of saved tracks in a run. - Choose
audioFormatbased on your downstream step:mp3for broad compatibility,m4aoropusfor efficient lossy audio, andwavorflacfor lossless output. - Leave
embedMetadataon when you want ID3 tags and thumbnail cover art embedded into the file. - Add
includeMetadataJsonwhen you need raw metadata for audits or richer downstream processing. - Supply
cookiesTxtonly 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
- Then use YouTube Transcript and Subtitle Data Scraper to collect Youtube record context for media identified with YouTube to MP3 Downloader.
- Then use YouTube Trending Videos Scraper to collect Youtube record context for media identified with YouTube to MP3 Downloader.
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.