{
  "openapi": "3.0.1",
  "info": {
    "title": "Spotify Artist Scraper: Monthly Listeners & Top Tracks",
    "description": "Spotify artists: verified, independent or signed (label lines), monthly listeners, followers, world rank, top listener cities, bio, social links, latest release, plus top tracks and playlist tracks with play counts.",
    "version": "0.3",
    "x-build-id": "THpUl6QeDvcBqeGwI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tacps126~spotify-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tacps126-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/tacps126~spotify-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tacps126-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/tacps126~spotify-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tacps126-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",
        "properties": {
          "platforms": {
            "title": "Platform",
            "type": "array",
            "description": "Spotify. SoundCloud and Spotify together are in Music Artist Scraper (tacps126/media-profiles).",
            "items": {
              "type": "string",
              "enum": [
                "spotify"
              ],
              "enumTitles": [
                "Spotify"
              ]
            },
            "default": [
              "spotify"
            ]
          },
          "startUrls": {
            "title": "Profile, track and playlist links",
            "type": "array",
            "description": "Spotify artist links (open.spotify.com/artist/...), artist ids or playlist links. Artists return the profile plus their top tracks; playlists return their tracks with play counts.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Names or keywords. Returns matching Spotify artist profiles.",
            "items": {
              "type": "string"
            }
          },
          "profilesPerSearch": {
            "title": "Profiles per search term",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many matching profiles to read per search term, and artist profiles per playlist or set.",
            "default": 20
          },
          "itemsPerProfile": {
            "title": "Latest tracks per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Tracks returned under each profile. Spotify returns the artist's top 10 tracks. 0 returns profiles only.",
            "default": 3
          },
          "artistType": {
            "title": "Artist type",
            "enum": [
              "all",
              "verified",
              "unverified",
              "independent",
              "signed"
            ],
            "type": "string",
            "description": "Keep only verified or unverified profiles, or only independent or signed artists. Independent means the releases carry the artist's own name or a self-release service; signed means a label name.",
            "default": "all"
          },
          "minFollowers": {
            "title": "Min followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles with at least this many followers."
          },
          "maxFollowers": {
            "title": "Max followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles with at most this many followers (useful for finding emerging artists)."
          },
          "minMonthlyListeners": {
            "title": "Min monthly listeners",
            "minimum": 0,
            "type": "integer",
            "description": "Spotify: keep only artists with at least this many monthly listeners."
          },
          "maxMonthlyListeners": {
            "title": "Max monthly listeners",
            "minimum": 0,
            "type": "integer",
            "description": "Spotify: keep only artists with at most this many monthly listeners (emerging artists)."
          },
          "releasedWithinDays": {
            "title": "Released within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only artists whose latest release is at most this many days old, so you only get active artists."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "2-letter country codes (US, GB, NG). The country of the artist's biggest listener city.",
            "items": {
              "type": "string"
            }
          },
          "mustHave": {
            "title": "Must have",
            "type": "array",
            "description": "Keep only profiles that list all of these (from their profile links and bio).",
            "items": {
              "type": "string",
              "enum": [
                "instagram",
                "tiktok",
                "youtube",
                "x",
                "facebook",
                "website",
                "email"
              ],
              "enumTitles": [
                "Instagram",
                "TikTok",
                "YouTube",
                "X (Twitter)",
                "Facebook",
                "Website",
                "E-mail in bio"
              ]
            }
          },
          "minLeadScore": {
            "title": "Min lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Every profile gets a 0 to 100 score for how well it fits as an emerging independent artist: independent, 1k-100k audience, recent release, on Instagram or TikTok, e-mail in bio. Keep only profiles at or above this score."
          },
          "similarArtists": {
            "title": "Similar artists per artist link",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "For each artist link, also return up to this many artists the platform lists as similar (filters apply to them). The fastest way to find artists like the ones you already work with.",
            "default": 0
          },
          "playlistMode": {
            "title": "Playlists and sets return",
            "enum": [
              "tracks",
              "artists",
              "both"
            ],
            "type": "string",
            "description": "For playlist or set links: their tracks, the profiles of the artists on them (up to 'Profiles per search term'), or both. New-music playlists are a good source of artists.",
            "default": "tracks"
          },
          "socialStats": {
            "title": "Instagram and TikTok stats",
            "type": "array",
            "description": "For profiles that link an Instagram or TikTok account, add its followers, posts or likes, verified badge, bio and (TikTok) average views and engagement (instagramStats, tiktokStats). Charged per account read; only for profiles that pass your filters.",
            "items": {
              "type": "string",
              "enum": [
                "instagram",
                "tiktok"
              ],
              "enumTitles": [
                "Instagram",
                "TikTok"
              ]
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Most rows per run: profiles and tracks together.",
            "default": 500
          },
          "onlyNew": {
            "title": "Only new profiles and tracks",
            "type": "boolean",
            "description": "Schedule the Actor and each run returns only profiles and tracks earlier runs did not deliver. Good for spotting new artists for a search term or new releases from a list of profiles.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for the \"only new\" history, so several monitors can run side by side."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify proxy on by default. Leave it as is unless you want to use your own proxy.",
            "default": {
              "useApifyProxy": true
            }
          },
          "tenantId": {
            "title": "Tenant ID",
            "type": "string",
            "description": "Optional label used to keep separate histories for different clients or teams."
          },
          "debug": {
            "title": "Debug",
            "type": "boolean",
            "description": "Verbose logs.",
            "default": false
          },
          "delivery": {
            "title": "Send results to Slack, Discord, a webhook or Google Sheets",
            "type": "object",
            "description": "Webhook: {\"webhookUrl\": \"https://...\", \"format\": \"json\" | \"slack\" | \"discord\", \"onlyWhenResults\": true, \"includeItems\": 10}. Google Sheets: {\"spreadsheetId\": \"<id from the sheet URL>\", \"sheetName\": \"Sheet1\"} plus the service account key below; share the sheet with the service account's e-mail first. Leave empty to only save results in the dataset."
          },
          "googleServiceAccountJson": {
            "title": "Google service account key (for Sheets)",
            "type": "string",
            "description": "Only for Google Sheets delivery: paste the service account's JSON key. Stored encrypted; the account sees only sheets you share with it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}