Youtube To mp3 (Youtube Downloader) With yt-dlp avatar

Youtube To mp3 (Youtube Downloader) With yt-dlp

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Youtube To mp3 (Youtube Downloader) With yt-dlp

Youtube To mp3 (Youtube Downloader) With yt-dlp

Fast And Updated Youtube Video Download API

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Daniel Georgiev

Daniel Georgiev

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Categories

Share

Youtube To mp3

Download YouTube videos to mp3 using yt-dlp and receive a public download URL for every downloaded mp3.

This Actor downloads videos in MP3 format, uploads them to the Actor's default Key-Value Store, and returns a direct public URL that can be shared or downloaded.

Get your first mp3

HTML Demo

YouTube Downloader YouTube Downloader

Open Interactive Demo

Apify MCP demo with ChatGPT

Install the Apify MCP plugin

Enable developer mode

Install Apify MCP plugin

Execute the actor

Open a new chat and prompt something like this

run my apify actor danng/youtube-to-mp3-youtube-downloader-with-yt-dlp --input '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }'
give me the downloadUrl as clickable link here in the chat
also show me html of the downloadUrl as audio tag

Pass the croissants

To pass the croissants you can use plain_text_url.

Make it a file and place all needed things

Then

run danng/youtube-to-mp3-youtube-downloader-with-yt-dlp with url https://www.youtube.com/watch?v=w15oWDh02K4
plain_content_url https://mywebsite.com/my_url_with_something
give me the result as json if it has downloadUrl as link and also as html with audio tag

In chat results

Same thing with Claude, Grok and other AI chatbots

With cURL

curl -s -X POST "https://api.apify.com/v2/acts/danng~youtube-to-mp3-youtube-downloader-with-yt-dlp/run-sync-get-dataset-items?token=YOUR_API_TOKEN" -H "Content-Type: application/json" -d "{\"url\":\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"}"

Replace YOUR_API_TOKEN with your api token apify_api_asdfg...etc

On Windows

Run in Powershell

Install Apify

irm https://apify.com/install-cli.ps1 | iex

Login

apify login

Open the .mp4 in browser

Start-Process ((echo '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}' | apify call danng/youtube-to-mp4-youtube-downloader-with-yt-dlp --silent --output-dataset | ConvertFrom-Json)[0].downloadUrl)

Features

  • Download one or multiple YouTube videos
  • Supports public and age-restricted videos
  • Optional cookies support
  • Outputs MP4 files
  • Returns public download URLs
  • Simple JSON input
  • Open source

Input

Basic example

{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}

Object format

{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}

With cookies

{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"cookies": "# Netscape HTTP Cookie File\n.youtube.com\tTRUE\t/\tTRUE\t2147483647\tSID\t..."
}

Input fields

FieldTypeRequiredDescription
urlStringYesYouTube URL
cookiesStringNoContents of a Netscape cookie file. Useful for age-restricted, private, members-only, or region-restricted videos.

Output

Successful download:

{
"success": true,
"sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"downloadUrl": "https://api.apify.com/v2/key-value-stores/.../records/audio.mp3",
"filename": "video.mp4"
}

Failed download:

{
"success": false,
"url": "https://www.youtube.com/watch?v=...",
"error": "Video unavailable"
}

How it works

  1. Reads one or more YouTube URLs.
  2. Optionally loads the provided cookies.
  3. Downloads the video using yt-dlp.
  4. Uploads the resulting MP4 file to the Actor's default Key-Value Store.
  5. Returns a public download URL.

Supported URLs

  • Standard YouTube videos
  • youtu.be short links
  • YouTube Shorts
  • Individual playlist video URLs

API Example

curl -X POST \
"https://api.apify.com/v2/acts/danng~youtube-to-mp3-youtube-downloader-with-yt-dlp/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'

1 line

$curl -s -X POST "https://api.apify.com/v2/acts/danng~youtube-to-mp3-youtube-downloader-with-yt-dlp/run-sync-get-dataset-items?token=YOUR_API_TOKEN" -H "Content-Type: application/json" -d "{\"url\":\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"}"

Notes

  • Audios are downloaded using yt-dlp.
  • Each downloaded file is uploaded to the Actor's Key-Value Store.
  • The returned downloadUrl is a public URL to the uploaded file.
  • Some videos may require valid cookies for access.

Limitations

  • Download availability depends on YouTube and yt-dlp.
  • Private, members-only, age-restricted, or region-restricted videos require appropriate cookies.
  • Network speed and source availability affect download time.

Disclaimer

Use this Actor only to download content that you have permission to access. You are responsible for complying with YouTube's Terms of Service and all applicable copyright laws.