{
  "openapi": "3.0.1",
  "info": {
    "title": "App Store Keyword Rank Monitor",
    "description": "Reports an app's position in Apple's public iTunes Search API results for one keyword and storefront. That number is a proxy and can differ from the App Store app. Apple's terms restrict automated rank measurement. Not affiliated with Apple.",
    "version": "1.0",
    "x-build-id": "EJMxBmR4t26i2sfql"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mmdincer~app-store-keyword-rank-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mmdincer-app-store-keyword-rank-monitor",
        "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/mmdincer~app-store-keyword-rank-monitor/runs": {
      "post": {
        "operationId": "runs-sync-mmdincer-app-store-keyword-rank-monitor",
        "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/mmdincer~app-store-keyword-rank-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-mmdincer-app-store-keyword-rank-monitor",
        "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": [
          "keywords",
          "apps"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to look up, one per line. The rank on each output row is that app's position in the iTunes Search API <code>results</code> array for this keyword and storefront. It is a proxy for App Store search rank and can differ from the App Store app. Matching is not case sensitive. At most 40. Each keyword and storefront is one Search API call, shared by every app.",
            "items": {
              "type": "string"
            }
          },
          "apps": {
            "title": "Apps",
            "type": "array",
            "description": "Apps to find in those results. Use a numeric App Store id (<code>324684580</code> in <code>apps.apple.com/.../id324684580</code>), a bundle id such as <code>com.spotify.client</code>, or an App Store URL. A bundle id is resolved with the public Lookup API. At most 8. Each app is its own output row.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Storefronts",
            "type": "array",
            "description": "Two-letter storefront codes, for example <code>US</code>, <code>TR</code>, <code>GB</code>. <code>uk</code> is read as <code>gb</code>. Case does not matter. Results differ by storefront. At most 5. Empty means <code>us</code>.",
            "default": [
              "us"
            ],
            "items": {
              "type": "string"
            }
          },
          "resultLimit": {
            "title": "Result limit",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many Search API results to request (1 to 200). 200 is the API maximum. A null rank means the app was not inside this window. It does not mean the app is absent from the App Store, and it is not the rank shown in the App Store app. A shorter limit makes a miss more likely.",
            "default": 200
          },
          "entity": {
            "title": "App kind",
            "enum": [
              "software",
              "iPadSoftware",
              "desktopSoftware"
            ],
            "type": "string",
            "description": "Which software results to ask for. <code>software</code> is iPhone. <code>iPadSoftware</code> is iPad. <code>desktopSoftware</code> is Mac. The rank is the position inside that result list only.",
            "default": "software"
          },
          "attribute": {
            "title": "Search attribute",
            "enum": [
              "all",
              "softwareDeveloper"
            ],
            "type": "string",
            "description": "Leave this on <b>All attributes</b> for a keyword rank. <b>Developer name only</b> searches the developer field and is a different question, not a keyword rank.",
            "default": "all"
          },
          "stateName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Name of the saved last rank (letters, digits, - and _). Runs with the same name, keyword, storefront, app, app kind, attribute and result limit share one memory. The memory is only the previous rank, so a scheduled run's dataset is the changelog. Stored in the key-value store <code>app-store-keyword-rank-monitor-state</code>.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many iTunes requests may be in flight at once (1 to 3). Starts are still spaced by the pause below. The default is 2.",
            "default": 2
          },
          "requestDelayMs": {
            "title": "Pause between request starts (ms)",
            "minimum": 400,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum gap between iTunes request starts. The default is 500. The minimum is 400. A 403 or 429 adds a further wait (1s, then 2s, then 4s) and then that keyword fails. The Actor does not retry on another address and does not use a proxy.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}