{
  "openapi": "3.0.1",
  "info": {
    "title": "App Store + Google Play Rank Tracker",
    "description": "Daily top-chart snapshots across 150+ countries for Apple App Store and Google Play — Free, Paid, Grossing. Built-in rank deltas (1d/7d/30d), top movers, new entries, dropoffs, and statistical forecasts. Per-app enrichment (ratings, reviews, dev, category).",
    "version": "1.0",
    "x-build-id": "Cx4UgJQiaz1mrXRcU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~app-store-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-app-store-rank-tracker",
        "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/constructive_calm~app-store-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-app-store-rank-tracker",
        "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/constructive_calm~app-store-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-app-store-rank-tracker",
        "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": [
          "platforms"
        ],
        "properties": {
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which app stores to scrape. Select one or both. Apple uses the official iTunes RSS feed (zero anti-bot, no proxy needed). Google Play uses the public store (residential proxy recommended — enable the proxy section below). To scrape both Apple and Google Play, add 'googleplay' after 'apple'.",
            "items": {
              "type": "string",
              "enum": [
                "apple",
                "googleplay"
              ],
              "enumTitles": [
                "Apple App Store",
                "Google Play"
              ]
            },
            "default": [
              "apple"
            ]
          },
          "countries": {
            "title": "Countries (ISO-3166 alpha-2)",
            "type": "array",
            "description": "Two-letter country codes (lower-case) to scrape. Examples: us, gb, de, fr, jp, kr, cn, br, in, ae. LEAVE EMPTY to scrape all 159 supported countries (curated intersection of Apple 184 App Store storefronts and Google Play 130+ regions). Countries supported by only one platform are skipped on the other with a debug log, not an error. Start with 1-2 countries to preview before expanding.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "chartTypes": {
            "title": "Chart types",
            "type": "array",
            "description": "Which top charts to pull per country. Free = free apps ranked by downloads, Paid = paid apps ranked by revenue from purchases, Grossing = apps ranked by total revenue including IAP + subscriptions (usually dominated by games).",
            "items": {
              "type": "string",
              "enum": [
                "top-free",
                "top-paid",
                "top-grossing"
              ],
              "enumTitles": [
                "Top Free",
                "Top Paid",
                "Top Grossing"
              ]
            },
            "default": [
              "top-free",
              "top-paid",
              "top-grossing"
            ]
          },
          "categories": {
            "title": "Categories filter",
            "type": "array",
            "description": "Optional category filter. LEAVE EMPTY to scrape the all-apps chart for each country (most common). When set, the actor pulls one chart per (country × chart type × category). Supported names: games, social-networking, photo-video, business, productivity, finance, health-fitness, education, entertainment, lifestyle, music, news, shopping, sports, travel, utilities, weather, books, food-drink, navigation, medical, reference. Unknown names are ignored with a warning. Each added category multiplies runtime and cost.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "resultsPerChart": {
            "title": "Results per chart",
            "minimum": 10,
            "maximum": 200,
            "type": "integer",
            "description": "How many ranked apps to pull per chart. IMPORTANT: Apple's RSS feed caps at 100 rows per chart regardless of this setting (Apple-side limit — requesting 200 still returns 100). Google Play supports up to 200 per chart. Each ranked app = $0.003 dataset charge, so 100 countries × 3 charts × 100 results = 30,000 rows ≈ $90. Start small (25-50) to preview.",
            "default": 100
          },
          "perAppEnrichment": {
            "title": "Per-app enrichment (ratings, reviews, developer)",
            "type": "boolean",
            "description": "If enabled, each ranked app also gets enriched with rating (stars), rating count, developer name, genre, app size, screenshot URLs, short description, and release date. Apple uses the iTunes Lookup API (batched, fast — adds only a few seconds). Google Play requires a per-app fetch (slower: roughly 1-2 seconds per app with residential proxy). Adds $0.002 per enriched app. RECOMMENDED for mobile-growth / agency use cases. First 100 enrichment calls per run are free (trial). Off by default so you can gauge base-run cost before opting in.",
            "default": false
          },
          "emitMovers": {
            "title": "Emit mover / anomaly events",
            "type": "boolean",
            "description": "If enabled, after each snapshot the actor emits mover events vs. the prior snapshot: top 10 risers, top 10 fallers, new entries to the chart, and dropoffs from the chart. Mover rows are pushed to the same dataset as snapshots ($0.003 per row) plus a supplementary $0.001 mover-event charge for the analytical signal. Never fires on the first run (needs prior snapshot history). REQUIRES scheduled runs to build history.",
            "default": true
          },
          "enableForecast": {
            "title": "Enable statistical rank forecast",
            "type": "boolean",
            "description": "If enabled, each result includes `forecast_rank_1d` and `forecast_rank_7d` computed via exponential smoothing over the last 30 snapshots. Forecasts are only populated once at least 5 snapshots of history exist (otherwise fields are null). FREE — no per-event charge.",
            "default": true
          },
          "historySnapshots": {
            "title": "History window (snapshots to keep)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "How many prior snapshots to persist in the key-value store per (platform, country, category, chart) for delta and forecast computation. Default 30 = ~one month of daily history. Higher values give smoother forecasts but use more KV storage.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (Google Play only)",
            "type": "object",
            "description": "Proxy used for Google Play requests. Apple RSS is called directly without proxy. Residential proxies STRONGLY recommended for Google Play — datacenter proxies trigger CAPTCHAs quickly. Leave default to use Apify residential proxies automatically.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}