{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Bestsellers Scraper · 20 Marketplaces",
    "description": "Extract Amazon's Best Sellers, Movers and Shakers, New Releases, Most Wished For and Most Gifted rankings across 20 marketplaces. Returns top 100 per category with rank, ASIN, brand, price, list price, stars, reviews, Amazon's Choice / Prime / deal badges. Pay-per-result.",
    "version": "1.0",
    "x-build-id": "MdqZ70NHKNSNH3rMV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/santamaria-automations~amazon-bestsellers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-santamaria-automations-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/santamaria-automations~amazon-bestsellers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-santamaria-automations-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/santamaria-automations~amazon-bestsellers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-santamaria-automations-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": "Category URLs",
            "type": "array",
            "description": "Amazon bestseller-list URLs. Any `/gp/bestsellers/...`, `/zgbs/...`, `/Best-Sellers-...`, `/gp/movers-and-shakers/...`, `/gp/new-releases/...`, `/gp/most-wished-for/...` or `/gp/most-gifted/...` URL works. Marketplace AND list type are auto-detected from the URL. Combine with the Browse Node IDs field below — both are merged into one queue.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "categoryUrls": {
            "title": "Category URLs (alias)",
            "type": "array",
            "description": "Alias for the Category URLs field above. Use whichever feels more natural — both are merged into the same queue.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "browseNodeIds": {
            "title": "Browse Node IDs",
            "type": "array",
            "description": "Amazon browse-node IDs (numeric strings). The Marketplace Country below selects which Amazon to use, and the Movers / New Releases / Most Wished For / Most Gifted toggles below pick which list to scrape. Example: `172282` for Electronics on amazon.com.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          "country": {
            "title": "Marketplace Country",
            "enum": [
              "US",
              "CA",
              "MX",
              "BR",
              "UK",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "SE",
              "PL",
              "TR",
              "JP",
              "IN",
              "AU",
              "SG",
              "SA",
              "AE",
              "EG"
            ],
            "type": "string",
            "description": "Which Amazon marketplace to use for the Browse Node IDs field above. Ignored for entries in Category URLs (TLD is detected from the URL).",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "enum": [
              "AUTO",
              "en",
              "de",
              "fr",
              "it",
              "es",
              "ja",
              "pt",
              "ar",
              "tr",
              "sv",
              "nl",
              "pl"
            ],
            "type": "string",
            "description": "Accept-Language preference sent to Amazon. `AUTO` matches the marketplace (e.g. de-DE for Germany, ja-JP for Japan) — recommended unless you need consistent English copy across all marketplaces.",
            "default": "AUTO"
          },
          "maxResultsPerCategory": {
            "title": "Max Results per Category",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap the number of products returned per category. Amazon caps each list at 100, so the maximum is 100. Default 100.",
            "default": 100
          },
          "maxResults": {
            "title": "Max Total Results",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on the total number of rows across all categories combined. `0` = unlimited (only Max Results per Category limits the run).",
            "default": 0
          },
          "movers": {
            "title": "Scrape Movers & Shakers (instead of Best Sellers)",
            "type": "boolean",
            "description": "When true, scrape Amazon's `/gp/movers-and-shakers/...` ranking (biggest gainers in sales rank over the last 24 hours) instead of the default Best Sellers list. Applies to Browse Node IDs; Category URLs always honor their own path.",
            "default": false
          },
          "newReleases": {
            "title": "Scrape New Releases (instead of Best Sellers)",
            "type": "boolean",
            "description": "When true, scrape Amazon's `/gp/new-releases/...` ranking. Applies to Browse Node IDs; Category URLs always honor their own path.",
            "default": false
          },
          "mostWished": {
            "title": "Scrape Most Wished For (instead of Best Sellers)",
            "type": "boolean",
            "description": "When true, scrape Amazon's `/gp/most-wished-for/...` ranking (most-added-to-wishlists). Applies to Browse Node IDs.",
            "default": false
          },
          "mostGifted": {
            "title": "Scrape Most Gifted (instead of Best Sellers)",
            "type": "boolean",
            "description": "When true, scrape Amazon's `/gp/most-gifted/...` ranking (most popular gift purchases). Applies to Browse Node IDs.",
            "default": false
          },
          "concurrency": {
            "title": "Concurrent Categories",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Categories fetched in parallel. 3-5 is reliable for most workloads. Pages within a single category are fetched sequentially to preserve session warmth.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}