# Spotify Music Downloader (`automation-lab/spotify-music-downloader`) Actor

🎵 Convert public Spotify track links or artist-title searches into tagged MP3 files. Review transparent source-match diagnostics and download files from Apify storage. No API key or login required.

- **URL**: https://apify.com/automation-lab/spotify-music-downloader.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media, Integrations
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.53 / 1,000 mp3 track downloadeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

Spotify Music Downloader converts **public Spotify track links and song searches into tagged MP3 files**.
It resolves track metadata, ranks public audio sources, saves each file in Apify storage, and returns a clean dataset record with a direct download link.
No Spotify API key, YouTube API key, login, or browser automation is required.

> Download only music you own, public-domain music, Creative Commons music, or audio you are otherwise authorized to use.

### What does Spotify Music Downloader do?

Give the Actor an individual `open.spotify.com/track/...` URL or an `Artist - Title` search.
For each request, it:

- 🎵 reads public Spotify title, artist, album, year, artwork, and duration metadata when a Spotify URL is available;
- 🔎 searches a public audio source and scores candidates by title, artist, channel, and duration;
- 🛡️ rejects weak matches instead of silently returning an unrelated track;
- 🎧 converts the selected source to a 128, 192, or 320 kbps MP3;
- 🏷️ adds title, artist, album, and year ID3 metadata;
- 💾 saves the MP3 in the run key-value store;
- 📊 emits one dataset record with source diagnostics and the file URL.

The first release focuses on **individual tracks**.
It does not expand Spotify playlists or albums, access private libraries, or bypass DRM.

### Who is it for?

**Music archivers and collection owners**

- Recreate a personal backup from a short list of track links.
- Keep Spotify metadata beside each authorized audio file.
- Check match confidence before adding files to a collection.

**Video editors and creators**

- Prepare authorized tracks for an editing pipeline.
- Choose a predictable MP3 bitrate.
- Trigger downloads from an API, schedule, webhook, Make, or Zapier flow.

**Dataset and ML teams**

- Build a track-to-public-source mapping dataset.
- Collect normalized title, artist, duration, and match diagnostics.
- Store binary files separately from analysis-friendly dataset rows.

**Automation developers**

- Resolve small track lists without maintaining `yt-dlp`, FFmpeg, storage, and retries.
- Retrieve results through the Apify API.
- Connect the Actor to AI agents through MCP.

### Why use this Spotify MP3 downloader?

- ✅ **No API credentials** — public track metadata and source surfaces are used.
- ✅ **Fail-closed matching** — low-confidence candidates are skipped.
- ✅ **Transparent provenance** — see the selected title, channel, duration, URL, and score.
- ✅ **Tagged files** — MP3 metadata is added automatically.
- ✅ **Durable run storage** — every successful file receives a key and API URL.
- ✅ **Small safe defaults** — the prefilled run processes one track.
- ✅ **API ready** — call it from JavaScript, Python, cURL, webhooks, or MCP.
- ✅ **Bounded workload** — one run processes at most 10 individual tracks.

### What music data can you extract?

| Category | Fields | Description |
|---|---|---|
| Original request | `input` | Spotify URL or artist/title search supplied by the user |
| Spotify identity | `spotifyUrl`, `spotifyId` | Present only for a valid Spotify track URL |
| Track metadata | `title`, `artist`, `album`, `releaseYear` | Public metadata when available |
| Track media | `durationSeconds`, `artworkUrl` | Spotify duration and cover image URL |
| Source match | `matchedSource`, `matchedSourceUrl` | Selected public audio source |
| Match evidence | `matchedTitle`, `matchedChannel`, `matchScore` | Why this source was selected |
| Duration check | `sourceDurationSeconds` | Selected source duration |
| MP3 file | `format`, `bitrateKbps`, `fileSizeBytes` | Output file facts |
| Apify storage | `fileKey`, `downloadUrl` | Key-value store record and direct API link |
| Freshness | `processedAt` | ISO timestamp for the completed download |

Search-term inputs do not fabricate a Spotify ID.
Use a Spotify track URL when catalog identity and album metadata matter.

### How much does it cost to download Spotify tracks as MP3?

This Actor uses **pay per event** pricing.
You are charged once for each MP3 successfully saved with a dataset record.
Failed and rejected matches are not charged as tracks.

| Apify tier | Price per downloaded track |
|---|---:|
| Free | $0.0086809 |
| Starter / Bronze | $0.0075486 |
| Scale / Silver | $0.0058879 |
| Business / Gold | $0.0045292 |
| Platinum | $0.0030194 |
| Diamond | $0.0021136 |

The Apify Free plan includes monthly platform credits, so a small test run can normally be covered by those credits.
Final billing is visible before and after every run in Apify Console.

### How to download a Spotify track to MP3

1. Open **Spotify Music Downloader** in Apify Store.
2. Paste one public Spotify track URL into **Spotify track URLs**.
3. Keep **Maximum MP3 tracks** at `1` for the first run.
4. Select `192 kbps` for a practical quality and file-size balance.
5. Click **Start**.
6. Open the output dataset and review `matchScore` and `matchedSourceUrl`.
7. Open `downloadUrl` or find `fileKey` in the run key-value store.

A minimal input:

```json
{
  "trackUrls": [
    "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"
  ],
  "maxTracks": 1,
  "bitrate": "192",
  "matchThreshold": 0.68
}
````

A search input:

```json
{
  "searchTerms": [
    "Rick Astley - Never Gonna Give You Up"
  ],
  "maxTracks": 1,
  "bitrate": "128"
}
```

A small batch:

```json
{
  "trackUrls": [
    "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC",
    "https://open.spotify.com/track/7qiZfU4dY1lWllzX7mPBI3"
  ],
  "maxTracks": 2,
  "bitrate": "192",
  "matchThreshold": 0.75
}
```

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `trackUrls` | string array | one prefilled URL | Public Spotify **track** URLs; playlist and album URLs are rejected |
| `searchTerms` | string array | `[]` | Song searches, preferably formatted as `Artist - Title` |
| `maxTracks` | integer | `1` | Maximum unique requests processed; range 1–10 |
| `bitrate` | string | `"192"` | MP3 target bitrate: `128`, `192`, or `320` kbps |
| `matchThreshold` | number | `0.68` | Minimum accepted source-match score; range 0.5–1 |

At least one URL or search term is required.
Duplicate requests are removed before processing.
When both arrays are provided, URL requests are handled first until `maxTracks` is reached.

### Output example

```json
{
  "input": "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC",
  "title": "Never Gonna Give You Up",
  "artist": "Rick Astley",
  "album": "Whenever You Need Somebody",
  "releaseYear": 1987,
  "durationSeconds": 214,
  "artworkUrl": "https://i.scdn.co/image/example",
  "spotifyUrl": "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC",
  "spotifyId": "4uLU6hMCjMI75M1A2tKUQC",
  "matchedSource": "YouTube",
  "matchedSourceUrl": "https://www.youtube.com/watch?v=example",
  "matchedTitle": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "matchedChannel": "Rick Astley",
  "matchScore": 1,
  "sourceDurationSeconds": 214,
  "format": "mp3",
  "bitrateKbps": 192,
  "fileKey": "4uLU6hMCjMI75M1A2tKUQC-Rick_Astley_-_Never_Gonna_Give_You_Up.mp3",
  "fileSizeBytes": 5098123,
  "downloadUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/FILE_KEY",
  "processedAt": "2026-07-16T00:00:00.000Z"
}
```

Optional Spotify fields are omitted for plain-text searches.
Numeric durations, scores, bitrate, year, and file size remain numbers for easy filtering.

### Where are MP3 files stored?

Dataset rows contain metadata; the MP3 binary is saved in the run's **default key-value store**.
This keeps JSON/CSV exports lightweight while preserving a direct link to each audio file.

Use `fileKey` to locate a file in Apify Console.
Use `downloadUrl` to retrieve it through the Apify API.
Storage retention follows your Apify account and storage settings.
If a run's storage expires or is deleted, its old download links stop working.

### How source matching works

The Actor searches with artist, title, and an official-audio hint.
It then evaluates multiple candidates.

Positive evidence includes:

- matching title words;
- matching artist or channel words;
- close Spotify/source duration;
- official or Topic signals.

Negative evidence includes unexpected:

- covers;
- karaoke or instrumentals;
- reactions or tutorials;
- slowed, sped-up, or nightcore versions;
- live versions.

Raise `matchThreshold` when correctness matters more than coverage.
Always review the source URL before redistributing a file.

### Tips for best results

- 🎯 Prefer Spotify track URLs over searches for the richest metadata.
- ✍️ Format searches as `Artist - Exact Track Title`.
- 🔬 Start with one track and inspect the source diagnostics.
- 🛡️ Use `0.75` or higher for strict archival workflows.
- 🎧 Choose 128 kbps for smaller files, 192 kbps for balance, and 320 kbps only when needed.
- 📦 Split large personal lists into bounded runs of at most 10 tracks.
- 🔁 Retry later if YouTube temporarily throttles all safe candidates.
- 🧾 Keep evidence that you have permission to download and use the audio.

### Integrations and automation workflows

**Spotify Music Downloader → Google Drive**

Run a small approved track list, receive a webhook, download each `downloadUrl`, and copy the files into a controlled Drive folder.

**Spotify Music Downloader → Google Sheets**

Export dataset rows to compare requested tracks, matched sources, confidence scores, durations, and storage locations.

**Spotify Music Downloader → Slack or Discord**

Send a notification when a low match score needs human review before the file enters an editing workflow.

**Spotify Music Downloader → Make or Zapier**

Trigger the Actor from an authorized-content intake form, wait for completion, then route the resulting MP3 and metadata to your asset system.

**Scheduled runs and webhooks**

Use schedules for controlled recurring batches and webhooks for completion or failure handling.
Do not use schedules to repeatedly download files you do not have permission to use.

### API usage with JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/spotify-music-downloader').call({
  trackUrls: ['https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC'],
  maxTracks: 1,
  bitrate: '192',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].downloadUrl);
```

### Using the Apify API with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/spotify-music-downloader').call(run_input={
    'searchTerms': ['Rick Astley - Never Gonna Give You Up'],
    'maxTracks': 1,
    'bitrate': '128',
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items[0]['downloadUrl'])
```

### Using the Apify API with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~spotify-music-downloader/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "trackUrls": ["https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"],
    "maxTracks": 1,
    "bitrate": "192"
  }'
```

After the run succeeds, fetch its dataset items and follow each `downloadUrl`.
Keep your Apify token secret; never place it in a public script or repository.

### Use with AI agents via MCP

Spotify Music Downloader can be called by AI assistants through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

For Claude Code:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/spotify-music-downloader"
```

For Claude Desktop, Cursor, or VS Code, add this MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/spotify-music-downloader"
    }
  }
}
```

Example prompts:

- "Use automation-lab/spotify-music-downloader to download this authorized Spotify track as a 192 kbps MP3 and show me the match score."
- "Convert these three public-domain song searches to MP3 files and return a table of file links and source durations."
- "Download this track I own, but reject the result unless the source match score is at least 0.8."

OAuth connects the MCP server to your Apify account on first use.

### Legality and responsible downloading

The technology is neutral, but permission matters.
A Spotify link does not grant permission to copy, redistribute, monetize, or publicly perform a recording.
You are responsible for ensuring that your use complies with copyright law, licenses, platform terms, and local regulations.

Appropriate examples can include:

- music you created or own;
- public-domain recordings;
- Creative Commons material used within its license;
- recordings for which you obtained explicit download and processing permission.

The Actor does not log in to Spotify, access private libraries, decrypt Spotify streams, or bypass Spotify DRM.
It uses public metadata to identify a separately selected public source.

### Limitations

- Only individual Spotify track URLs and plain-text searches are supported in v1.
- Playlists, albums, podcasts, private libraries, and local Spotify files are not expanded.
- Search inputs may have no Spotify URL, ID, album, year, or artwork.
- Public audio availability varies by video, geography, age restriction, and rights holder.
- YouTube can throttle or require verification; the Actor retries conservatively.
- Source quality limits the real quality even when a higher MP3 bitrate is selected.
- ID3 title/artist/album/year tags are added; artwork embedding is not guaranteed.
- A run processes at most 10 tracks to bound runtime, bandwidth, and cost.

### Troubleshooting

**Why did the run say no safe source match?**

Use a valid Spotify track URL or a more specific `Artist - Title` query.
Lower `matchThreshold` only after checking that the best available source is actually correct.

**Why was a Spotify URL rejected?**

The URL must point to `/track/{22-character-id}`.
Playlist, album, episode, artist, and private URLs are outside v1 scope.

**Why did a matched source fail to download?**

The source may be geographically unavailable, age-restricted, removed, or temporarily protected by an anti-bot check.
The Actor tries several safe candidates and a bounded proxy fallback; retry later if every candidate is unavailable.

**Why is the download URL no longer available?**

The run key-value store may have expired or been deleted according to your Apify storage policy.
Copy authorized files to durable storage when long-term retention is required.

### FAQ

**How fast is one track?**

A typical track finishes in tens of seconds, depending on duration, source response time, conversion, and proxy fallback.
The default timeout is five minutes for the complete run.

**Do I need a Spotify or YouTube API key?**

No.
The Actor uses anonymously available metadata and public media extraction surfaces.

**Does this download audio directly from Spotify?**

No.
Spotify supplies public identification metadata; the Actor independently selects a public audio source and reports that source in every row.

**Can I download a playlist?**

Not in v1.
Expand and review authorized tracks yourself, then submit individual track URLs in batches of at most 10.

**Am I charged for rejected tracks?**

The per-track event is charged only after an MP3 and its dataset record are saved.
Platform billing details remain visible in Apify Console.

**Can the Actor guarantee the original master recording?**

No.
The match score and selected source fields make the decision auditable, but users should review results when exact master provenance matters.

### Other music and YouTube tools

- [Spotify Scraper](https://apify.com/automation-lab/spotify-scraper) — extract Spotify catalog metadata.
- [Spotify Songs Scraper](https://apify.com/automation-lab/spotify-songs-scraper) — collect song-oriented Spotify data.
- [YouTube Scraper](https://apify.com/automation-lab/youtube-scraper) — extract public YouTube video metadata.
- [YouTube Playlist Scraper](https://apify.com/automation-lab/youtube-playlist-scraper) — analyze playlist contents.
- [YouTube Channel Scraper](https://apify.com/automation-lab/youtube-channel-scraper) — collect channel and video data.
- [YouTube Transcript](https://apify.com/automation-lab/youtube-transcript) — retrieve video transcripts.
- [YouTube Comments Scraper](https://apify.com/automation-lab/youtube-comments-scraper) — collect comments for research.
- [YouTube Region Restriction Checker](https://apify.com/automation-lab/youtube-region-restriction-checker) — inspect regional availability.

### Responsible-use checklist

Before starting a run:

- \[ ] I own the recording or have permission to download it.
- \[ ] My intended storage, processing, and distribution follow the license.
- \[ ] I am using individual track scope rather than unauthorized bulk copying.
- \[ ] I will inspect source diagnostics when exact provenance matters.
- \[ ] I understand that deleting the run storage removes the MP3 link.

Spotify and YouTube are trademarks of their respective owners.
This Actor is an independent automation tool and is not endorsed by either service.

# Actor input Schema

## `trackUrls` (type: `array`):

Add public open.spotify.com/track links. Playlist and album links are rejected.

## `searchTerms` (type: `array`):

Enter one song per line, preferably as Artist - Title. Search results do not fabricate a Spotify ID.

## `maxTracks` (type: `integer`):

Limit how many unique inputs are processed. Start with one track to verify the workflow cheaply.

## `bitrate` (type: `string`):

Choose the target MP3 bitrate in kilobits per second. Source quality may be lower than the selected bitrate.

## `matchThreshold` (type: `number`):

Reject weak title/artist/duration matches instead of downloading likely-wrong audio. Raise for stricter matching.

## Actor input object example

```json
{
  "trackUrls": [
    "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"
  ],
  "searchTerms": [],
  "maxTracks": 1,
  "bitrate": "192",
  "matchThreshold": 0.68
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "trackUrls": [
        "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"
    ],
    "searchTerms": [],
    "maxTracks": 1,
    "bitrate": "192",
    "matchThreshold": 0.68
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/spotify-music-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 = {
    "trackUrls": ["https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"],
    "searchTerms": [],
    "maxTracks": 1,
    "bitrate": "192",
    "matchThreshold": 0.68,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/spotify-music-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 '{
  "trackUrls": [
    "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"
  ],
  "searchTerms": [],
  "maxTracks": 1,
  "bitrate": "192",
  "matchThreshold": 0.68
}' |
apify call automation-lab/spotify-music-downloader --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spotify Music Downloader",
        "description": "🎵 Convert public Spotify track links or artist-title searches into tagged MP3 files. Review transparent source-match diagnostics and download files from Apify storage. No API key or login required.",
        "version": "0.1",
        "x-build-id": "D59zFvpAUUkWv3eTL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~spotify-music-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-spotify-music-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/automation-lab~spotify-music-downloader/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-spotify-music-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/automation-lab~spotify-music-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-spotify-music-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",
                "properties": {
                    "trackUrls": {
                        "title": "🎵 Spotify track URLs",
                        "maxItems": 10,
                        "type": "array",
                        "description": "Add public open.spotify.com/track links. Playlist and album links are rejected.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerms": {
                        "title": "🔎 Artist and title searches",
                        "maxItems": 10,
                        "type": "array",
                        "description": "Enter one song per line, preferably as Artist - Title. Search results do not fabricate a Spotify ID.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "maxTracks": {
                        "title": "Maximum MP3 tracks",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Limit how many unique inputs are processed. Start with one track to verify the workflow cheaply.",
                        "default": 1
                    },
                    "bitrate": {
                        "title": "MP3 bitrate",
                        "enum": [
                            "128",
                            "192",
                            "320"
                        ],
                        "type": "string",
                        "description": "Choose the target MP3 bitrate in kilobits per second. Source quality may be lower than the selected bitrate.",
                        "default": "192"
                    },
                    "matchThreshold": {
                        "title": "Minimum source match score",
                        "minimum": 0.5,
                        "maximum": 1,
                        "type": "number",
                        "description": "Reject weak title/artist/duration matches instead of downloading likely-wrong audio. Raise for stricter matching.",
                        "default": 0.68
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
