{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Bestsellers Scraper",
    "description": "Scrape Amazon Best Sellers, New Releases, Movers & Shakers, Most Wished For and Gift Ideas rankings by category across 10 marketplaces. Returns ranked products with rank, ASIN, title, price, rating, review count, Prime status and image, with no login.",
    "version": "0.7",
    "x-build-id": "Nq1dcMZLRRXMGHmxB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~amazon-bestsellers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~amazon-bestsellers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~amazon-bestsellers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": "Amazon chart URLs",
            "type": "array",
            "description": "HTTPS Amazon ranking-chart URLs to scrape — Best Sellers, New Releases, Movers & Shakers, Most Wished For, or Gift Ideas pages (e.g. https://www.amazon.com/gp/bestsellers/electronics). Paste a category or subcategory chart URL from any of the 21 supported marketplaces, without URL credentials or a custom port; the chart type and marketplace are auto-detected from each URL. Leave empty to use the Chart type + Marketplace fields below instead. This is NOT a single product (/dp/) or search (/s?k=) URL — for product detail use the amazon-product-intelligence actor.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "chartType": {
            "title": "Chart type",
            "enum": [
              "bestsellers",
              "new-releases",
              "movers-and-shakers",
              "most-wished-for",
              "gift-ideas"
            ],
            "type": "string",
            "description": "Which Amazon ranking chart to scrape when you do not paste explicit Start URLs. 'bestsellers' = top 100 by sales; 'new-releases' = trending new products; 'movers-and-shakers' = biggest sales-rank jumps in the last 24 hours; 'most-wished-for' = most added to wish lists; 'gift-ideas' = most gifted. Defaults to bestsellers. Ignored when Start URLs are provided (the type is auto-detected from each URL).",
            "default": "bestsellers"
          },
          "marketplace": {
            "title": "Marketplace",
            "enum": [
              "US",
              "UK",
              "DE",
              "FR",
              "IT",
              "ES",
              "CA",
              "JP",
              "IN",
              "AU",
              "MX",
              "BR",
              "NL",
              "SE",
              "PL",
              "TR",
              "AE",
              "SA",
              "SG",
              "EG",
              "BE"
            ],
            "type": "string",
            "description": "Amazon marketplace (country) to scrape when using Chart type instead of Start URLs. Selects the domain and a geo-matched residential proxy (e.g. 'US' uses amazon.com via a US IP). One of US, UK, DE, FR, IT, ES, CA, JP, IN, AU, MX, BR, NL, SE, PL, TR, AE, SA, SG, EG, BE. Defaults to US. Ignored when Start URLs are provided (the domain is read from each URL).",
            "default": "US"
          },
          "categorySlug": {
            "title": "Category (optional)",
            "type": "string",
            "description": "Optional category name when using Chart type, for example 'electronics', 'books', 'kitchen' or 'toys and games'. Spaces and '&' are fine. Most names are shared across countries; where Amazon uses a different code (for example Electronics on amazon.de) it is translated for you. If a category returns nothing, the run summary lists the categories that marketplace offers. Leave empty for a cross-department sample of the top ~30 products; specify a category to get the full ranked top 100. Ignored when Start URLs are provided.",
            "default": ""
          },
          "maxItemsPerCategory": {
            "title": "Max products per chart",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of ranked products to return per chart/category page. Amazon publishes at most 100 products per chart (two pages of 50), so values above 100 are capped at 100. Defaults to 100. Lower it (for example 20) to cut cost and runtime when you only need the very top of each list.",
            "default": 100
          },
          "includeSubcategories": {
            "title": "Crawl subcategories",
            "type": "boolean",
            "description": "When enabled, also scrapes the immediate subcategory charts linked in the left-hand navigation of each start page (one level deep, same chart type). This greatly increases result count and cost — a department such as Electronics has 20-40 subcategories. Defaults to false (scrape only the exact pages you provide). Each subcategory is still capped by Max products per chart.",
            "default": false
          },
          "trackChanges": {
            "title": "Track rank changes",
            "type": "boolean",
            "description": "When enabled (default), each product shows its rank in your previous run of the same chart: previousRank, rankChange (positive = climbed), changeStatus (new, up, down, same or baseline on a first run), and the run summary lists products that dropped out. History is kept in a store named amazon-bestsellers-history in your account. No extra charge.",
            "default": true
          },
          "blockImages": {
            "title": "Skip images while loading",
            "type": "boolean",
            "description": "When enabled (default), the browser does not download product images, fonts or video while reading a chart page. Image links are still returned in imageUrl. This cuts proxy data and run cost without changing the results. Turn off only if a chart behaves differently for you.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Amazon blocks datacenter IPs on the first request, so this defaults to Apify residential proxies geo-matched to the marketplace — keep the default unless you have a specific reason to change it. You can pin a country or supply custom proxy URLs here.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}