{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple App Store: Reviews, Apps, Charts & IAPs Scraper",
    "description": "Apple App Store data in 10 modes: app reviews (thousands per app per country), app details with ratings histogram, top charts, In-App Purchases, App Store events, similar apps, country availability matrix, developer portfolio, in-Store editorial, and search. 50+ countries. $2 per 1,000 rows, flat.",
    "version": "2.2",
    "x-build-id": "d5UBaekwfhENJZ5He"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~apple-app-store-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-apple-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/sourabhbgp~apple-app-store-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-apple-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/sourabhbgp~apple-app-store-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-apple-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "app-details",
              "reviews",
              "charts",
              "iap-catalogue",
              "app-events",
              "similar-apps",
              "availability-matrix",
              "developer-portfolio",
              "editorial"
            ],
            "type": "string",
            "description": "Pick exactly one. Per-mode configuration goes in the matching block below."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO 2-letter country codes (lowercase). Examples: \"us\", \"gb\", \"in\", \"de\", \"jp\".",
            "items": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "default": [
              "us"
            ]
          },
          "language": {
            "title": "Language override (optional)",
            "type": "string",
            "description": "ICU locale (e.g. \"en-US\", \"de-DE\"). Leave blank to use the default for each country."
          },
          "proxyGroups": {
            "title": "Proxy groups (optional)",
            "type": "array",
            "description": "Override Apify proxy groups. Default: datacenter → RESIDENTIAL escalation. Example: [\"RESIDENTIAL\"] forces residential from start.",
            "items": {
              "type": "string"
            }
          },
          "searchConfig": {
            "title": "search mode config",
            "type": "object",
            "description": "Required when mode=search. Fields: searchTerms (required, array of keyword strings), maxResultsPerSearch (1–200, default 50)."
          },
          "appDetailsConfig": {
            "title": "app-details mode config",
            "type": "object",
            "description": "Required when mode=app-details. Pass appIds (numeric, prefixed, or full URLs). Default-on toggles: includeRatingsHistogram, includeContentAdvisories. Opt-in toggles (default false, free): includePrivacyLabels, includeVersionHistory, includeFileSizeByDevice."
          },
          "reviewsConfig": {
            "title": "reviews mode config",
            "type": "object",
            "description": "Required when mode=reviews. Goes past the 500-cap that RSS-based scrapers stop at; typical pulls return a few hundred to a few thousand reviews per app per country before Apple's CDN soft-throttles. Fields: appIds (required), maxReviewsPerApp (1–100000, default 500), sortBy (mostRecent|mostHelpful, default mostRecent — note Apple's catalog returns mostRecent regardless), sinceDate (ISO 8601 or null)."
          },
          "chartsConfig": {
            "title": "charts mode config",
            "type": "object",
            "description": "Required when mode=charts. Combine country × chartType × genre. Fields: chartTypes (any of topfreeapplications, toppaidapplications, topgrossingapplications, newapplications), genreIds (null = overall, or integer IDs like 6014 Games, 6017 Education), limit (1–200, default 100)."
          },
          "iapCatalogueConfig": {
            "title": "iap-catalogue mode config",
            "type": "object",
            "description": "Required when mode=iap-catalogue. Returns up to 10 IAPs per app per country. Fields: appIds (required), refetchEachIap (default false — re-fetches each IAP via /in-apps/{id}; same billing)."
          },
          "appEventsConfig": {
            "title": "app-events mode config",
            "type": "object",
            "description": "Required when mode=app-events. Returns calendared App Store In-App Events. Apps with no events return 0 rows cleanly. Fields: appIds (required)."
          },
          "similarAppsConfig": {
            "title": "similar-apps mode config",
            "type": "object",
            "description": "Required when mode=similar-apps. AMP /customers-also-bought-apps. Fields: appIds (required), maxSimilarPerApp (1–1000, default 40)."
          },
          "availabilityMatrixConfig": {
            "title": "availability-matrix mode config",
            "type": "object",
            "description": "Required when mode=availability-matrix. Probes each appId × country combo. 200=available, 404=not in storefront. Forces RESIDENTIAL proxy by default. Requires countries.length >= 2. Fields: appIds (required)."
          },
          "developerPortfolioConfig": {
            "title": "developer-portfolio mode config",
            "type": "object",
            "description": "Required when mode=developer-portfolio. Numeric Apple developer IDs (visible in App Store URLs as /developer/.../id{N}). Uses iTunes Lookup with entity=software (AMP /developers/{id}/apps is broken). Fields: developerIds (required)."
          },
          "editorialConfig": {
            "title": "editorial mode config",
            "type": "object",
            "description": "Required when mode=editorial. Fetches an App Store story or collection by ID. IDs come from the 'Featured In' / story links on app pages. Fields: editorialIds (required), editorialKind (story or collection, default story)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}