{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Global & Regional Charts Monitor",
    "description": "Scrape Spotify's Top 50 daily charts for 49 countries and Top Songs weekly charts for 14, plus the global weekly track, album and ARTIST charts. Reports rank movement between runs - climbers, fallers, new entries and drop-outs - because Spotify's chart playlists publish only today's order.",
    "version": "0.0",
    "x-build-id": "MMmauspBtHmfEB9os"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~spotify-charts-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-spotify-charts-monitor",
        "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/fanndev~spotify-charts-monitor/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-spotify-charts-monitor",
        "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/fanndev~spotify-charts-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-spotify-charts-monitor",
        "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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes, or GLOBAL. Daily charts are published for GLOBAL, AE, AR, AT, AU, BE, BR, CA, CH, CL, CO, CZ, DE, DK, ES, FI, FR, GB, GR, HK, HU, ID, IE, IL, IN, IT, JP, KR, MA, MX, MY, NG, NL, NO, NZ, PE, PH, PL, PT, RO, SA, SE, SG, TH, TR, TW, US, VN and ZA. Weekly charts cover fewer territories: GLOBAL, AR, AU, BR, CA, DE, ES, GB, IN, IT, JP, KR, MX and US. An unavailable code stops the run with the full list rather than returning an empty chart.",
            "items": {
              "type": "string"
            }
          },
          "recurrence": {
            "title": "Chart recurrence",
            "enum": [
              "daily",
              "weekly"
            ],
            "type": "string",
            "description": "daily reads the Top 50 charts, recalculated every day. weekly reads the Top Songs charts, recalculated every Thursday and covering fewer countries.",
            "default": "daily"
          },
          "includeGlobalWeeklyCharts": {
            "title": "Include the global weekly track, album and artist charts",
            "type": "boolean",
            "description": "Read Spotify's public charts service as well. It needs no credential at all and is the only surface that publishes an ALBUM chart and an ARTIST chart, and the only one whose entries carry Spotify's own previousRank, peakRank, entryStatus and weeks-on-chart counters. It is limited to the three global weekly charts - per-country and historical charts there require a logged-in session.",
            "default": true
          },
          "playlistUrls": {
            "title": "Extra chart or playlist URLs",
            "type": "array",
            "description": "Any additional Spotify playlist to treat as a chart, for territories or editorial lists not in the built-in catalogue. Entries are ranked by playlist position.",
            "items": {
              "type": "string"
            }
          },
          "maxEntriesPerChart": {
            "title": "Maximum entries per chart",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Charts hold 50 entries. Lower this to capture only the top of each chart.",
            "default": 50
          },
          "trackRankMovement": {
            "title": "Report rank movement since the previous run",
            "type": "boolean",
            "description": "Spotify's chart playlists publish only today's order - nothing about climbing, falling or entering. Turn this on to remember each run's order and report previousRank, rankChange and entryStatus (MOVED_UP, MOVED_DOWN, NO_CHANGE, NEW_ENTRY) next time, plus a CHART_EXIT row for every track that fell off. The first run has nothing to compare against and marks its entries BASELINE.",
            "default": true
          },
          "trackingStoreName": {
            "title": "Tracking store name",
            "type": "string",
            "description": "Named key-value store holding the previous run's chart order. Scheduled runs pointed at the same name build one history; use different names to keep separate schedules apart.",
            "default": "spotify-charts-monitor"
          },
          "emitChartSummary": {
            "title": "Emit a summary row per chart",
            "type": "boolean",
            "description": "One CHART_SUMMARY record per chart: entry count, follower count, when Spotify last recalculated it, how many entries are new, how many climbed or fell, and the biggest climber.",
            "default": true
          },
          "exportFormats": {
            "title": "Extra export files",
            "type": "array",
            "description": "Besides the dataset, write ready-made files into this run's key-value store.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv",
                "excel"
              ],
              "enumTitles": [
                "JSON",
                "NDJSON",
                "CSV",
                "Excel (XLSX)"
              ]
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default and genuinely optional: neither endpoint this actor reads has a WAF or an IP block. Chart contents are the same from any exit IP, since the country comes from the chart id rather than from your address.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}