{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Playlist Tracker - Followers, Tracks & Play Counts",
    "description": "Follower count and track list for public Spotify playlists: the exact follower integer, total track count, and the tracks in the public page with their play counts. Turn monitoring on and later runs return a playlist only when followers or tracks changed.",
    "version": "0.1",
    "x-build-id": "BjqBbZnY5s0WALjgi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~spotify-playlist-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-spotify-playlist-tracker",
        "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/neverempty~spotify-playlist-tracker/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-spotify-playlist-tracker",
        "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/neverempty~spotify-playlist-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-spotify-playlist-tracker",
        "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": {
          "playlists": {
            "title": "Spotify playlists",
            "type": "array",
            "description": "Playlist page URLs (https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M), spotify:playlist: URIs, or the 22-character playlist IDs. Only open.spotify.com/playlist/<id> pages are requested. Track, album and artist links are not read and come back as an \"invalid-input\" row that is not charged; an ID Spotify has no public playlist page for (private, deleted or not a playlist) comes back as a \"no-such-playlist\" row that is not charged. Playlist names are not searched: use the link from the Share menu in Spotify.",
            "items": {
              "type": "string"
            }
          },
          "maxPlaylists": {
            "title": "Maximum playlists to return",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "With monitoring off, the run stops after this many playlist rows and lists the lines it did not read in a row that is not charged. Monitoring mode ignores this and checks every playlist you listed.",
            "default": 100
          },
          "monitoringMode": {
            "title": "Monitoring mode: return a playlist only when it changed",
            "type": "boolean",
            "description": "Off = return every playlist you listed, charged per playlist row. On = the follower count and the tracks found in the page are remembered, and later runs return a playlist only when its follower count differs by more than 2 from the last returned figure (the public figure itself varies by 1 or 2 between reads), a track entered or left the tracks in the page, or the total track count differs - together with the previous figures, the difference, and the tracks that entered and left. In monitoring mode each playlist that was read is charged as one check (playlist-checked), and a playlist that is returned is also charged as one playlist row (playlist-returned). The first monitoring run returns every playlist once. Playlists are remembered one by one, not per list, so adding a playlist does not return the others again. Do not put the same playlist in two schedules that run at the same moment.",
            "default": false
          },
          "monitorMode": {
            "title": "What counts as a change",
            "enum": [
              "any-change",
              "followers-change",
              "tracks-change"
            ],
            "type": "string",
            "description": "Any change = the playlist is returned when its follower count or its tracks changed. The other two options watch only one of the two. A change in play counts alone does not trigger a return; play counts and their differences are reported in every returned row.",
            "default": "any-change"
          },
          "resetMonitoringState": {
            "title": "Forget the remembered playlists and start over",
            "type": "boolean",
            "description": "Clears everything remembered for this Actor on your account, so the next monitoring run returns each playlist once again. This affects all your monitoring runs, because playlists are remembered one by one rather than per list.",
            "default": false
          },
          "useProxy": {
            "title": "Retry once through a residential proxy when Spotify answers 403 or 429",
            "type": "boolean",
            "description": "Requests go directly to Spotify. If Spotify answers HTTP 403 or 429, the page is requested one more time through an Apify residential proxy, at most three times in a run; if it is refused again, or a fourth page is refused, the run stops asking and lists what it did not read. Turn this off to never use a proxy.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}