{
  "openapi": "3.0.1",
  "info": {
    "title": "All-in-One Spotify Scraper & Downloader 🔥",
    "description": "🎵 Scrape albums, tracks, artists, playlists + download music. 99% success rate with dual modes (Fast & Accurate). 7 audio formats, 4 bitrates, advanced filters & 13 audio metrics. Professional-grade tool for music analysis & archiving! 🚀Ultimate Spotify Scraper & Downloader - 6-in-1 powerhouse! 🎵",
    "version": "1.0",
    "x-build-id": "4zWNVSd1AIkiNQ2d1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapearchitect~all-in-one-spotify-scraper-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapearchitect-all-in-one-spotify-scraper-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/scrapearchitect~all-in-one-spotify-scraper-downloader/runs": {
      "post": {
        "operationId": "runs-sync-scrapearchitect-all-in-one-spotify-scraper-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/scrapearchitect~all-in-one-spotify-scraper-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-scrapearchitect-all-in-one-spotify-scraper-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": [
          "operationMode",
          "searchMode"
        ],
        "properties": {
          "operationMode": {
            "title": "🎯 Operation Mode",
            "enum": [
              "scrape_albums",
              "scrape_tracks",
              "scrape_artists",
              "scrape_playlists",
              "download_music_fast",
              "download_music_accurate"
            ],
            "type": "string",
            "description": "**Fast Mode**: Direct streaming links (video with audio + audio-only). Fast results but some links may expire or not work (70-80% success rate). No format/quality customization.\n\n**Accurate Mode**: Downloads and uploads files to Apify storage. Slow but 99% success rate. Full control over audio format (MP3, M4A, OPUS), video format (MP4, WebM, MKV), and quality. Supports FFmpeg conversion.",
            "default": "scrape_tracks"
          },
          "searchMode": {
            "title": "🔍 Search Mode",
            "enum": [
              "keyword",
              "urls",
              "both"
            ],
            "type": "string",
            "description": "Search by keywords, URLs, or both",
            "default": "both"
          },
          "keywords": {
            "title": "🔑 Search Keywords",
            "type": "array",
            "description": "Enter keywords to search (genre, artist name, track name, etc.)",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "🌐 Spotify URLs",
            "type": "array",
            "description": "Provide direct Spotify URLs (albums, tracks, artists, or playlists depending on operation mode)",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "🎯 Max Results per Keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items to return per keyword search (no limit)",
            "default": 4
          },
          "fetchDetails": {
            "title": "🔍 Fetch Full Details",
            "type": "boolean",
            "description": "When enabled, fetches comprehensive details per result via additional API calls (track listings, followers, play counts, artist overviews). Provides richer data but takes significantly longer for large result sets. When disabled (default), returns search-only data for maximum speed.",
            "default": false
          },
          "advancedFilters": {
            "title": "🔧 Advanced Filters",
            "type": "object",
            "description": "Apply advanced filters to refine your results",
            "properties": {
              "minDurationSeconds": {
                "type": "integer",
                "title": "Minimum Duration (seconds)",
                "description": "Filter tracks/albums with duration greater than or equal to this value in seconds",
                "minimum": 0
              },
              "maxDurationSeconds": {
                "type": "integer",
                "title": "Maximum Duration (seconds)",
                "description": "Filter tracks/albums with duration less than or equal to this value in seconds",
                "minimum": 0
              },
              "releaseDateFrom": {
                "type": "string",
                "title": "Release Date From (YYYY-MM-DD)",
                "description": "Filter items released on or after this date (format: YYYY-MM-DD, e.g., 2020-01-01)",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "releaseDateTo": {
                "type": "string",
                "title": "Release Date To (YYYY-MM-DD)",
                "description": "Filter items released on or before this date (format: YYYY-MM-DD, e.g., 2024-12-31)",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "explicitContent": {
                "type": "string",
                "title": "Explicit Content Filter",
                "description": "Filter by explicit content: 'all' (no filter), 'explicit_only' (only explicit), 'non_explicit_only' (no explicit content)",
                "enum": [
                  "all",
                  "explicit_only",
                  "non_explicit_only"
                ]
              },
              "albumType": {
                "type": "string",
                "title": "Album Type Filter (for albums)",
                "description": "Filter albums by type: 'album' (full albums), 'single' (singles), 'compilation' (compilations), 'any' (all types)",
                "enum": [
                  "any",
                  "album",
                  "single",
                  "compilation"
                ]
              }
            }
          },
          "sortBy": {
            "title": "📊 Sort Results By",
            "enum": [
              "relevance",
              "playcount_desc",
              "playcount_asc",
              "release_date_desc",
              "release_date_asc",
              "duration_desc",
              "duration_asc",
              "name_asc",
              "name_desc"
            ],
            "type": "string",
            "description": "Choose how to sort the results",
            "default": "relevance"
          },
          "trackLimit": {
            "title": "🎵 Tracks per Album/Playlist",
            "minimum": 0,
            "type": "integer",
            "description": "Number of tracks to retrieve per album/playlist. Use 0 to fetch all available tracks across paginated detail requests.",
            "default": 0
          },
          "albumLimit": {
            "title": "💿 Albums/Releases per Artist",
            "minimum": 0,
            "type": "integer",
            "description": "Number of albums/releases to extract per artist. Use 0 to include all releases returned for that artist.",
            "default": 10
          },
          "includeAudioMetadata": {
            "title": "🎵 Include Audio Metadata (for download modes)",
            "type": "boolean",
            "description": "Include detailed audio metadata (codec, bitrate, sample rate, filesize, etc.)",
            "default": true
          },
          "includeVideoMetadata": {
            "title": "🎬 Include Video Metadata (for download modes)",
            "type": "boolean",
            "description": "Include detailed video metadata (resolution, fps, codec, bitrate, filesize, etc.)",
            "default": true
          },
          "includeRelatedArtists": {
            "title": "👥 Include Related Artists",
            "type": "boolean",
            "description": "Include related artists and 'fans also like' section",
            "default": true
          },
          "includeTopTracks": {
            "title": "🔥 Include Top Tracks",
            "type": "boolean",
            "description": "Include artist's top tracks",
            "default": true
          },
          "downloadQuality": {
            "title": "🎧 Download Quality (for download modes)",
            "enum": [
              "320",
              "256",
              "192",
              "128"
            ],
            "type": "string",
            "description": "Audio quality for downloads",
            "default": "320"
          },
          "audioFormat": {
            "title": "🎵 Audio Format (Accurate Mode only)",
            "enum": [
              "mp3",
              "m4a",
              "opus",
              "ogg",
              "aac",
              "flac",
              "wav"
            ],
            "type": "string",
            "description": "Choose audio file format. MP3 = Universal compatibility. M4A = Better quality at same bitrate. OPUS = Best compression. OGG = Open source. AAC = Apple devices.",
            "default": "mp3"
          },
          "videoFormat": {
            "title": "🎬 Video Format (Accurate Mode only)",
            "enum": [
              "mp4",
              "webm",
              "mkv",
              "avi"
            ],
            "type": "string",
            "description": "Choose video file format. MP4 = Universal compatibility. WebM = Open source, smaller size. MKV = Supports all codecs. AVI = Legacy support.",
            "default": "mp4"
          },
          "videoQuality": {
            "title": "📺 Video Quality (Accurate Mode only)",
            "enum": [
              "360p",
              "480p",
              "720p"
            ],
            "type": "string",
            "description": "Video resolution with audio included. All qualities include audio track (merged using FFmpeg if needed). 360p recommended for faster uploads. Higher quality = larger files = slower upload.",
            "default": "360p"
          },
          "maxConcurrency": {
            "title": "⚙️ Max Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of concurrent requests (1-50)",
            "default": 10
          },
          "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 — Spotify sees your requests as coming from this location.\n\n⭐ US recommended — widest catalog and most reliable.\n\nIf results are empty, try switching to US. If US still returns empty, it is a script or API issue — create an issue for confirmation.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}