{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Best Sellers Scraper API – Top 100 & Rank Changes",
    "description": "Get the top 100 of any Amazon Best Sellers or New Releases list on 22 marketplaces: rank, ASIN, title, price, rating, reviews, image and category path. Crawl subcategories and see rank changes since your last run. No login. 500 free a month, then $0.40/1,000.",
    "version": "0.1",
    "x-build-id": "BSvXGYePNpWpEc8Hx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/k-data-lab~amazon-bestsellers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-k-data-lab-amazon-bestsellers-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/k-data-lab~amazon-bestsellers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-k-data-lab-amazon-bestsellers-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/k-data-lab~amazon-bestsellers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-k-data-lab-amazon-bestsellers-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": {
          "startUrls": {
            "title": "🔗 Best Sellers / New Releases URLs",
            "type": "array",
            "description": "Paste Amazon Best Sellers or New Releases list links from any of the 22 marketplaces, e.g. https://www.amazon.com/gp/bestsellers/electronics or https://www.amazon.de/gp/new-releases/kitchen. Category links like https://www.amazon.com/Best-Sellers-Cell-Phones-Accessories/zgbs/wireless/2407760011 work too. Each list gives up to 100 ranked products.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "🌍 Marketplace (for categories / all departments)",
            "enum": [
              "com",
              "co.uk",
              "de",
              "fr",
              "it",
              "es",
              "ca",
              "com.mx",
              "com.br",
              "co.jp",
              "in",
              "com.au",
              "nl",
              "pl",
              "se",
              "com.be",
              "ie",
              "com.tr",
              "ae",
              "sa",
              "eg",
              "sg"
            ],
            "type": "string",
            "description": "Amazon site used for the \"Categories\" and \"All departments\" options below. Links in \"Best Sellers / New Releases URLs\" keep their own site.",
            "default": "com"
          },
          "listType": {
            "title": "📋 List type (for categories / all departments)",
            "enum": [
              "bestsellers",
              "new-releases"
            ],
            "type": "string",
            "description": "Best Sellers (updated hourly by Amazon) or New Releases (best-selling new and future releases).",
            "default": "bestsellers"
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Category part of the list URL, without the domain: \"electronics\", \"books\", \"kitchen\", or with a subcategory ID: \"wireless/2407760011\" (Cell Phone Cases). Combined with the marketplace and list type above.",
            "items": {
              "type": "string"
            }
          },
          "allDepartments": {
            "title": "🏬 All departments",
            "type": "boolean",
            "description": "Scrape the top-level list of every department of the chosen marketplace (about 40 on amazon.com, up to 4,000 products). Combine with subcategory depth for a deeper crawl.",
            "default": false
          },
          "subcategoryDepth": {
            "title": "🌳 Subcategory depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "0 = only the lists you entered. 1 = also every direct subcategory (e.g. Electronics → Headphones, Camera & Photo, …). 2 = their subcategories too. Each list is up to 100 products, so depth grows results fast; \"Max lists\" caps it.",
            "default": 0
          },
          "maxItemsPerList": {
            "title": "Max products per list",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Amazon ranks at most 100 products per list. Lower it (e.g. 10) for a quick top-10 snapshot of many categories.",
            "default": 100
          },
          "maxLists": {
            "title": "Max lists",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on how many lists (categories) one run scrapes, including subcategories found by the crawl.",
            "default": 200
          },
          "trackRankChanges": {
            "title": "📈 Track rank changes",
            "type": "boolean",
            "description": "Remember each list's ranks and add previousRank, rankChange (+3 = climbed 3 places) and isNewEntry versus your previous run of the same list. Schedule the actor hourly or daily to monitor a category. Snapshots are kept in your own account.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}