# Spotify Music MP3 Downloader (`easyapi/spotify-music-mp3-downloader`)

Easily download your favorite tracks in high quality. With batch downloading capabilities and comprehensive data retrieval, you'll enhance your music library effortlessly! 🎵

- **URL**: https://beta-securitybyobscurity.apify.com/easyapi/spotify-music-mp3-downloader.md
- **Developed by:** [EasyApi](https://beta-securitybyobscurity.apify.com/easyapi) (community)
- **Categories:** Social media, Integrations
- **Stats:** 113 total users, 12 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 4.72 out of 5 stars

## Pricing

$9.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

# README

### 🎵 Spotify Music MP3 Downloader

Effortlessly download your favorite tracks with our **Spotify Music MP3 Downloader**! This Apify actor allows you to input multiple Spotify track links and retrieve high-quality MP3 files for your listening pleasure.

#### 🌟 Key Features

- **Batch Downloading**: Input multiple Spotify track links to download songs in bulk.
- **High-Quality MP3**: Get access to high-quality MP3 files of your favorite tracks.

#### 🛠️ Data Fields Returned

The downloader retrieves a comprehensive set of fields for each track, including:

- **url**: Spotify URL for the track.
- **result**:
  - **url**: Unique track identifier.
  - **title**: Title of the track.
  - **thumbnail**: URL to the album art or thumbnail image.
  - **duration**: Length of the track (if available).
  - **medias**: An array of media objects containing:
    - **url**: Direct link to the MP3 stream.
    - **quality**: Quality of the audio (e.g., "audio").
    - **extension**: File extension (e.g., "mp3").
    - **type**: Type of media (e.g., "audio").
  - **type**: Type of content (e.g., "single").
  - **error**: Indicates if there was an error during retrieval (boolean).

#### 🚀 Why Choose Our Downloader?

- **Convenient and Fast**: Quickly download multiple tracks without hassle.
- **User-Friendly Interface**: Designed to be intuitive, making it easy for anyone to use.
- **Quality Assurance**: Ensure you get high-quality audio files for your music library.

#### Input

A full explanation of an input example in JSON.

```
{
  "links": [
      "https://open.spotify.com/track/7Mu0u7u2e0eOiAvMfEr2A7",
      "https://open.spotify.com/track/5G2f63n7IPVPPjfNIGih7Q"
  ]
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
  {
    "url": "https://open.spotify.com/track/7Mu0u7u2e0eOiAvMfEr2A7",
    "result": {
      "url": "https://open.spotify.com/track/7Mu0u7u2e0eOiAvMfEr2A7",
      "title": "Japoni (Feat. Camin, Moncho Chavea, Jthyago & Samueliyo Baby)",
      "thumbnail": "https://i.scdn.co/image/ab67616d0000b2732b856322329a6edaff940f42",
      "duration": "",
      "medias": [
        {
          "url": "https://cdn2.meow.gs/api/stream?id=zx1hqofHwlPsaAsb7XlMA&exp=1727057947359&sig=FDgE0ZSj8aSb2qa9Md6ULnqqyOvLfKoLoNenjEbSroI&sec=p46gzD-8V9YIqdggj1rul1Jje3jrBitvPYk98G3RDxg&iv=C2o2dKm2kP_rouyhfI7F_w",
          "quality": "audio",
          "extension": "mp3",
          "type": "audio"
        }
      ],
      "type": "single",
      "error": false
    }
  },
  {
    "url": "https://open.spotify.com/track/5G2f63n7IPVPPjfNIGih7Q",
    "result": {
      "url": "https://open.spotify.com/track/5G2f63n7IPVPPjfNIGih7Q",
      "title": "Taste",
      "thumbnail": "https://i.scdn.co/image/ab67616d0000b273fd8d7a8d96871e791cb1f626",
      "duration": "",
      "medias": [
        {
          "url": "https://cdn4.meow.gs/api/stream?id=0dSpLL-akvBUf0O5fX4kK&exp=1727057950139&sig=obdaYoR6-DrXPBnB_lqvvhUA4ndT0R3EHjuVa3uiy5Q&sec=jC0jWWCoiwH-o9GLhCII5gfjv5YFptBQc3brusqXhHA&iv=to3XkIHX0MJzRLnMO9nBYA",
          "quality": "audio",
          "extension": "mp3",
          "type": "audio"
        }
      ],
      "type": "single",
      "error": false
    }
  }
]
```

# Actor input Schema

## `links` (type: `array`):

An array of URLs to process

## `proxyConfiguration` (type: `object`):

Optionally, use Apify Proxy or custom HTTP proxy to avoid IP address-based blocking.

## Actor input object example

```json
{
  "links": [
    "https://open.spotify.com/track/7Mu0u7u2e0eOiAvMfEr2A7"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/spotify-music-mp3-downloader").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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call easyapi/spotify-music-mp3-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=easyapi/spotify-music-mp3-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spotify Music MP3 Downloader",
        "description": "Easily download your favorite tracks in high quality. With batch downloading capabilities and comprehensive data retrieval, you'll enhance your music library effortlessly! 🎵",
        "version": "0.0",
        "x-build-id": "w6eTrmIaPV3VEGWch"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/easyapi~spotify-music-mp3-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-easyapi-spotify-music-mp3-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/easyapi~spotify-music-mp3-downloader/runs": {
            "post": {
                "operationId": "runs-sync-easyapi-spotify-music-mp3-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/easyapi~spotify-music-mp3-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-easyapi-spotify-music-mp3-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "links"
                ],
                "properties": {
                    "links": {
                        "title": "Links",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "An array of URLs to process",
                        "default": [
                            "https://open.spotify.com/track/7Mu0u7u2e0eOiAvMfEr2A7"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Optionally, use Apify Proxy or custom HTTP proxy to avoid IP address-based blocking.",
                        "default": {
                            "useApifyProxy": false,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
