{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Scraper",
    "description": "Scrape Spotify play counts, streams, monthly listeners, followers, world rank, top cities, and biographies. Six modes: artist, track, album, playlist, search, and playlist discovery (find playlists by keyword with save counts). 180+ markets: K-pop, J-pop, Latin, Afrobeats. $2.79/1K on Starter.",
    "version": "0.0",
    "x-build-id": "ksBJ2gR835UvsalI6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~spotify-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-spotify-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/sourabhbgp~spotify-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-spotify-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/sourabhbgp~spotify-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-spotify-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "artist",
              "track",
              "album",
              "playlist",
              "search",
              "playlistDiscovery"
            ],
            "type": "string",
            "description": "What to scrape. Spotify links decide their own type; this mode applies to bare IDs and to search. 'Playlist discovery' finds playlists by keyword, one row each, with their save count and owner.",
            "default": "artist"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of results. 0 = unlimited. Artist/track/album/playlist: entities scraped. Search: items per category (up to 50). Playlist discovery: playlists returned.",
            "default": 50
          },
          "spotifyUrls": {
            "title": "Spotify URLs or IDs",
            "type": "array",
            "description": "Spotify URLs, URIs, or raw IDs. Examples: https://open.spotify.com/artist/3TVXtAsR1Inumwj472S9r4, spotify:artist:3TVXtAsR1Inumwj472S9r4, or just 3TVXtAsR1Inumwj472S9r4",
            "items": {
              "type": "string"
            }
          },
          "includeDiscography": {
            "title": "Include artist discography",
            "type": "boolean",
            "description": "For artist mode: include full album, single, compilation, and popular-release lists in output. Default: off (returns counts only).",
            "default": false
          },
          "searchTerm": {
            "title": "Search term",
            "type": "string",
            "description": "Keyword for Search mode. (Playlist discovery uses Search terms below; if those are empty, this one is used.)"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to find playlists with, e.g. indie rock, chill indie, alt rock 2025. Each keyword returns up to about 1,000 playlists; different keywords mostly find different ones.",
            "items": {
              "type": "string"
            }
          },
          "minSaves": {
            "title": "Minimum saves",
            "minimum": 0,
            "type": "integer",
            "description": "Only return playlists with at least this many saves. 0 returns every playlist found. You are only charged for playlists that pass.",
            "default": 0
          },
          "excludeSpotifyOwned": {
            "title": "Skip Spotify-owned playlists",
            "type": "boolean",
            "description": "Leave out playlists run by Spotify itself (its editorial, algorithmic, genre and chart playlists), keeping only those run by people and brands.",
            "default": false
          },
          "excludePlaylistIds": {
            "title": "Skip these playlists",
            "type": "array",
            "description": "Playlist URLs or IDs you already have. They are skipped and never charged. Paste the spotifyId column from earlier runs to only get new playlists.",
            "items": {
              "type": "string"
            }
          },
          "searchLanguages": {
            "title": "Search languages",
            "type": "array",
            "description": "Optional. Repeat every keyword in these Spotify languages. Each language can add more playlists; how many varies a lot by keyword (from a handful to a few hundred). Leave empty to search once in the default language.",
            "items": {
              "type": "string",
              "enum": [
                "en",
                "es",
                "pt",
                "fr",
                "de",
                "it",
                "nl",
                "sv",
                "pl",
                "tr",
                "ru",
                "ar",
                "hi",
                "id",
                "ja",
                "ko",
                "zh"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "Portuguese",
                "French",
                "German",
                "Italian",
                "Dutch",
                "Swedish",
                "Polish",
                "Turkish",
                "Russian",
                "Arabic",
                "Hindi",
                "Indonesian",
                "Japanese",
                "Korean",
                "Chinese"
              ]
            }
          },
          "searchCountries": {
            "title": "Search countries",
            "maxItems": 10,
            "type": "array",
            "description": "Optional. Repeat every keyword as if searching from these countries. Spotify shows a different mix of playlists in each country, so each one usually adds new playlists. A playlist found in several countries is returned and charged once, and lists every country that found it. Each country adds run time. Leave empty to search once from where the scraper runs, currently the United States. Up to 10 countries.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "CA",
                "GB",
                "IE",
                "AU",
                "NZ",
                "MX",
                "BR",
                "AR",
                "CL",
                "CO",
                "PE",
                "DE",
                "FR",
                "ES",
                "IT",
                "NL",
                "BE",
                "SE",
                "NO",
                "DK",
                "FI",
                "PL",
                "PT",
                "AT",
                "CH",
                "TR",
                "ZA",
                "IN",
                "ID",
                "PH",
                "JP",
                "KR"
              ],
              "enumTitles": [
                "United States",
                "Canada",
                "United Kingdom",
                "Ireland",
                "Australia",
                "New Zealand",
                "Mexico",
                "Brazil",
                "Argentina",
                "Chile",
                "Colombia",
                "Peru",
                "Germany",
                "France",
                "Spain",
                "Italy",
                "Netherlands",
                "Belgium",
                "Sweden",
                "Norway",
                "Denmark",
                "Finland",
                "Poland",
                "Portugal",
                "Austria",
                "Switzerland",
                "Turkey",
                "South Africa",
                "India",
                "Indonesia",
                "Philippines",
                "Japan",
                "South Korea"
              ]
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}