{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Bestseller Scraper",
    "description": "Scrapes Amazon Best Sellers, Movers and Shakers, New Releases, Most Wished For, and Most Gifted product lists. Extracts product details including name, price, URL, thumbnail, and position. Supports multiple Amazon domains: US, UK, DE, FR, ES, and IT",
    "version": "1.0",
    "x-build-id": "MsOXnOWu7sPcfPzUu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~amazon-bestseller-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-amazon-bestseller-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/crawlerbros~amazon-bestseller-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-amazon-bestseller-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/crawlerbros~amazon-bestseller-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-amazon-bestseller-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",
        "required": [
          "chartType"
        ],
        "properties": {
          "chartType": {
            "title": "Chart type",
            "enum": [
              "bestSellers",
              "newReleases",
              "mostWishedFor",
              "mostGifted",
              "moversAndShakers"
            ],
            "type": "string",
            "description": "Which Amazon chart to scrape.",
            "default": "bestSellers"
          },
          "domain": {
            "title": "Amazon domain",
            "enum": [
              "amazon.com",
              "amazon.co.uk",
              "amazon.de",
              "amazon.fr",
              "amazon.it",
              "amazon.es",
              "amazon.ca",
              "amazon.com.au",
              "amazon.co.jp",
              "amazon.in",
              "amazon.com.br",
              "amazon.com.mx",
              "amazon.nl",
              "amazon.se",
              "amazon.pl",
              "amazon.com.tr",
              "amazon.ae",
              "amazon.sa",
              "amazon.sg",
              "amazon.eg"
            ],
            "type": "string",
            "description": "Which Amazon marketplace to scrape the chart from.",
            "default": "amazon.com"
          },
          "categoryUrls": {
            "title": "Category URLs or slugs",
            "type": "array",
            "description": "Amazon category slugs (e.g. `electronics`, `electronics/172541`) or full chart URLs to scrape. Each entry is combined with `chartType` and `domain` to build the chart page.",
            "default": [
              "electronics"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryNodeIds": {
            "title": "Category node IDs",
            "type": "array",
            "description": "Amazon browse-node IDs in `rootSlug/nodeId` form (e.g. `electronics/172541` for Headphones). Combined with `categoryUrls` if both are provided.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxDepth": {
            "title": "Subcategory recursion depth",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "When > 0, also walk each category's left-nav subcategory links this many levels deep, scraping each subcategory's own chart too. 0 = only the given categories.",
            "default": 0
          },
          "startPage": {
            "title": "Start page",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "First chart page to fetch (each page is a separate ranked page on Amazon's site, not a fixed rank count).",
            "default": 1
          },
          "maxPages": {
            "title": "Max pages per category",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of chart pages to fetch per category, starting at `startPage`.",
            "default": 2
          },
          "maxItemsPerCategory": {
            "title": "Max items per category",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on chart items emitted per category (across all its pages).",
            "default": 60
          },
          "maxItems": {
            "title": "Max total items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on total chart items emitted across all categories in this run.",
            "default": 200
          },
          "includeProductDetails": {
            "title": "Enrich with product detail page",
            "type": "boolean",
            "description": "For each chart item, also fetch its product detail page for purchase-option and additional rating data. Slower and bounded by `maxProductDetails`.",
            "default": false
          },
          "maxProductDetails": {
            "title": "Max product detail fetches",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard cap on how many chart items get product-detail enrichment when `includeProductDetails` is on.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy used to fetch chart pages. Datacenter (AUTO) is used by default and works for most requests; the actor escalates to residential only after repeated blocks on a session.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}