{
  "openapi": "3.0.1",
  "info": {
    "title": "China App Store Rankings: Apple, TapTap, Xiaomi",
    "description": "Unified China app store charts from Apple App Store (CN), TapTap and Xiaomi — top free, paid and grossing, plus TapTap and Xiaomi boards. Rank-change tracking, ASO-ready JSON, no login. $1 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "Yb3UV4hWgpjkfW7Sq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexsyin~china-app-rankings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexsyin-china-app-rankings",
        "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/alexsyin~china-app-rankings/runs": {
      "post": {
        "operationId": "runs-sync-alexsyin-china-app-rankings",
        "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/alexsyin~china-app-rankings/run-sync": {
      "post": {
        "operationId": "run-sync-alexsyin-china-app-rankings",
        "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": {
          "sources": {
            "title": "Stores",
            "uniqueItems": true,
            "type": "array",
            "description": "Which China app stores to include for this ASO snapshot. Leave empty to fetch all three: Apple App Store (CN), TapTap and Xiaomi GetApps. Each store is isolated — one failure does not fail the run.",
            "items": {
              "type": "string",
              "enum": [
                "apple",
                "taptap",
                "xiaomi"
              ],
              "enumTitles": [
                "Apple App Store China (iOS)",
                "TapTap rankings",
                "Xiaomi App Store rankings"
              ]
            }
          },
          "appleCharts": {
            "title": "Apple charts",
            "uniqueItems": true,
            "type": "array",
            "description": "iOS China chart types: Top Free, Top Paid and Top Grossing. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "free",
                "paid",
                "grossing"
              ],
              "enumTitles": [
                "Top Free (免费榜)",
                "Top Paid (付费榜)",
                "Top Grossing (畅销榜)"
              ]
            }
          },
          "appleCategories": {
            "title": "Apple categories (optional)",
            "type": "array",
            "description": "Limit Apple charts to these iOS genres. Use a genre name (Games, 游戏, Shopping, 购物) or an official genre id (6014 for Games). Leave empty for the overall store charts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "taptapCharts": {
            "title": "TapTap charts",
            "uniqueItems": true,
            "type": "array",
            "description": "TapTap ranking boards. Leave empty for hot, new and reserve. sell / pop / exclusive are extra public boards.",
            "items": {
              "type": "string",
              "enum": [
                "hot",
                "new",
                "reserve",
                "sell",
                "pop",
                "exclusive"
              ],
              "enumTitles": [
                "Hot / download (热门榜)",
                "New (新品榜)",
                "Reserve (预约榜)",
                "Sell (热卖榜)",
                "Played (热玩榜)",
                "Exclusive (独家榜)"
              ]
            }
          },
          "xiaomiCategories": {
            "title": "Xiaomi categories",
            "type": "array",
            "description": "Xiaomi ranking lists to fetch. Use overall (or 0 / 应用排行榜) for the main chart, or a category name or id such as 游戏, 实用工具, 15, 5. Leave empty for the overall chart only.",
            "items": {
              "type": "string"
            }
          },
          "maxPerChart": {
            "title": "Max rows per chart",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Keep only the top N apps from each store / chart / category combination. Apple official RSS supports up to 200. TapTap and Xiaomi are paginated. A first try of 10 per chart (about 70 rows) is enough to see real rankings at a lower cost; daily ASO snapshots often use 50.",
            "default": 50
          },
          "enrichDetails": {
            "title": "Enrich app details",
            "type": "boolean",
            "description": "Fetch public detail pages/APIs to fill missing developer, rating, version, file size and description. Apple uses the official iTunes Lookup API; TapTap and Xiaomi use their public detail endpoints. Off by default because it makes extra requests.",
            "default": false
          },
          "enrichLimit": {
            "title": "Max apps to enrich",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of unique apps (across all charts) to enrich in this run. Ignored when Enrich app details is off.",
            "default": 30
          },
          "trackRankChange": {
            "title": "Track rank changes",
            "type": "boolean",
            "description": "Compare each app's rank with the previous run that shares the same Memory name. Adds rankDelta (positive = moved up), previousRank and isNewEntry. The first run is the baseline: every row is marked as a new entry and rankDelta is empty.",
            "default": true
          },
          "memoryName": {
            "title": "Memory name",
            "type": "string",
            "description": "Runs that share this name share one rank-history memory. Use a different name for each Schedule or monitor.",
            "default": "default"
          },
          "useProxy": {
            "title": "Use Apify CN residential proxy",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "auto: retry a blocked request with a China residential proxy. never: do not use a proxy. always: send every request through the proxy. Public chart pages usually work without a proxy. The proxy is only used if APIFY_PROXY_PASSWORD is available in the run.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}