{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Scraper — Tracks, Artists, Playlists, Charts",
    "description": "Fast, cheap, full-coverage Spotify scraper. 50+ data categories including tracks, artists, albums, playlists, concerts, charts (Top 200 / Viral), lyrics, credits, recommendations, AI insights. Pay-per-event — no monthly fee.",
    "version": "1.0",
    "x-build-id": "63QH4hZwnx2mLaMxb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eduair94~spotify-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eduair94-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/eduair94~spotify-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eduair94-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/eduair94~spotify-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eduair94-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",
        "required": [
          "mode",
          "category"
        ],
        "properties": {
          "mode": {
            "title": "Operation mode",
            "enum": [
              "get",
              "search",
              "chart"
            ],
            "type": "string",
            "description": "What to do with each input. 'get' — fetch a known Spotify entity by ID/URL. 'search' — search Spotify with keywords. 'chart' — fetch a chart (no input needed).",
            "default": "get"
          },
          "category": {
            "title": "Data category",
            "enum": [
              "track",
              "track_credits",
              "track_lyrics",
              "album",
              "album_tracks",
              "album_metadata",
              "artist",
              "artist_overview",
              "artist_albums",
              "artist_singles",
              "artist_appears_on",
              "artist_discovered_on",
              "artist_featuring",
              "artist_related",
              "artist_discography_overview",
              "playlist",
              "playlist_tracks",
              "user_profile",
              "user_followers",
              "recommendations",
              "partner_playlist",
              "partner_track",
              "partner_album",
              "partner_artist_overview",
              "partner_artist_discography",
              "concerts_by_location",
              "search_concert_locations",
              "search_multi",
              "search_tracks",
              "search_artists",
              "search_albums",
              "search_playlists",
              "search_users",
              "search_podcasts",
              "search_episodes",
              "search_genres",
              "search_top_results",
              "search_suggestions",
              "search_lyrics",
              "chart_top_200_tracks",
              "chart_viral_tracks",
              "chart_top_artists",
              "chart_top_albums",
              "chart_top_monthly_listeners",
              "chart_top_followers"
            ],
            "type": "string",
            "description": "Which data to extract. The category must match your 'mode'. 'get' supports all entity categories. 'search' supports search_* categories. 'chart' supports chart_* categories.",
            "default": "track"
          },
          "queries": {
            "title": "Input list (IDs, URLs, or keywords)",
            "uniqueItems": false,
            "type": "array",
            "description": "One input per line. For mode=get: Spotify ID, URI, or open.spotify.com URL. For mode=search: keywords. For mode=chart: leave empty.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For search/pagination categories. Ignored for single-entity 'get' calls.",
            "default": 50
          },
          "market": {
            "title": "Market (ISO 3166-1 alpha-2)",
            "type": "string",
            "description": "Country code for regional results (tracks, charts, concerts). Leave empty for global.",
            "default": "US"
          },
          "lyricsLanguage": {
            "title": "Lyrics translation language",
            "type": "string",
            "description": "ISO 639-1 language code for lyrics translation. Leave empty for original."
          },
          "chartDate": {
            "title": "Chart date (YYYY-MM-DD)",
            "type": "string",
            "description": "For chart_* categories. Leave empty for latest."
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of queries to process in parallel. Higher = faster but more load.",
            "default": 5
          },
          "delayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause between requests. Use 0 for max speed.",
            "default": 0
          },
          "includeRaw": {
            "title": "Include raw upstream payload",
            "type": "boolean",
            "description": "Attach the full raw JSON from Spotify under a 'raw' field. Off by default for slimmer output.",
            "default": false
          },
          "enrichWithContrast": {
            "title": "Cross-platform enrichment",
            "enum": [
              "",
              "ytmusic",
              "applemusic",
              "amazonmusic",
              "pandora",
              "gaana",
              "tencent"
            ],
            "type": "string",
            "description": "Attach equivalent data from another streaming platform. Optional.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional — upstream API already rotates proxies. Leave default unless debugging.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}