{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple App Store Scraper - Apps, Games, Reviews & ASO Ranks",
    "description": "Scrape iOS App Store apps and games: metadata, keyword search, ASO keyword ranks, reviews, charts, and developer catalogs. Optional privacy/IAP HTML enrich, multi-country storefronts, and monitor mode. No App Store Connect login.",
    "version": "0.1",
    "x-build-id": "7YswM2LkE9DOGqBae"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~apple-app-store-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-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/crawloop~apple-app-store-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-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/crawloop~apple-app-store-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-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",
              "developer_apps",
              "reviews",
              "top_charts",
              "keyword_ranks",
              "monitor"
            ],
            "type": "string",
            "description": "What to scrape from public iTunes / App Store endpoints.",
            "default": "app_details"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "App Store app or developer page URLs (country + id are parsed automatically).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "appIds": {
            "title": "App IDs",
            "type": "array",
            "description": "Numeric App Store track IDs (e.g. 310633997).",
            "items": {
              "type": "string"
            }
          },
          "developerIds": {
            "title": "Developer IDs",
            "type": "array",
            "description": "Numeric developer / artist IDs for mode=developer_apps.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchTerm": {
            "title": "Search Term",
            "type": "string",
            "description": "Keyword for mode=search (e.g. crypto, vpn).",
            "default": ""
          },
          "searchTerms": {
            "title": "Search Terms (multi)",
            "type": "array",
            "description": "Keywords for mode=search or mode=keyword_ranks. Merged with Search Term.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Parallel country/keyword/app workers (1–32). Higher is faster for multi-country runs.",
            "default": 6
          },
          "rankHistoryLimit": {
            "title": "Rank History Limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many past keyword-rank snapshots to keep per app×keyword×country in KV (mode=keyword_ranks).",
            "default": 30
          },
          "emitRankChanges": {
            "title": "Emit Rank Change Events",
            "type": "boolean",
            "description": "In keyword_ranks, also push monitor_event RANK_CHANGE when position moves vs previous run.",
            "default": true
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Primary App Store storefront (ISO-2). Used when Countries is empty.",
            "default": "us"
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Storefronts to scrape (us, gb, de, jp, …). Use \"all\" for the major-storefronts preset (~44 countries). Reviews and charts are per-country.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "useAllCountries": {
            "title": "Use All Major Countries",
            "type": "boolean",
            "description": "If true, scrape the built-in major storefronts list (same as countries=[\"all\"]). Ideal for review coverage beyond the ~500/country RSS ceiling.",
            "default": false
          },
          "enrichFromHtml": {
            "title": "Enrich From App Store HTML",
            "type": "boolean",
            "description": "Fetch apps.apple.com product page for subtitle, rating histogram, App Privacy labels, and in-app purchases. Slower; recommended for app_details.",
            "default": false
          },
          "reviewSort": {
            "title": "Review Sort",
            "enum": [
              "mostRecent",
              "mostHelpful"
            ],
            "type": "string",
            "description": "RSS review sort order.",
            "default": "mostRecent"
          },
          "maxReviewsPerApp": {
            "title": "Max Reviews Per App (per country)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap per app per storefront. Apple RSS hard-limits ~500 (10×50).",
            "default": 100
          },
          "chartType": {
            "title": "Chart Type",
            "enum": [
              "top_free",
              "top_paid",
              "top_grossing",
              "new_free",
              "new_paid",
              "new_apps"
            ],
            "type": "string",
            "description": "Top charts feed for mode=top_charts.",
            "default": "top_free"
          },
          "chartLimit": {
            "title": "Chart Limit",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many chart positions to fetch (Apple typically up to 200).",
            "default": 100
          },
          "genreId": {
            "title": "Genre / Category ID",
            "type": "integer",
            "description": "Optional App Store genre id for charts (e.g. 6015 Finance, 6014 Games)."
          },
          "enrichChartDetails": {
            "title": "Enrich Chart Rows via Lookup",
            "type": "boolean",
            "description": "If true, re-fetch each chart app via iTunes Lookup for full metadata (slower).",
            "default": false
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum dataset rows to push (0 = unlimited).",
            "default": 100
          },
          "maxRequestsPerSecond": {
            "title": "Max Requests Per Second",
            "minimum": 0.5,
            "maximum": 30,
            "type": "number",
            "description": "Client-side rate limit for iTunes / RSS HTTP calls.",
            "default": 8
          },
          "monitorStoreName": {
            "title": "Monitor / Rank State Store Name",
            "type": "string",
            "description": "Named Apify key-value store for app fingerprints (monitor) and keyword-rank history (keyword_ranks).",
            "default": "apple-app-store-monitor-state"
          },
          "monitorBaselineOnly": {
            "title": "Baseline Only (first run)",
            "type": "boolean",
            "description": "For monitor / keyword_ranks: save state without emitting change events (keyword_ranks still skips dataset if true).",
            "default": false
          },
          "resetMonitorState": {
            "title": "Reset Monitor State",
            "type": "boolean",
            "description": "Clear fingerprints in the monitor store before this run.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy. Usually not required for public iTunes JSON endpoints.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}