{
  "openapi": "3.0.1",
  "info": {
    "title": "App Store Top Charts & Keyword Rank Tracker",
    "description": "App Store rank tracker: returns where iPhone/iPad apps rank in top charts and keyword search. Input: countries (ISO-2), charts, categories, keywords, app IDs to track. Output: one row per app, chart/keyword and country: rank or found=false, app ID, name, developer. Official Apple feeds; no login.",
    "version": "0.1",
    "x-build-id": "K0bYWzqBFotqlhprg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/echolab~app-store-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-echolab-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/echolab~app-store-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-echolab-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/echolab~app-store-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-echolab-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",
        "properties": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "App Store storefronts as ISO 3166-1 alpha-2 codes, e.g. us, gb, de, jp, br. Every chart and keyword is checked in every country.",
            "items": {
              "type": "string"
            },
            "default": [
              "us"
            ]
          },
          "charts": {
            "title": "Top charts",
            "type": "array",
            "description": "Which top charts to fetch. Leave empty to only check keywords.",
            "items": {
              "type": "string",
              "enum": [
                "top-free-iphone",
                "top-paid-iphone",
                "top-grossing-iphone",
                "top-free-ipad",
                "top-paid-ipad",
                "top-grossing-ipad",
                "new-apps",
                "new-free-apps",
                "new-paid-apps",
                "top-free-mac"
              ],
              "enumTitles": [
                "Top Free iPhone",
                "Top Paid iPhone",
                "Top Grossing iPhone",
                "Top Free iPad",
                "Top Paid iPad",
                "Top Grossing iPad",
                "New Apps",
                "New Free Apps",
                "New Paid Apps",
                "Top Free Mac"
              ]
            },
            "default": [
              "top-free-iphone"
            ]
          },
          "genres": {
            "title": "Categories (genres)",
            "type": "array",
            "description": "\"all\" for the overall chart, or Apple genre IDs / names, e.g. 6007 or Productivity, 6015 Finance, 6013 Health & Fitness, 6014 Games, 7012 Games: Puzzle. Full list in the README.",
            "items": {
              "type": "string"
            },
            "default": [
              "all"
            ]
          },
          "chartLimit": {
            "title": "Apps per chart",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many positions to return from each chart (Apple publishes at most 100).",
            "default": 100
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to check rankings for, e.g. \"habit tracker\". Ranks follow the order of Apple's public iTunes Search API (top 200).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywordResultsLimit": {
            "title": "Results per keyword",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many top search results to return per keyword and country (0-200). Set 0 with tracked apps to return only your tracked apps' positions.",
            "default": 25
          },
          "trackAppIds": {
            "title": "Track these apps",
            "type": "array",
            "description": "Optional. App Store IDs or app URLs (e.g. https://apps.apple.com/us/app/id1438388363). For each chart and keyword you get a row with the app's position, or found=false if it is not ranked.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "trackedAppsOnly": {
            "title": "Only return tracked apps",
            "type": "boolean",
            "description": "Return only the rows for your tracked apps (one row per app per chart/keyword) instead of full lists. Cheapest way to run a daily rank tracker.",
            "default": false
          },
          "includeAppDetails": {
            "title": "Add rating & version details to chart rows",
            "type": "boolean",
            "description": "Adds average rating, rating count, current version, size and content rating to chart rows (one extra Apple request per chart). Keyword rows always include these.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Delay between search requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Apple's search API allows roughly 20 requests per minute. Keep at 3 or above for reliable runs.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}