{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Keyword Rank Tracker",
    "description": "[ 1k / 1$ ] Amazon Keyword Rank Tracker that follows where your ASINs and brands rank in Amazon search for any keyword: organic and sponsored positions, share of shelf, SERP snapshots and rank changes since the last run. Monitor Amazon SEO over time.",
    "version": "0.1",
    "x-build-id": "m0lXhbQn8WDXI6AF3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phone_number_scraper~amazon-keyword-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phone_number_scraper-amazon-keyword-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/phone_number_scraper~amazon-keyword-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-phone_number_scraper-amazon-keyword-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/phone_number_scraper~amazon-keyword-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-phone_number_scraper-amazon-keyword-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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search phrases to check.",
            "items": {
              "type": "string"
            }
          },
          "asins": {
            "title": "ASINs to track",
            "type": "array",
            "description": "ASINs (or product URLs) whose rank you want to track.",
            "items": {
              "type": "string",
              "pattern": "^(https?://([a-z0-9-]+\\.)*amazon\\.[a-z.]{2,6}/\\S*|[A-Za-z0-9]{10})$"
            }
          },
          "brands": {
            "title": "Brands to track",
            "type": "array",
            "description": "Every result whose title contains the brand counts as a match (first match = the brand's rank, all matches = its share of shelf).",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Amazon marketplace",
            "enum": [
              "amazon.com",
              "amazon.co.uk",
              "amazon.de",
              "amazon.fr",
              "amazon.it",
              "amazon.es",
              "amazon.nl",
              "amazon.se",
              "amazon.pl",
              "amazon.com.be",
              "amazon.ca",
              "amazon.com.mx",
              "amazon.com.br",
              "amazon.in",
              "amazon.co.jp",
              "amazon.com.au",
              "amazon.sg",
              "amazon.ae",
              "amazon.sa",
              "amazon.com.tr",
              "amazon.eg"
            ],
            "type": "string",
            "description": "Amazon site to use. It is used for plain ASINs, keywords and names; a full Amazon URL always keeps its own marketplace. Prices, currency and availability follow the marketplace and the visitor's location.",
            "default": "amazon.com"
          },
          "department": {
            "title": "Department",
            "type": "string",
            "description": "Optional search department (Amazon's 'search-alias' / category dropdown) such as electronics, garden, fashion, stripbooks, toys-and-games or aps for all departments. Empty searches every department."
          },
          "deliveryZip": {
            "title": "Delivery ZIP code (amazon.com)",
            "pattern": "^(\\d{5})?$",
            "type": "string",
            "description": "US ZIP code (5 digits) for amazon.com, chosen the way a visitor does with the 'Deliver to' link before scraping: search results and rankings depend on the delivery location. Leave empty to keep the location Amazon assigns to your network. Ignored, with a warning, on other marketplaces."
          },
          "maxItems": {
            "title": "Search depth (positions per keyword)",
            "minimum": 1,
            "type": "integer",
            "description": "How many result positions to scan per keyword (ads count as positions). A page holds roughly 16–48 results.",
            "default": 15
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Report rank changes against the previous run of the same tracking name.",
            "default": true
          },
          "historyName": {
            "title": "Tracking name",
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "type": "string",
            "description": "Name of this tracking project. Each name keeps its own remembered history, so you can run several independent tracking projects (for example per client or per product list) with the same Actor.",
            "default": "default"
          },
          "rankChangeAlertThreshold": {
            "title": "Rank change alert threshold",
            "minimum": 1,
            "type": "integer",
            "description": "Flag a record as an alert when the organic rank moved by at least this many positions since the last run."
          },
          "includeSerpResults": {
            "title": "Include every SERP position",
            "type": "boolean",
            "description": "Also write one `serpResult` record for every scanned position (the full ranked list).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel items",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many input items (keywords, URLs, ASINs, profiles ...) are processed at the same time, each in its own browser. A higher value finishes faster but needs more memory (about 600 MB per browser - the run never starts more browsers than its memory allows) and sends more simultaneous requests to Amazon; 2 to 5 is a good range.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}