{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Bestsellers",
    "description": "🏆 Scrape the Amazon Best Sellers top 100 of any category, plus New Releases, Movers & Shakers, Most Wished For and Gift Ideas, across 20 Amazon stores. Get rank, ASIN, title, price, rating, reviews and image for every product. Fast, complete and in Amazon's order. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "ABY1d8vtMVKqNZ54e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_xplorer~amazon-bestsellers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_xplorer-amazon-bestsellers",
        "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/data_xplorer~amazon-bestsellers/runs": {
      "post": {
        "operationId": "runs-sync-data_xplorer-amazon-bestsellers",
        "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/data_xplorer~amazon-bestsellers/run-sync": {
      "post": {
        "operationId": "run-sync-data_xplorer-amazon-bestsellers",
        "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": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "urls",
              "categories"
            ],
            "type": "string",
            "description": "<b>Option 1, from Amazon URLs</b>: paste the URLs of the rankings you want (easiest, works for any category).<br><b>Option 2, by store & categories</b>: pick a store, one or more rankings and categories, or a whole store, without collecting URLs.",
            "default": "urls"
          },
          "startUrls": {
            "title": "Amazon list URLs",
            "type": "array",
            "description": "Open a ranking on Amazon (Best Sellers, New Releases, Movers & Shakers, Most Wished For or Gift Ideas), in any category and any country, and paste its URL. Example: <code>https://www.amazon.com/gp/bestsellers/electronics/</code>. One URL = one list of up to 100 products.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "marketplace": {
            "title": "Amazon store",
            "enum": [
              "com",
              "co.uk",
              "de",
              "fr",
              "it",
              "es",
              "nl",
              "com.be",
              "se",
              "pl",
              "com.tr",
              "ca",
              "com.mx",
              "com.br",
              "co.jp",
              "in",
              "com.au",
              "sg",
              "ae",
              "sa"
            ],
            "type": "string",
            "description": "Country store to scrape.",
            "default": "com"
          },
          "listTypes": {
            "title": "Rankings",
            "type": "array",
            "description": "Which Amazon rankings to scrape for the categories below.",
            "items": {
              "type": "string",
              "enum": [
                "bestsellers",
                "new-releases",
                "movers-and-shakers",
                "most-wished-for",
                "most-gifted"
              ],
              "enumTitles": [
                "Best Sellers",
                "New Releases",
                "Movers & Shakers (24h gainers)",
                "Most Wished For",
                "Gift Ideas (Most Gifted)"
              ]
            },
            "default": [
              "bestsellers"
            ]
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "The category name as it appears in Amazon URLs, after <code>/bestsellers/</code>. Examples: <code>electronics</code>, <code>kitchen</code>, <code>toys-and-games</code>. For a precise subcategory, add its number: <code>electronics/172541</code> (Headphones). Not sure of the name? Use Option 1 and paste the URL instead.",
            "items": {
              "type": "string"
            }
          },
          "allDepartments": {
            "title": "Every department",
            "type": "boolean",
            "description": "Ignore the categories above and scrape every top-level department of the store (about 30 to 40 lists). Combine with <i>Include subcategories</i> to go deeper.",
            "default": false
          },
          "subcategories": {
            "title": "Include subcategories",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "all"
            ],
            "type": "string",
            "description": "Also scrape the rankings of the subcategories under each list. Example with Electronics: <i>1 level</i> adds Headphones, Cameras, Computers…; <i>2 levels</i> also adds Earbuds, Over-Ear Headphones…",
            "default": "0"
          },
          "maxItemsPerCategory": {
            "title": "Products per list",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keep the top N of each list. Amazon publishes up to 100. Choosing 50 or less is twice as fast (one page per list instead of two).",
            "default": 100
          },
          "maxCategories": {
            "title": "Max lists",
            "minimum": 1,
            "type": "integer",
            "description": "Stop adding lists after this many (your lists + subcategories). A safety limit so a run with subcategories can't grow bigger than you expect. 1 list = up to 100 products.",
            "default": 1000
          },
          "maxItems": {
            "title": "Max products in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many products. 0 = no limit. Products are kept in Amazon's order: with <i>Every department</i> and 1000, you get the full top 100 of the first 10 departments as listed on Amazon.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}