{
  "openapi": "3.0.1",
  "info": {
    "title": "App Store Scraper (Pay-Per-Event)",
    "description": "Scrape Apple App Store, iTunes, Music, and Podcasts data — app details, ratings, and reviews. Pay-per-event pricing: $0.30 per 1000 apps + $0.10 per 1000 reviews. No monthly fee.",
    "version": "0.1",
    "x-build-id": "3K5tfdO1uDLpg4a99"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prodiger~app-store-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prodiger-app-store-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/prodiger~app-store-scraper/runs": {
      "post": {
        "operationId": "runs-sync-prodiger-app-store-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/prodiger~app-store-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-prodiger-app-store-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Apple detail URLs to scrape. Accepts apps.apple.com, itunes.apple.com, podcasts.apple.com, music.apple.com, and books.apple.com URLs. Mix any combination. If left empty, you must provide a search term instead.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "term": {
            "title": "Search term",
            "type": "string",
            "description": "Keyword to search across the App Store / iTunes catalog. In lookup mode this should be a numeric ID instead. Either this or startUrls is required."
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "af",
              "al",
              "dz",
              "ao",
              "ai",
              "ag",
              "ar",
              "am",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bb",
              "by",
              "be",
              "bz",
              "bj",
              "bm",
              "bt",
              "bo",
              "ba",
              "bw",
              "br",
              "vg",
              "bn",
              "bg",
              "bf",
              "kh",
              "cm",
              "ca",
              "cv",
              "ky",
              "td",
              "cl",
              "cn",
              "co",
              "cd",
              "cg",
              "cr",
              "ci",
              "hr",
              "cy",
              "cz",
              "dk",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "ee",
              "sz",
              "fj",
              "fi",
              "fr",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gr",
              "gd",
              "gt",
              "gw",
              "gy",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "iq",
              "ie",
              "il",
              "it",
              "jm",
              "jp",
              "jo",
              "kz",
              "ke",
              "kr",
              "xk",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "lr",
              "ly",
              "lt",
              "lu",
              "mo",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mr",
              "mu",
              "mx",
              "fm",
              "md",
              "mn",
              "me",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "nz",
              "ni",
              "ne",
              "ng",
              "mk",
              "no",
              "om",
              "pk",
              "pw",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pl",
              "pt",
              "qa",
              "ro",
              "ru",
              "rw",
              "st",
              "sa",
              "sn",
              "rs",
              "sc",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "za",
              "es",
              "lk",
              "kn",
              "lc",
              "vc",
              "sr",
              "se",
              "ch",
              "tw",
              "tj",
              "tz",
              "th",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "tc",
              "ug",
              "ua",
              "ae",
              "gb",
              "uy",
              "uz",
              "vu",
              "ve",
              "vn",
              "ye",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Two-letter country code for the storefront to query. Default: us.",
            "default": "us"
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "all",
              "software",
              "movie",
              "podcast",
              "music",
              "musicVideo",
              "audiobook",
              "shortFilm",
              "tvShow",
              "ebook"
            ],
            "type": "string",
            "description": "Limit results to a single media category. Default: all.",
            "default": "all"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "lookup"
            ],
            "type": "string",
            "description": "Search returns matches for the term. Lookup expects a numeric ID and returns the single matching record. Default: search.",
            "default": "search"
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "If enabled, the actor fetches reviews for every scraped app. Reviews are de-duplicated across two sortby passes (mostrecent + mosthelpful) so you typically get up to ~1000 reviews per app instead of the default ~500 cap. Each review is charged separately.",
            "default": false
          },
          "maxItems": {
            "title": "Max apps per run",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of detail records (apps, movies, podcasts, etc.) to emit per run. Set to 0 for unlimited. Default: 100.",
            "default": 100
          },
          "maxReviewsPerApp": {
            "title": "Max reviews per app",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on reviews emitted per app when includeReviews=true. Apple paginates ~50 reviews per page and caps each sortby at ~10 pages (~500 reviews). This actor runs two sortby passes (mostrecent + mosthelpful) and de-duplicates, so values up to ~1000 are practical. Set to 0 for unlimited.",
            "default": 500
          },
          "endPage": {
            "title": "Max search pages per source",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Caps the number of search-result pages walked per startUrl / term. Apple's search endpoint returns up to 200 results per page. Set to 0 for unlimited. Default: 0.",
            "default": 0
          },
          "customMapFunction": {
            "title": "Custom map function",
            "type": "string",
            "description": "Optional JavaScript function body that transforms each scraped item before it is pushed to the dataset. Receives the item as argument `item` and must return the modified item. Errors are logged and the unmodified item is emitted. Example: `return { trackId: item.trackId, name: item.trackName };`"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Default: Apify Proxy with AUTO rotation (datacenter). Apple's iTunes endpoints rate-limit per IP, so proxy rotation is recommended for runs over a few hundred items.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}