{
  "openapi": "3.0.1",
  "info": {
    "title": "App Store Rankings Scraper — Apple & Google Play Charts",
    "description": "Collect current Apple App Store and Google Play rankings by country, chart type, and category. Export chart positions and available app metadata to CSV/JSON. Optional details; no historical rankings.",
    "version": "1.1",
    "x-build-id": "LUL1McBWAPtriaOiE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/funny_ground~app-store-rankings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-funny_ground-app-store-rankings-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/funny_ground~app-store-rankings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-funny_ground-app-store-rankings-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/funny_ground~app-store-rankings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-funny_ground-app-store-rankings-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": {
          "stores": {
            "title": "App stores",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "Choose Apple App Store, Google Play, or both. No store URLs needed.",
            "items": {
              "type": "string",
              "enum": [
                "apple",
                "google_play"
              ],
              "enumTitles": [
                "Apple App Store (iOS)",
                "Google Play (Android)"
              ]
            },
            "default": [
              "apple",
              "google_play"
            ]
          },
          "countries": {
            "title": "Countries / markets",
            "minItems": 1,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Select countries by name. Additional two-letter country codes are accepted. UK is normalized to GB. Mainland China charts use Apple only, because Google Play is unavailable there. Each selected country creates separate charts.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "us",
                "gb",
                "ca",
                "au",
                "de",
                "fr",
                "jp",
                "kr",
                "cn",
                "tw",
                "hk",
                "in",
                "br",
                "mx",
                "es",
                "it",
                "nl",
                "sg",
                "id",
                "my",
                "th",
                "vn",
                "ph",
                "pl",
                "tr",
                "sa",
                "ae",
                "za",
                "se",
                "no",
                "dk",
                "fi",
                "ch",
                "at",
                "be",
                "ie",
                "nz",
                "pt",
                "ar",
                "cl",
                "co",
                "eg",
                "ng",
                "ke"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Canada",
                "Australia",
                "Germany",
                "France",
                "Japan",
                "South Korea",
                "Mainland China — Apple only",
                "Taiwan",
                "Hong Kong",
                "India",
                "Brazil",
                "Mexico",
                "Spain",
                "Italy",
                "Netherlands",
                "Singapore",
                "Indonesia",
                "Malaysia",
                "Thailand",
                "Vietnam",
                "Philippines",
                "Poland",
                "Turkey",
                "Saudi Arabia",
                "United Arab Emirates",
                "South Africa",
                "Sweden",
                "Norway",
                "Denmark",
                "Finland",
                "Switzerland",
                "Austria",
                "Belgium",
                "Ireland",
                "New Zealand",
                "Portugal",
                "Argentina",
                "Chile",
                "Colombia",
                "Egypt",
                "Nigeria",
                "Kenya"
              ]
            },
            "default": [
              "us"
            ]
          },
          "chartTypes": {
            "title": "Ranking charts",
            "minItems": 1,
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Choose one or more charts. Top Grossing is the store's published chart, not an estimate of downloads or revenue.",
            "items": {
              "type": "string",
              "enum": [
                "top_free",
                "top_paid",
                "top_grossing"
              ],
              "enumTitles": [
                "Top Free",
                "Top Paid",
                "Top Grossing"
              ]
            },
            "default": [
              "top_free"
            ]
          },
          "categories": {
            "title": "App categories",
            "minItems": 1,
            "maxItems": 36,
            "uniqueItems": true,
            "type": "array",
            "description": "One category menu works for both stores: native category IDs are mapped automatically. Overall means all iOS apps and the Android Apps chart; choose Games separately for Google Play games. Some categories are approximate cross-store equivalents. You can select more than one.",
            "items": {
              "type": "string",
              "enum": [
                "overall",
                "games",
                "business",
                "education",
                "finance",
                "shopping",
                "entertainment",
                "health_and_fitness",
                "food_and_drink",
                "travel",
                "weather",
                "productivity",
                "lifestyle",
                "social",
                "music",
                "books",
                "sports",
                "news",
                "utilities",
                "photography",
                "medical",
                "game_action",
                "game_adventure",
                "game_arcade",
                "game_board",
                "game_card",
                "game_educational",
                "game_music",
                "game_puzzle",
                "game_racing",
                "game_role_playing",
                "game_simulation",
                "game_sports",
                "game_strategy",
                "game_trivia",
                "game_word"
              ],
              "enumTitles": [
                "Overall (iOS all apps / Android apps)",
                "Games",
                "Business",
                "Education",
                "Finance",
                "Shopping",
                "Entertainment",
                "Health & Fitness",
                "Food & Drink",
                "Travel",
                "Weather",
                "Productivity",
                "Lifestyle",
                "Social Networking",
                "Music",
                "Books & Reference",
                "Sports",
                "News & Magazines",
                "Utilities / Tools",
                "Photo & Video (iOS) / Photography (Android)",
                "Medical",
                "Games — Action",
                "Games — Adventure",
                "Games — Arcade",
                "Games — Board",
                "Games — Card",
                "Games — Educational",
                "Games — Music",
                "Games — Puzzle",
                "Games — Racing",
                "Games — Role Playing",
                "Games — Simulation",
                "Games — Sports",
                "Games — Strategy",
                "Games — Trivia",
                "Games — Word"
              ]
            },
            "default": [
              "overall"
            ]
          },
          "maxItemsPerChart": {
            "title": "Apps per chart",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Keep 20 for a quick, inexpensive sample. Increase up to 200 for deeper charts. This is a per-chart cap, not a total run cap. Stores may return fewer apps. For example, 2 stores × 1 country × 1 chart × 1 category × 20 = up to 40 billable rankings.",
            "default": 20
          },
          "includeAppDetails": {
            "title": "Add app details (same price, slower)",
            "type": "boolean",
            "description": "Optionally add ratings/counts, app versions, update dates, descriptions, and Android install ranges when available. Included in the ranking price, with no extra paid event. Missing detail pages keep the ranking row with detailsIncluded=false.",
            "default": false
          },
          "language": {
            "title": "Google Play text language",
            "pattern": "^(auto|[A-Za-z]{2,3}([-_][A-Za-z]{2})?)$",
            "type": "string",
            "description": "Auto chooses a local language for each country, falling back to English. Ranking market is always controlled by Countries, not by language. Apple localizes from its storefront.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Chart concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keep the default. Legacy API values from 1–10 are accepted, but execution is capped at 3 to protect reliability and memory usage.",
            "default": 2
          },
          "appleCategories": {
            "title": "Legacy Apple category IDs (API only)",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional compatibility override for Apple only. Use ALL or documented numeric genre IDs. Omit to use the simple App categories menu. Existing API inputs remain supported.",
            "items": {
              "type": "string"
            }
          },
          "googleCategories": {
            "title": "Legacy Google Play category codes (API only)",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional compatibility override for Google Play only. Omit to use the simple App categories menu. Existing API inputs remain supported.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}