{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple Music Scraper",
    "description": "Scrape Apple Music albums, songs, artists and music videos with localized prices and availability across 50+ countries. Full album tracklists, charts, artwork, previews and metadata. No API key.",
    "version": "0.0",
    "x-build-id": "06Dy8IahaOZa77o8N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unfenced-group~apple-music-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unfenced-group-apple-music-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/unfenced-group~apple-music-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unfenced-group-apple-music-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/unfenced-group~apple-music-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unfenced-group-apple-music-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": {
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword(s) to search Apple Music (e.g. \"taylor swift\", \"blinding lights\"). Leave empty to browse the charts or to scrape specific IDs/URLs.",
            "default": ""
          },
          "entityTypes": {
            "title": "What to search for",
            "type": "array",
            "description": "Which catalogue types to return when searching by keyword. Ignored when browsing charts or scraping IDs/URLs.",
            "items": {
              "type": "string",
              "enum": [
                "album",
                "song",
                "artist",
                "musicVideo"
              ],
              "enumTitles": [
                "Albums",
                "Songs",
                "Artists",
                "Music videos"
              ]
            },
            "default": [
              "album",
              "song"
            ]
          },
          "browseCharts": {
            "title": "Browse charts",
            "enum": [
              "",
              "songs",
              "albums"
            ],
            "type": "string",
            "description": "Pull Apple Music's current most-played chart instead of searching. Uses the official Apple charts feed for the primary country.",
            "default": ""
          },
          "country": {
            "title": "Country (single)",
            "enum": [
              "US",
              "CA",
              "MX",
              "BR",
              "AR",
              "CL",
              "CO",
              "PE",
              "GB",
              "IE",
              "DE",
              "FR",
              "NL",
              "BE",
              "LU",
              "ES",
              "PT",
              "IT",
              "AT",
              "CH",
              "PL",
              "CZ",
              "SE",
              "NO",
              "DK",
              "FI",
              "GR",
              "HU",
              "RO",
              "RU",
              "UA",
              "TR",
              "AU",
              "NZ",
              "JP",
              "KR",
              "CN",
              "HK",
              "TW",
              "SG",
              "MY",
              "TH",
              "ID",
              "PH",
              "VN",
              "IN",
              "AE",
              "SA",
              "IL",
              "EG",
              "ZA",
              "NG"
            ],
            "type": "string",
            "description": "Single storefront to price against. Ignored if 'Countries' or 'All countries' is set. The first selected country is also used for search and charts discovery.",
            "default": "US"
          },
          "countries": {
            "title": "Countries (multi-select)",
            "type": "array",
            "description": "Price each item across multiple storefronts in one run — every selected country's local price, currency and availability is returned per item.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "CA",
                "MX",
                "BR",
                "AR",
                "CL",
                "CO",
                "PE",
                "GB",
                "IE",
                "DE",
                "FR",
                "NL",
                "BE",
                "LU",
                "ES",
                "PT",
                "IT",
                "AT",
                "CH",
                "PL",
                "CZ",
                "SE",
                "NO",
                "DK",
                "FI",
                "GR",
                "HU",
                "RO",
                "RU",
                "UA",
                "TR",
                "AU",
                "NZ",
                "JP",
                "KR",
                "CN",
                "HK",
                "TW",
                "SG",
                "MY",
                "TH",
                "ID",
                "PH",
                "VN",
                "IN",
                "AE",
                "SA",
                "IL",
                "EG",
                "ZA",
                "NG"
              ],
              "enumTitles": [
                "🇺🇸 United States (USD)",
                "🇨🇦 Canada (CAD)",
                "🇲🇽 Mexico (MXN)",
                "🇧🇷 Brazil (BRL)",
                "🇦🇷 Argentina (ARS)",
                "🇨🇱 Chile (CLP)",
                "🇨🇴 Colombia (COP)",
                "🇵🇪 Peru (PEN)",
                "🇬🇧 United Kingdom (GBP)",
                "🇮🇪 Ireland (EUR)",
                "🇩🇪 Germany (EUR)",
                "🇫🇷 France (EUR)",
                "🇳🇱 Netherlands (EUR)",
                "🇧🇪 Belgium (EUR)",
                "🇱🇺 Luxembourg (EUR)",
                "🇪🇸 Spain (EUR)",
                "🇵🇹 Portugal (EUR)",
                "🇮🇹 Italy (EUR)",
                "🇦🇹 Austria (EUR)",
                "🇨🇭 Switzerland (CHF)",
                "🇵🇱 Poland (PLN)",
                "🇨🇿 Czechia (CZK)",
                "🇸🇪 Sweden (SEK)",
                "🇳🇴 Norway (NOK)",
                "🇩🇰 Denmark (DKK)",
                "🇫🇮 Finland (EUR)",
                "🇬🇷 Greece (EUR)",
                "🇭🇺 Hungary (HUF)",
                "🇷🇴 Romania (RON)",
                "🇷🇺 Russia (RUB)",
                "🇺🇦 Ukraine (UAH)",
                "🇹🇷 Turkey (TRY)",
                "🇦🇺 Australia (AUD)",
                "🇳🇿 New Zealand (NZD)",
                "🇯🇵 Japan (JPY)",
                "🇰🇷 South Korea (KRW)",
                "🇨🇳 China (CNY)",
                "🇭🇰 Hong Kong (HKD)",
                "🇹🇼 Taiwan (TWD)",
                "🇸🇬 Singapore (SGD)",
                "🇲🇾 Malaysia (MYR)",
                "🇹🇭 Thailand (THB)",
                "🇮🇩 Indonesia (IDR)",
                "🇵🇭 Philippines (PHP)",
                "🇻🇳 Vietnam (VND)",
                "🇮🇳 India (INR)",
                "🇦🇪 United Arab Emirates (AED)",
                "🇸🇦 Saudi Arabia (SAR)",
                "🇮🇱 Israel (ILS)",
                "🇪🇬 Egypt (EGP)",
                "🇿🇦 South Africa (ZAR)",
                "🇳🇬 Nigeria (NGN)"
              ]
            },
            "default": []
          },
          "allCountries": {
            "title": "All countries",
            "type": "boolean",
            "description": "Price across all 52 supported storefronts in a single run. Overrides the country fields.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items (albums/songs/artists/videos) to return.",
            "default": 10
          },
          "searchLanguage": {
            "title": "Result language",
            "type": "string",
            "description": "Optional Apple language code for localized titles and genres (e.g. \"en_us\", \"de_de\", \"ja_jp\"). Leave empty for each storefront's default. Prices stay localized per country regardless.",
            "default": ""
          },
          "appleIds": {
            "title": "Specific Apple IDs",
            "type": "array",
            "description": "Optional list of exact Apple catalogue IDs (album, song, artist or music-video IDs, e.g. 1468058165) to scrape directly. Bypasses search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional list of Apple Music / iTunes URLs to scrape directly (album, song, artist or music-video pages).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeTracklist": {
            "title": "Include album tracklists",
            "type": "boolean",
            "description": "For albums, fetch the full tracklist (every track with duration, preview URL, explicitness and track number). Adds one fast request per album.",
            "default": false
          },
          "expandArtistAlbums": {
            "title": "Expand artists to albums",
            "type": "boolean",
            "description": "When an artist is found, also scrape that artist's albums (their discography).",
            "default": false
          },
          "filterTypes": {
            "title": "Keep only these types",
            "type": "array",
            "description": "Post-filter: keep only items of these types in the output.",
            "items": {
              "type": "string",
              "enum": [
                "album",
                "song",
                "artist",
                "musicVideo"
              ],
              "enumTitles": [
                "Albums",
                "Songs",
                "Artists",
                "Music videos"
              ]
            },
            "default": []
          },
          "explicitFilter": {
            "title": "Explicit content",
            "enum": [
              "all",
              "clean",
              "explicit"
            ],
            "type": "string",
            "description": "Restrict to clean or explicit items only.",
            "default": "all"
          },
          "genres": {
            "title": "Genres",
            "type": "array",
            "description": "Filter by genre (substring match, case-insensitive — e.g. \"pop\", \"hip-hop\", \"rock\").",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "type": "integer",
            "description": "Only items whose lowest price across selected countries is at least this amount (local major units)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "type": "integer",
            "description": "Only items whose lowest price across selected countries is at most this amount (local major units)."
          },
          "releasedAfter": {
            "title": "Released after",
            "type": "string",
            "description": "Only items released on or after this date (YYYY-MM-DD).",
            "default": ""
          },
          "releasedBefore": {
            "title": "Released before",
            "type": "string",
            "description": "Only items released on or before this date (YYYY-MM-DD).",
            "default": ""
          },
          "streamableOnly": {
            "title": "Streamable only",
            "type": "boolean",
            "description": "Only items currently streamable on Apple Music.",
            "default": false
          },
          "includeMedia": {
            "title": "Include media",
            "type": "boolean",
            "description": "Include artwork and audio/video preview URLs.",
            "default": true
          },
          "useProxy": {
            "title": "Use proxy",
            "type": "boolean",
            "description": "Route requests through Apify Proxy. Off by default — the Apple endpoints are reachable directly.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}