# Spotify Tracks Search and Scraper 🎵 (`apiharvest/spotify-tracks-search-and-scraper`) Actor

🎵 Scrape Spotify tracks with play counts, content ratings, lyrics flags, disc/track numbers, preview playback, duration & full artist + album relationships. Enable Fetch Details to get artist bios, album track lists & more. Same complete data as real Spotify app — every field included ✨

- **URL**: https://apify.com/apiharvest/spotify-tracks-search-and-scraper.md
- **Developed by:** [APIHarvest](https://apify.com/apiharvest) (community)
- **Categories:** Automation, Developer tools, Social media
- **Stats:** 6 total users, 3 monthly users, 94.7% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 result scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 Tracks Scraper — Search & Scrape Complete Spotify Track Data | Best Spotify Scraper

### What is the Spotify Tracks Scraper?

The **Spotify Tracks Scraper** is a powerful, production-ready Apify actor built to search and scrape Spotify tracks at scale. Whether you need to collect Spotify track metadata for music research, playlist curation, competitive analysis, or data journalism, this Spotify tracks scraper handles it all — no Spotify API key, no login credentials, no developer account required.

Unlike the official Spotify Web API which imposes strict rate limits and requires OAuth authentication, this Spotify tracks scraper uses Spotify's internal API to extract rich, structured data from every Spotify track. The Spotify tracks scraper automatically handles token rotation, proxy management, and retry logic so you can focus on your data.

---

### How Does This Spotify Tracks Scraper Work?

This Spotify tracks scraper operates in **two modes** that are auto-detected from your input:

#### Mode 1: Search Spotify Tracks by Keyword

Enter one or more keywords and the Spotify tracks scraper will search Spotify's catalog, returning structured results for every matching Spotify track. You can search for song titles, artist names, album names, or any combination — the Spotify tracks scraper passes your query directly to Spotify's search engine.

**Example keywords:** `"Lose Yourself Eminem"`, `"lofi beats"`, `"Taylor Swift 2024"`, `"classical piano"`, `"K-pop newjeans"`

#### Mode 2: Scrape Specific Spotify Tracks by URI or URL

Already have Spotify track links? Paste them directly. The Spotify tracks scraper accepts both URI format (`spotify:track:4cOdK2wGLETKBW3PvgPWqT`) and URL format (`https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT`). Each Spotify track URI is resolved to its full metadata.

#### Auto-Detection

You don't need to choose a mode manually. The Spotify tracks scraper automatically detects what to do:

- **Fill Search Keywords** → Spotify tracks search mode activates
- **Fill Spotify Track URIs / URLs** → Spotify track details mode activates
- **Fill both** → The Spotify tracks scraper runs search first, then fetches details for the URIs — both in the same run

#### Detail Enrichment (Search Mode)

When searching, the Spotify tracks scraper returns basic search results by default. Enable **Fetch Full Track Details** to automatically enrich each search result with complete Spotify track metadata — the Spotify tracks scraper will call the detail API for every result.

---

### Input Configuration

| Field | Mode | Description | Default |
|-------|------|-------------|---------|
| **Search Keywords** | Search | One or more keywords to search Spotify tracks. Each keyword runs as a separate search query. | — |
| **Spotify Track URIs / URLs** | Details | One or more `spotify:track:ID` URIs or `https://open.spotify.com/track/ID` URLs | — |
| **Proxy Country** | Both | Residential proxy country (50+ available). US recommended for best Spotify tracks scraper results. | US |
| **Search Offset** | Search | Starting position for search pagination. Use to skip already-scraped Spotify tracks. | 0 |
| **Search Limit** | Search | Maximum number of Spotify tracks to return per keyword. | 30 |
| **Top Results Count** | Search | Number of top-ranked Spotify tracks in the results. | 20 |
| **Fetch Full Track Details** | Search | When ON, the Spotify tracks scraper enriches each search result with complete metadata. | OFF |

#### Understanding Filters & Toggles

| Toggle / Filter | Default | What Happens When ON | What You Miss When OFF |
|----------------|---------|---------------------|----------------------|
| **Fetch Full Track Details** | OFF | Each search result is enriched with complete metadata: play counts, content ratings (explicit/clean), lyrics availability, disc & track numbers, sharing info, and preview playback URL | You only get basic search data — track name, artist, album, duration, and URI. No play counts, no content ratings, no detailed metadata. |
| **Search Limit** | 30 | Controls how many track results you get per keyword. | — |
| **Search Offset** | 0 | Skip results for pagination. Set to 30 to get page 2. | — |
| **Top Results Count** | 20 | Spotify highlights its top-ranked matches separately. | — |

> **💡 Tip:** When using Track URIs/URLs (Get Details mode), full details are **always** fetched automatically — the Fetch Full Track Details toggle only applies to Search mode.

#### URL Validation

The Spotify tracks scraper validates every URI you provide. If you accidentally paste an album, artist, or playlist URI, the Spotify tracks scraper will skip it and log a helpful message telling you exactly which actor to use instead:

- `spotify:album:...` → "Use **Spotify Albums Scraper**"
- `spotify:artist:...` → "Use **Spotify Artists Scraper**"
- `spotify:playlist:...` → "Use **Spotify Playlists Scraper**"

---

### Output Data Format

Every Spotify track scraped by this Spotify tracks scraper is pushed as a structured JSON object to the Apify dataset. You can export in JSON, CSV, XML, Excel, or connect via the Apify API.

#### Search Result Example

```json
{
    "query": "Lose Yourself Eminem",
    "uri": "spotify:track:4cOdK2wGLETKBW3PvgPWqT",
    "name": "Lose Yourself - From '8 Mile' Soundtrack",
    "artists": [
        {"name": "Eminem", "uri": "spotify:artist:7dGJo4pcD2V6oG08qCgod6"}
    ],
    "album": {
        "name": "Curtain Call: The Hits",
        "uri": "spotify:album:71xFWYFtiHC8eP0dOgQKlr"
    },
    "duration": {"totalMilliseconds": 326133},
    "playcount": "1234567890",
    "contentRating": {"label": "EXPLICIT"}
}
````

#### Full Detail Example (Get Details mode or Fetch Details ON)

```json
{
    "uri": "spotify:track:4cOdK2wGLETKBW3PvgPWqT",
    "name": "Lose Yourself - From '8 Mile' Soundtrack",
    "artists": [
        {
            "name": "Eminem",
            "uri": "spotify:artist:7dGJo4pcD2V6oG08qCgod6",
            "profile": {"name": "Eminem"}
        }
    ],
    "albumOfTrack": {
        "name": "Curtain Call: The Hits",
        "uri": "spotify:album:71xFWYFtiHC8eP0dOgQKlr",
        "coverArt": {"sources": [{"url": "https://i.scdn.co/image/..."}]},
        "date": {"year": 2005}
    },
    "duration": {"totalMilliseconds": 326133},
    "playcount": "1234567890",
    "contentRating": {"label": "EXPLICIT"},
    "trackNumber": 14,
    "discNumber": 1,
    "isPlayable": true,
    "hasLyrics": true
}
```

***

### Step-by-Step Tutorial

#### How to Search Spotify Tracks

1. Go to the **Spotify Tracks Scraper** actor page on Apify
2. Enter your keywords in the **Search Keywords** field — e.g., `"Eminem"`, `"lofi hip hop"`, `"BTS butter"`
3. Set **Proxy Country** to US (recommended)
4. Adjust **Search Limit** if you want more or fewer Spotify tracks per keyword
5. (Optional) Turn on **Fetch Full Track Details** for enriched data
6. Set your **spending limit** and click **Start**
7. Download results from the Dataset tab in JSON, CSV, or Excel format

#### How to Scrape Specific Spotify Tracks

1. Collect Spotify track URIs or URLs from Spotify (right-click a song → Share → Copy Spotify URI)
2. Paste them into the **Spotify Track URIs / URLs** field
3. Set **Proxy Country** to US
4. Click **Start**
5. Each Spotify track URI is resolved to full metadata

***

### Common Use Cases for This Spotify Scraper (Tracks)

#### Music Market Research

Search and scrape thousands of Spotify tracks to analyze trends, popular genres, release patterns, and streaming metrics. The Spotify tracks scraper gives you raw data for market intelligence dashboards and reports.

#### Playlist Curation & Automation

Find Spotify tracks matching specific criteria (genre, mood, era) and export structured data to build or manage playlists programmatically. The Spotify tracks scraper helps curators discover tracks faster.

#### Academic Research

Researchers studying music consumption, cultural trends, or recommendation algorithms can use this Spotify tracks scraper to collect large-scale Spotify track datasets for analysis and modeling.

#### Data Journalism

Journalists covering the music industry can scrape Spotify track metadata to support data-driven stories with real streaming numbers and release data.

#### Competitive Analysis for Labels & Artists

Labels and artists can use the Spotify tracks scraper to monitor competitor releases, track popularity trends, and benchmark performance across genres and markets.

#### Machine Learning & AI Training Data

Feed Spotify track metadata into ML models for genre classification, popularity prediction, recommendation systems, or music information retrieval research. The Spotify tracks scraper outputs clean structured data ready for ML pipelines.

#### Music App Development

Developers building music-related apps can use the Spotify tracks scraper to populate databases, seed recommendation engines, or build search indexes.

***

### Why Choose This Spotify Scraper Over Others?

Most Spotify scrapers on Apify return incomplete or reformatted data — missing fields, simplified structures, or outdated endpoints. This spotify scraper is different. It delivers **every single data field** that Spotify provides internally — the exact same data the real Spotify app uses.

| Feature | This Spotify Scraper | Other Actors on Apify |
|---------|---------------------|----------------------|
| **Data completeness** | Every field Spotify returns — play counts, content ratings, lyrics availability, disc/track numbers, preview URLs, and full artist relationships | Partial data, missing key fields |
| **Authentication** | No API key, no login, no developer account | Often require Spotify API credentials |
| **Rate limits** | No limits — automatic token rotation | Restricted by official API quotas |
| **Data structure** | Raw Spotify format — identical to real Spotify app | Reformatted, simplified, or flattened |
| **Proxy support** | 50+ residential proxy countries | Limited or no proxy options |
| **Pricing** | Pay per result — you only pay for data delivered | Flat fees, subscriptions, or usage caps |
| **Reliability** | Auto-adapts to Spotify API changes — always up to date | Hardcoded endpoints that break on updates |

> **Bottom line:** If Spotify shows it, this spotify scraper extracts it. No other Spotify track actor on Apify gives you this level of complete, production-ready data.

### Frequently Asked Questions

**Q: Does this Spotify tracks scraper require a Spotify account or API key?**
A: No. This Spotify tracks scraper works completely without authentication. No Spotify developer account, no OAuth tokens, no API key needed.

**Q: Is there a limit on how many Spotify tracks I can scrape?**
A: There is no hard limit. The Spotify tracks scraper processes as many Spotify tracks as your spending limit allows. Set your budget and the Spotify tracks scraper stops automatically when reached.

**Q: What happens if a Spotify track URI is invalid?**
A: The Spotify tracks scraper validates URIs and skips invalid ones with a clear log message. If you paste an album or artist URI instead of a Spotify track URI, it tells you which actor to use.

**Q: Can I run this Spotify tracks scraper on a schedule?**
A: Yes. Use Apify's scheduling feature to run the Spotify tracks scraper daily, weekly, or at any interval to monitor new releases or track changes over time.

**Q: What output formats does the Spotify tracks scraper support?**
A: JSON, CSV, XML, Excel, and direct API access via the Apify Dataset API. You can also integrate with Google Sheets, Slack, email, and more using Apify integrations.

**Q: How fast is this Spotify tracks scraper?**
A: Search mode is fast — seconds to tens of seconds per keyword. Get Details mode processes each Spotify track sequentially with automatic retries, typically a few seconds per Spotify track.

**Q: Can I scrape Spotify track lyrics?**
A: The Spotify tracks scraper returns a `hasLyrics` boolean flag indicating whether lyrics exist. Full lyric text is not available through Spotify's internal API.

**Q: What if the Spotify tracks scraper fails or returns errors?**
A: The Spotify tracks scraper has built-in retry logic and graceful error handling. If a single Spotify track fails, the remaining Spotify tracks continue processing. Check the actor log for detailed error messages.

**Q: Can I combine search and URI scraping in one run?**
A: Yes. Fill both Search Keywords and Spotify Track URIs — the Spotify tracks scraper runs search first, then fetches details for the URIs.

**Q: What's the difference between this and the Spotify Search actor?**
A: This Spotify tracks scraper is specialized for tracks only, with URI-based detail fetching and detail enrichment features. The Spotify Search actor supports all 9 content types but is search-only.

***

### Integrations

Connect the Spotify tracks scraper output to your favorite tools:

- **Google Sheets** — Auto-export Spotify track data to spreadsheets
- **Slack / Discord** — Get notifications when the Spotify tracks scraper finishes
- **Webhooks** — Trigger custom workflows with Spotify track data
- **Zapier / Make** — Connect to 5000+ apps
- **REST API** — Access Spotify tracks scraper results programmatically via the Apify API
- **Python / Node.js clients** — Use the Apify SDK to integrate the Spotify tracks scraper into your code

***

### Related Spotify Scrapers by apiharvest

| Actor | Description |
|-------|-------------|
| [Spotify Albums Scraper](https://apify.com/apiharvest/spotify-albums-search-and-scraper) | Search & scrape Spotify album metadata with track listings |
| [Spotify Artists Scraper](https://apify.com/apiharvest/spotify-artists-search-and-scraper) | Search & scrape Spotify artist profiles, discography, related artists |
| [Spotify Playlists Scraper](https://apify.com/apiharvest/spotify-playlists-search-and-scraper) | Search & scrape Spotify playlists with full track listings |
| [Spotify Genres Scraper](https://apify.com/apiharvest/spotify-genres-search-and-scraper) | Search & browse Spotify genre/mood pages with sections |
| [Spotify Audiobooks Scraper](https://apify.com/apiharvest/spotify-audiobooks-search-and-scraper) | Search & scrape Spotify audiobooks with chapter listings |
| [Spotify Episodes Scraper](https://apify.com/apiharvest/spotify-episodes-search-and-scraper) | Search & scrape Spotify podcast episodes with recommendations |
| [Spotify Podcasts Scraper](https://apify.com/apiharvest/spotify-podcasts-search-and-scraper) | Search & scrape Spotify podcasts/shows with episode listings |
| [Spotify Users Scraper](https://apify.com/apiharvest/spotify-users-search-and-profile-scraper) | Search & scrape Spotify user profiles with playlists |
| [Spotify Search — All Types](https://apify.com/apiharvest/spotify-search-all-types) | Search all 9 Spotify content types in one actor |
| [Spotify Scraper — Get Full Details](https://apify.com/apiharvest/spotify-scraper-get-full-details) | Get full details for 8 Spotify content types from URIs |

***

### 🏷️ Keywords

spotify scraper, spotify track scraper, scrape spotify tracks, spotify data extractor, spotify music scraper, spotify track data, apify spotify, spotify api alternative, best spotify scraper

# Actor input Schema

## `keyword` (type: `array`):

One or more search terms to find tracks on Spotify. Each keyword runs as a separate search.

💡 Leave empty and fill Spotify URIs below to use Get Details mode instead.

## `spotifyUris` (type: `array`):

One or more Spotify track URIs or URLs to fetch full metadata.
Examples: spotify:track:ID · https://open.spotify.com/track/ID

⚠️ Only track URIs/URLs are accepted. Other types (albums, artists, etc.) will be skipped.
💡 Leave empty and fill Search Keywords above to use Search mode instead.

## `proxyCountry` (type: `string`):

Residential proxy exit country. ⭐ US recommended — widest catalog.
If results are empty, switch to US.

## `tracks_search_offset` (type: `integer`):

Starting position for search pagination. 0 = first page.
📌 Only used in Search mode (when keywords are provided).

## `tracks_search_limit` (type: `integer`):

Maximum number of track results to return per keyword.

## `tracks_search_numberOfTopResults` (type: `integer`):

Number of top-ranked items highlighted in the response.

## `tracks_fetchDetails` (type: `boolean`):

📌 Search mode only — when using Track URIs/URLs, full details are always fetched automatically.

✅ When ON — runs getTrack for every search result. You get: play counts, content ratings (explicit/clean), lyrics availability, disc & track numbers, sharing info, preview playback URL, and full artist + album relationships.

❌ When OFF — you only get basic search data: track name, artist name, album name, duration, and URI. You will NOT get play counts, content ratings, or any detailed metadata.

⚠️ Slower — one extra API call per search result

## Actor input object example

```json
{
  "keyword": [
    "Rock",
    "Sun"
  ],
  "spotifyUris": [
    "spotify:track:0VjIjW4GlUZAMYd2vXMi3b",
    "https://open.spotify.com/track/7KA4W4McWYRpgf0fWsJZWB"
  ],
  "proxyCountry": "US",
  "tracks_search_offset": 0,
  "tracks_search_limit": 10,
  "tracks_search_numberOfTopResults": 10,
  "tracks_fetchDetails": false
}
```

# 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 = {
    "keyword": [
        "Rock",
        "Sun"
    ],
    "spotifyUris": [
        "spotify:track:0VjIjW4GlUZAMYd2vXMi3b",
        "https://open.spotify.com/track/7KA4W4McWYRpgf0fWsJZWB"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apiharvest/spotify-tracks-search-and-scraper").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 = {
    "keyword": [
        "Rock",
        "Sun",
    ],
    "spotifyUris": [
        "spotify:track:0VjIjW4GlUZAMYd2vXMi3b",
        "https://open.spotify.com/track/7KA4W4McWYRpgf0fWsJZWB",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("apiharvest/spotify-tracks-search-and-scraper").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 '{
  "keyword": [
    "Rock",
    "Sun"
  ],
  "spotifyUris": [
    "spotify:track:0VjIjW4GlUZAMYd2vXMi3b",
    "https://open.spotify.com/track/7KA4W4McWYRpgf0fWsJZWB"
  ]
}' |
apify call apiharvest/spotify-tracks-search-and-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apiharvest/spotify-tracks-search-and-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spotify Tracks Search and Scraper 🎵",
        "description": "🎵 Scrape Spotify tracks with play counts, content ratings, lyrics flags, disc/track numbers, preview playback, duration & full artist + album relationships. Enable Fetch Details to get artist bios, album track lists & more. Same complete data as real Spotify app — every field included ✨",
        "version": "0.0",
        "x-build-id": "jmmRpY132xhZz0Tx1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apiharvest~spotify-tracks-search-and-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apiharvest-spotify-tracks-search-and-scraper",
                "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/apiharvest~spotify-tracks-search-and-scraper/runs": {
            "post": {
                "operationId": "runs-sync-apiharvest-spotify-tracks-search-and-scraper",
                "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/apiharvest~spotify-tracks-search-and-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-apiharvest-spotify-tracks-search-and-scraper",
                "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": {
                    "keyword": {
                        "title": "🔍 Search Keyword(s)",
                        "type": "array",
                        "description": "One or more search terms to find tracks on Spotify. Each keyword runs as a separate search.\n\n💡 Leave empty and fill Spotify URIs below to use Get Details mode instead.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "spotifyUris": {
                        "title": "🔗 Spotify Track URIs / URLs",
                        "type": "array",
                        "description": "One or more Spotify track URIs or URLs to fetch full metadata.\nExamples: spotify:track:ID · https://open.spotify.com/track/ID\n\n⚠️ Only track URIs/URLs are accepted. Other types (albums, artists, etc.) will be skipped.\n💡 Leave empty and fill Search Keywords above to use Search mode instead.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyCountry": {
                        "title": "🌐 Proxy Country",
                        "enum": [
                            "US",
                            "GB",
                            "AU",
                            "CA",
                            "DE",
                            "FR",
                            "NL",
                            "IT",
                            "ES",
                            "SE",
                            "NO",
                            "DK",
                            "FI",
                            "BE",
                            "AT",
                            "CH",
                            "IE",
                            "PL",
                            "PT",
                            "CZ",
                            "HU",
                            "RO",
                            "GR",
                            "BG",
                            "HR",
                            "SK",
                            "RS",
                            "JP",
                            "KR",
                            "SG",
                            "HK",
                            "TW",
                            "TH",
                            "MY",
                            "ID",
                            "PH",
                            "VN",
                            "IN",
                            "BR",
                            "MX",
                            "AR",
                            "CL",
                            "CO",
                            "PE",
                            "ZA",
                            "NG",
                            "KE",
                            "EG",
                            "SA",
                            "AE",
                            "TR",
                            "IL",
                            "UA",
                            "RU",
                            "BY"
                        ],
                        "type": "string",
                        "description": "Residential proxy exit country. ⭐ US recommended — widest catalog.\nIf results are empty, switch to US.",
                        "default": "US"
                    },
                    "tracks_search_offset": {
                        "title": "📄 Search Offset",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Starting position for search pagination. 0 = first page.\n📌 Only used in Search mode (when keywords are provided).",
                        "default": 0
                    },
                    "tracks_search_limit": {
                        "title": "📊 Search Limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of track results to return per keyword.",
                        "default": 10
                    },
                    "tracks_search_numberOfTopResults": {
                        "title": "🏆 Top Results Count",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of top-ranked items highlighted in the response.",
                        "default": 10
                    },
                    "tracks_fetchDetails": {
                        "title": "🔄 Fetch Full Track Details",
                        "type": "boolean",
                        "description": "📌 Search mode only — when using Track URIs/URLs, full details are always fetched automatically.\n\n✅ When ON — runs getTrack for every search result. You get: play counts, content ratings (explicit/clean), lyrics availability, disc & track numbers, sharing info, preview playback URL, and full artist + album relationships.\n\n❌ When OFF — you only get basic search data: track name, artist name, album name, duration, and URI. You will NOT get play counts, content ratings, or any detailed metadata.\n\n⚠️ Slower — one extra API call per search result",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
