{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Scraper",
    "description": "Scrape Spotify albums, tracks, artists and playlists with full metadata: popularity, genres, available markets, ISRC/UPC, followers, tracklists, cover art and audio previews. Works out of the box; add free Spotify API credentials for keyword search and complete metadata.",
    "version": "0.0",
    "x-build-id": "RqtyMa4AL1tVnmPD9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unfenced-group~spotify-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unfenced-group-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/unfenced-group~spotify-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unfenced-group-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/unfenced-group~spotify-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unfenced-group-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": {
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword(s) to search Spotify (e.g. \"the weeknd\", \"blinding lights\"). Requires API credentials below. Leave empty to scrape specific URLs/IDs.",
            "default": ""
          },
          "entityTypes": {
            "title": "What to search for",
            "type": "array",
            "description": "Which catalogue types to return when searching by keyword (API mode).",
            "items": {
              "type": "string",
              "enum": [
                "album",
                "track",
                "artist",
                "playlist"
              ],
              "enumTitles": [
                "Albums",
                "Tracks",
                "Artists",
                "Playlists"
              ]
            },
            "default": [
              "album",
              "track"
            ]
          },
          "startUrls": {
            "title": "Spotify URLs",
            "type": "array",
            "description": "Spotify URLs or URIs to scrape directly — albums, tracks, artists or playlists. Works in both modes. Example: https://open.spotify.com/album/4yP0hdKOZPNshxUOjY0cZj or spotify:track:0VjIjW4GlUZAMYd2vXMi3b",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "spotifyIds": {
            "title": "Spotify IDs / URIs",
            "type": "array",
            "description": "Spotify IDs or URIs to scrape directly. URIs (spotify:album:ID) are preferred over bare IDs because bare IDs don't carry the entity type.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items to return.",
            "default": 10
          },
          "market": {
            "title": "Market",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "NL",
              "ES",
              "IT",
              "SE",
              "BR",
              "MX",
              "CA",
              "AU",
              "JP",
              "IN",
              "KR",
              "ID",
              "PH",
              "AR",
              "PL",
              "TR",
              "ZA",
              "NG",
              "AE"
            ],
            "type": "string",
            "description": "ISO country market for availability, playability and market-specific catalogue (API mode).",
            "default": "US"
          },
          "includeTracklist": {
            "title": "Include tracklists",
            "type": "boolean",
            "description": "Fetch full tracklists for albums and playlists (API mode). Each track includes title, artists, duration, explicit flag and preview. Adds requests per album/playlist.",
            "default": false
          },
          "expandArtistAlbums": {
            "title": "Expand artists to albums",
            "type": "boolean",
            "description": "When an artist is found, also scrape that artist's albums and singles (API mode).",
            "default": false
          },
          "includeArtistStats": {
            "title": "Include artist stats (monthly listeners, world rank)",
            "type": "boolean",
            "description": "For artists, fetch monthly listeners, follower count, world rank, top listener cities, top tracks with exact play counts, biography, verified status and related artists. Works in both modes — no credentials needed. Pulled from Spotify's internal data, the same numbers the Spotify app shows.",
            "default": false
          },
          "filterTypes": {
            "title": "Keep only these types",
            "type": "array",
            "description": "Post-filter: keep only items of these types.",
            "items": {
              "type": "string",
              "enum": [
                "album",
                "track",
                "artist",
                "playlist"
              ],
              "enumTitles": [
                "Albums",
                "Tracks",
                "Artists",
                "Playlists"
              ]
            },
            "default": []
          },
          "explicitFilter": {
            "title": "Explicit content",
            "enum": [
              "all",
              "clean",
              "explicit"
            ],
            "type": "string",
            "description": "Restrict to clean or explicit items only.",
            "default": "all"
          },
          "genres": {
            "title": "Genres",
            "type": "array",
            "description": "Filter by genre (substring match, case-insensitive — e.g. \"pop\", \"hip hop\"). Genres are available on albums and artists in API mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPopularity": {
            "title": "Minimum popularity",
            "type": "integer",
            "description": "Only items with Spotify popularity (0-100) at least this value (API mode)."
          },
          "releasedAfter": {
            "title": "Released after",
            "type": "string",
            "description": "Only items released on or after this date (YYYY-MM-DD).",
            "default": ""
          },
          "releasedBefore": {
            "title": "Released before",
            "type": "string",
            "description": "Only items released on or before this date (YYYY-MM-DD).",
            "default": ""
          },
          "includeMedia": {
            "title": "Include media",
            "type": "boolean",
            "description": "Include cover art images and audio preview URLs.",
            "default": true
          },
          "clientId": {
            "title": "Spotify Client ID",
            "type": "string",
            "description": "Your Spotify app Client ID. Get one free at developer.spotify.com/dashboard. Required for keyword search and full metadata (popularity, genres, markets, ISRC/UPC, followers). Without it the actor runs in embed mode (URLs/IDs only).",
            "default": ""
          },
          "clientSecret": {
            "title": "Spotify Client Secret",
            "type": "string",
            "description": "Your Spotify app Client Secret. Stored encrypted. Used only for the client-credentials token request."
          },
          "useProxy": {
            "title": "Use proxy",
            "type": "boolean",
            "description": "Route requests through Apify Proxy. Off by default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}