# Youtube Music Downloader Pro (`xtech/youtube-music-downloader-pro`) Actor

YouTube Music Downloader Pro: bulk grab tracks & playlists as MP3 or MP4 from YouTube Music. Fast cloud actor, parallel downloads, auto metadata (title, artist, duration). Perfect for DJs, creators & offline listening. Try the ad-free HD converter now!

- **URL**: https://apify.com/xtech/youtube-music-downloader-pro.md
- **Developed by:** [Xtech](https://apify.com/xtech) (community)
- **Categories:** Videos, Automation, Jobs
- **Stats:** 7 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Music Downloader Pro 🎵

> Professional bulk downloader for YouTube Music - perfect for music lovers, DJs, content creators, and playlist curators

⚠️ **For regular YouTube videos (not music)**, please use our companion actor: [YouTube Video Downloader PRO](https://apify.com/xtech/youtube-video-downloader)

### 🎯 What You Get

- Download multiple YouTube Music tracks as **MP4 video** or **MP3 audio**
- Get concise metadata (title, artist/channel, duration, views, likes, upload date, thumbnail, download link)
- Optimized for high-quality audio and music content
- Bulk processing with up to 8 concurrent downloads
- High-quality downloads with music-optimized formats
- No limits on music downloads

### 🔧 Environment Variables

This actor requires the following environment variable to be set:

- **YOUTUBE_API_BASE_URL**: The base URL for the YouTube API service (required for security)

Make sure to set this environment variable before running the actor.

### 💡 Example Output

```json
{
  "url": "https://music.youtube.com/watch?v=B46hycmdEpQ",
  "video_id": "B46hycmdEpQ",
  "title": "The Weeknd – Baptized In Fear (97Kickstvr & ROUDS Remix)",
  "duration": 217,
  "uploader": "The Weeknd",
  "view_count": 1234567,
  "like_count": 98765,
  "upload_date": "20240314",
  "thumbnail": "https://i.ytimg.com/vi/B46hycmdEpQ/hqdefault.jpg",
  "download_url": "https://api.apify.com/v2/key-value-stores/<STORE_ID>/records/B46hycmdEpQ.mp4"
}
```

### ⚡ Quick Start

1. Paste your YouTube Music URLs
2. Choose **MP4** (video) or **MP3** (audio only)
3. Set how many tracks to download at once (1-8)
4. Run and get your downloads

### 📝 Simple Setup

**Download as MP4 Video:**

```json
{
  "urls": ["https://music.youtube.com/watch?v=dQw4w9WgXcQ"],
  "output_type": "mp4",
  "max_concurrent": 5
}
```

**Download as MP3 Audio:**

```json
{
  "urls": ["https://music.youtube.com/watch?v=dQw4w9WgXcQ"],
  "output_type": "mp3",
  "max_concurrent": 5
}
```

#### Parameters

- **urls**: List of YouTube Music URLs to download. Supports `music.youtube.com/watch?v=`, `/watch?v=`, and `youtu.be/` formats.
- **output_type**: `mp4` (video) or `mp3` (audio only). Default: `mp4`.
- **max_concurrent**: Maximum number of tracks to download simultaneously (1-8). Default: 5.

### 📊 Perfect For

| Music Lovers              | DJs & Producers       | Content Creators    |
| ------------------------- | --------------------- | ------------------- |
| Download favorite tracks  | Build music libraries | Create music videos |
| Backup playlists          | Archive DJ sets       | Podcast soundtracks |
| Offline music collections | Sample discovery      | Background music    |
| Create mixtapes           | Track analysis        | Music compilations  |

### 🚀 Use Cases

- **Music Collection**: Download your favorite YouTube Music tracks as MP3 for offline listening
- **DJ & Production**: Build comprehensive music libraries and sample collections
- **Content Creation**: Download background music and soundtracks for videos and podcasts
- **Playlist Backup**: Archive and backup your favorite YouTube Music playlists
- **Music Discovery**: Save discovered tracks and build personal music collections
- **Audio Extraction**: Convert music videos to audio-only files for music players

### 🔄 Related Apify Actors

**Need to download regular YouTube videos?** Use our companion actor:

🎥 **[YouTube Video Downloader PRO](https://apify.com/xtech/youtube-video-downloader)** - For all regular YouTube videos, live streams, and longer content

**Key differences:**

- **This actor (Music Pro)**: Optimized for music content from YouTube Music platform with MP3/MP4 options
- **Video Downloader PRO**: Designed for all YouTube videos including long-form content, live streams, and regular uploads

Ready to download YouTube Music tracks in bulk? Click "Try for free" to start!

# Actor input Schema

## `urls` (type: `array`):

Enter one or more YouTube Music URLs (or regular YouTube links pointing to music videos). Supported formats include:

- `https://music.youtube.com/watch?v=...`
- `https://www.youtube.com/watch?v=...`
- `https://youtu.be/...`

## `output_type` (type: `string`):

Choose whether to download the track as an MP4 video (default) or MP3 audio-only file.

## `max_concurrent` (type: `integer`):

Maximum number of tracks to download simultaneously.

## Actor input object example

```json
{
  "urls": [
    "https://music.youtube.com/watch?v=B46hycmdEpQ"
  ],
  "output_type": "mp4",
  "max_concurrent": 5
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://music.youtube.com/watch?v=B46hycmdEpQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtech/youtube-music-downloader-pro").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://music.youtube.com/watch?v=B46hycmdEpQ"] }

# Run the Actor and wait for it to finish
run = client.actor("xtech/youtube-music-downloader-pro").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://music.youtube.com/watch?v=B46hycmdEpQ"
  ]
}' |
apify call xtech/youtube-music-downloader-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtech/youtube-music-downloader-pro"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZRffwhvUnQqVZixRs/builds/2bHn63IgiAFqdTvT4/openapi.json
