{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Scraper - Artists, Playlists & Podcasts",
    "description": "Scrape Spotify artists, tracks, albums, playlists, and podcasts from URLs or search. Get monthly listeners, play counts, discography, and change monitoring — no API key or login.",
    "version": "1.0",
    "x-build-id": "A0iccezRggvzjErxX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/valev-lab~spotify-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-valev-lab-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/valev-lab~spotify-scraper/runs": {
      "post": {
        "operationId": "runs-sync-valev-lab-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/valev-lab~spotify-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-valev-lab-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": [
              "urls",
              "search"
            ],
            "type": "string",
            "description": "Choose URLs to scrape specific Spotify links, or Search to find tracks, artists, albums, playlists, shows, or episodes by keyword.",
            "default": "urls"
          },
          "urls": {
            "title": "Spotify URLs / URIs",
            "type": "array",
            "description": "Spotify URLs to scrape: open.spotify.com (including /intl-xx/), spotify:type:id URIs, or spotify.link short links. Supported types: artist, album, track, playlist, show, episode.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Spotify when mode is Search. Pair with searchType (tracks, artists, albums, playlists, shows, episodes).",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "tracks",
              "artists",
              "albums",
              "playlists",
              "shows",
              "episodes"
            ],
            "type": "string",
            "description": "Result shelf to collect in search mode. Shows and episodes are supported.",
            "default": "tracks"
          },
          "maxResults": {
            "title": "Max results per search term",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound of search hits to return per term.",
            "default": 50
          },
          "enrichSearchResults": {
            "title": "Enrich search results",
            "type": "boolean",
            "description": "When enabled, fetch full details for each search hit. Each enriched record is charged as a normal item.",
            "default": false
          },
          "maxPlaylistTracks": {
            "title": "Max playlist tracks",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum playlist tracks to paginate. Use 0 for all available tracks.",
            "default": 1000
          },
          "includeDiscography": {
            "title": "Include artist discography",
            "type": "boolean",
            "description": "For artists, also emit album records for every release (with per-track play counts). Each album is charged separately.",
            "default": false
          },
          "discographyTypes": {
            "title": "Discography types",
            "type": "array",
            "description": "Which release shelves to expand when includeDiscography is enabled.",
            "items": {
              "type": "string",
              "enum": [
                "albums",
                "singles",
                "compilations"
              ],
              "enumTitles": [
                "Albums",
                "Singles",
                "Compilations"
              ]
            },
            "default": [
              "albums",
              "singles",
              "compilations"
            ]
          },
          "maxEpisodesPerShow": {
            "title": "Max episodes per show",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How many episodes to attach on show records. Use 0 to skip episode listing.",
            "default": 50
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Optional key that enables change tracking across runs via a named key-value store (spotify-monitor-<key>)."
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Locale hint passed to Spotify where supported (for example en, de).",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Parallel entity / search-term workers.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for outbound requests. Prefer Apify Proxy (automatic group). The Actor can escalate to RESIDENTIAL on blocks; if proxy access fails it continues without a proxy.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}