{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Scraper – Play Counts & Monitoring",
    "description": "Search Spotify or scrape public artists, tracks, albums, playlists, podcasts, episodes, and user profiles. Extract play counts, monthly listeners, credits, full child collections, and monitor changes—without a Spotify API key or login. Independent tool; not affiliated with Spotify.",
    "version": "0.0",
    "x-build-id": "5bYyfKK52p8n4L1QN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapingmonkey~spotify-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapingmonkey-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/scrapingmonkey~spotify-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapingmonkey-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/scrapingmonkey~spotify-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapingmonkey-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"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "details",
              "monitor"
            ],
            "type": "string",
            "description": "Search the catalog, fetch rich details, or compare public entities with a previous named monitor snapshot.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "Keywords or phrases processed separately in search mode.",
            "items": {
              "type": "string"
            },
            "default": [
              "indie pop"
            ]
          },
          "entityTypes": {
            "title": "Search entity types",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Spotify entity collections searched for every term. maxResults applies separately to each selected type.",
            "items": {
              "type": "string",
              "enum": [
                "artist",
                "track",
                "album",
                "playlist",
                "show",
                "episode",
                "user"
              ],
              "enumTitles": [
                "Artists",
                "Tracks",
                "Albums",
                "Playlists",
                "Shows and podcasts",
                "Episodes",
                "Public users"
              ]
            },
            "default": [
              "artist",
              "track",
              "playlist"
            ]
          },
          "spotifyIds": {
            "title": "Spotify IDs, URLs, or URIs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Public Spotify entity URLs, spotify:type:id URIs, or bare IDs for details and monitor modes.",
            "items": {
              "type": "string"
            },
            "default": [
              "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
              "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M"
            ]
          },
          "entityType": {
            "title": "Bare ID entity type",
            "enum": [
              "auto",
              "artist",
              "track",
              "album",
              "playlist",
              "show",
              "episode",
              "user"
            ],
            "type": "string",
            "description": "Type assigned to bare references. Auto recognizes public usernames and probes catalog entity endpoints when needed; URLs and URIs already carry their type.",
            "default": "auto"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Search: maximum rows per term and selected entity type. Details/monitor: maximum child releases, tracks, playlists, or episodes per input.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of independent inputs, enrichments, and Spotify requests processed concurrently. Reduce this if the target starts rate-limiting a large run.",
            "default": 5
          },
          "market": {
            "title": "Spotify market and proxy country",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter country used for Spotify market filtering and mandatory Apify Residential Proxy routing.",
            "default": "US"
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Locale for localized public text, such as en-US, de-DE, or pt-BR.",
            "default": "en-US"
          },
          "includeDetails": {
            "title": "Enrich search results",
            "type": "boolean",
            "description": "Run details extraction for every search hit. This returns richer metrics and uses more requests.",
            "default": false
          },
          "includeTracks": {
            "title": "Include album and playlist tracks",
            "type": "boolean",
            "description": "Collect tracks for album and playlist details and monitoring.",
            "default": true
          },
          "includeDiscography": {
            "title": "Include artist discography",
            "type": "boolean",
            "description": "Paginate artist albums, singles, EPs, compilations, and appearances up to maxResults.",
            "default": true
          },
          "includeRelatedArtists": {
            "title": "Include related artists",
            "type": "boolean",
            "description": "Include Spotify's public related-artist collection for artist details.",
            "default": false
          },
          "includeCredits": {
            "title": "Include track credits",
            "type": "boolean",
            "description": "Collect performers, writers, producers, and engineering credits for track details.",
            "default": true
          },
          "includeEpisodes": {
            "title": "Include show episodes",
            "type": "boolean",
            "description": "Paginate public episodes for show details and monitoring up to maxResults.",
            "default": true
          },
          "includeUserPlaylists": {
            "title": "Include public user playlists",
            "type": "boolean",
            "description": "Paginate public playlists for user profile details up to maxResults.",
            "default": true
          },
          "includeUserArtists": {
            "title": "Include recently played user artists",
            "type": "boolean",
            "description": "Include publicly exposed recently played artists for user profile details, when Spotify makes them visible.",
            "default": true
          },
          "outputMode": {
            "title": "Child output mode",
            "enum": [
              "nested",
              "flat",
              "both"
            ],
            "type": "string",
            "description": "Nested keeps children inside parents, flat emits separate child entity rows, and both does both.",
            "default": "flat"
          },
          "monitorKey": {
            "title": "Monitor key",
            "minLength": 1,
            "maxLength": 80,
            "type": "string",
            "description": "Stable name for persistent snapshots shared by scheduled monitor runs.",
            "default": "spotify-monitor"
          },
          "emitOnlyChanges": {
            "title": "Monitor: emit only changes",
            "type": "boolean",
            "description": "Return change rows only. Disable to also emit the complete current entity rows on every monitor run.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}