{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Play Count Scraper: Streams for Tracks, Albums, Artists",
    "description": "Spotify play counts (stream counts) for every track of an artist's full discography, a playlist, an album or single tracks, plus monthly listeners. Paste URLs, no API key needed. Pay per result.",
    "version": "1.0",
    "x-build-id": "dArZ8HWnOFeztXUbw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eduair94~spotify-play-count-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eduair94-spotify-play-count-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-play-count-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eduair94-spotify-play-count-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-play-count-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eduair94-spotify-play-count-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Spotify URLs, URIs or IDs",
            "minItems": 1,
            "type": "array",
            "description": "One per line: track, album, artist or playlist links from open.spotify.com (spotify.link short links work too), spotify: URIs such as spotify:track:0VjIjW4GlUZAMYd2vXMi3b, or bare 22-character IDs. Mixed lists work: each line's type is detected from its URL or URI. A track returns its play count, an album or a playlist returns the play count of every track on it, and an artist returns the play counts of their top tracks or of their full discography (see Artists), with monthly listeners, followers and world rank.",
            "items": {
              "type": "string"
            }
          },
          "defaultType": {
            "title": "Type of bare IDs",
            "enum": [
              "track",
              "album",
              "artist",
              "playlist"
            ],
            "type": "string",
            "description": "How to read a bare 22-character ID that is not a URL or spotify: URI. URLs and URIs always use their own type, so for a list of links you can leave this as Track.",
            "default": "track"
          },
          "artistMode": {
            "title": "Artist results",
            "enum": [
              "topTracks",
              "fullDiscography"
            ],
            "type": "string",
            "description": "Top tracks: the artist's Spotify top tracks (usually 10), one request per artist. Full discography: every track of the artist's albums, singles and EPs, and compilations, newest release first, each with its album, label and release date.",
            "default": "topTracks"
          },
          "includeAlbums": {
            "title": "Albums",
            "type": "boolean",
            "description": "Full discography: read the artist's albums.",
            "default": true
          },
          "includeSingles": {
            "title": "Singles and EPs",
            "type": "boolean",
            "description": "Full discography: read the artist's singles and EPs.",
            "default": true
          },
          "includeCompilations": {
            "title": "Compilations",
            "type": "boolean",
            "description": "Full discography: read the artist's compilations.",
            "default": true
          },
          "maxReleasesPerArtist": {
            "title": "Max releases per artist",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Full discography: how many releases of the selected types to read per artist, newest first (up to 1,000). Every track on them is one result.",
            "default": 200
          },
          "dedupeTracks": {
            "title": "One result per song",
            "type": "boolean",
            "description": "Full discography: when the same recording is on several releases (the album, the single, a deluxe edition), Spotify counts its plays once and shows that same play count on each. On: the song is returned once, from its newest release, so stream totals are not counted twice. Off: every release's copy is returned (and charged).",
            "default": true
          },
          "includeArtistProfile": {
            "title": "Add an artist profile result",
            "type": "boolean",
            "description": "Artist inputs: one extra result per artist (rowType `artist`) with monthly listeners, followers, world rank, top cities, verified status, biography, social links and picture. It costs one result.",
            "default": false
          },
          "maxTracksPerAlbum": {
            "title": "Max tracks per album",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "For album inputs and each release of a full discography: how many tracks to return, in album order (up to 200). Each track is one result.",
            "default": 50
          },
          "maxTracksPerPlaylist": {
            "title": "Max tracks per playlist",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "For playlist inputs: how many playlist entries to read, in playlist order (default 100, up to 10,000). Raise it to get whole playlists. Each track is one result; podcast episodes and local files are skipped.",
            "default": 100
          },
          "includeRaw": {
            "title": "Include raw Spotify response",
            "type": "boolean",
            "description": "Attach the upstream Spotify response under `raw` on every result. All results of one album or artist repeat the same response, so the output gets much larger; for playlists, the response's entry list holds only the result's own entry. Off by default: `data` already holds each track's own Spotify object.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}