{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Best Sellers Scraper",
    "description": "Scrape Amazon Best Sellers rankings by category from Amazon.in (and other marketplaces). Extracts rank, title, ASIN, price, rating, reviews, and optionally full product details.",
    "version": "1.2",
    "x-build-id": "tFZzpAaTwgQkUegzv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~amazon-bestsellers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-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/w3crawler~amazon-bestsellers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-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/w3crawler~amazon-bestsellers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-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": {
          "mode": {
            "title": "Input mode",
            "enum": [
              "category",
              "categoryUrl",
              "productUrl"
            ],
            "type": "string",
            "description": "Choose category pagination, one or more category URLs, or direct product details.",
            "default": "category"
          },
          "category": {
            "title": "Category slug",
            "type": "string",
            "description": "Marketplace-relative Best Sellers category slug, such as electronics or beauty.",
            "default": "electronics"
          },
          "categoryUrl": {
            "title": "Category URL",
            "type": "string",
            "description": "One public Amazon Best Sellers category URL when mode is categoryUrl."
          },
          "categoryUrls": {
            "title": "Additional category URLs",
            "type": "array",
            "description": "Additional public Amazon Best Sellers URLs. They are processed in the supplied order.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Public Amazon product URLs when mode is productUrl.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Amazon marketplace",
            "enum": [
              "in",
              "com",
              "co.uk",
              "de",
              "co.jp",
              "ca",
              "com.au",
              "com.br"
            ],
            "type": "string",
            "description": "Marketplace used for category slugs and default locale.",
            "default": "in"
          },
          "locale": {
            "title": "Page locale",
            "type": "string",
            "description": "Accept-Language value sent to public Amazon pages.",
            "default": "en-IN"
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum source-backed product rows emitted after filters and sorting.",
            "default": 50
          },
          "maxPages": {
            "title": "Pages per category source",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum observed Amazon Best Sellers pages visited per category source. The crawler follows Amazon's public next-page link and may stop earlier when no next page or no progress is exposed.",
            "default": 2
          },
          "deepSearch": {
            "title": "Enrich with product details",
            "type": "boolean",
            "description": "Fetch each selected product page for public description, offer, feature, specification, media, and JSON-LD fields.",
            "default": false
          },
          "extractReviews": {
            "title": "Extract public reviews",
            "type": "boolean",
            "description": "Keep bounded review summaries found in public product JSON-LD when detail enrichment is enabled.",
            "default": false
          },
          "maxReviews": {
            "title": "Maximum reviews per product",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum public review summaries retained per product.",
            "default": 10
          },
          "includeMedia": {
            "title": "Include product media",
            "type": "boolean",
            "description": "Include product-scoped public image arrays during detail enrichment. The listing thumbnail remains available.",
            "default": true
          },
          "includeTechnicalDetails": {
            "title": "Include specifications",
            "type": "boolean",
            "description": "Include public attribute and product-overview rows during detail enrichment.",
            "default": true
          },
          "deduplicate": {
            "title": "Deduplicate products",
            "type": "boolean",
            "description": "Keep one row per marketplace/ASIN across pages and category sources.",
            "default": true
          },
          "dedupe": {
            "title": "Deduplicate alias",
            "type": "boolean",
            "description": "Compatibility alias for deduplicate."
          },
          "filters": {
            "title": "Listing filters",
            "type": "object",
            "description": "Filters are applied to public listing signals before sorting and the maxItems limit.",
            "properties": {
              "minRating": {
                "title": "Minimum rating",
                "type": "number",
                "minimum": 0,
                "maximum": 5,
                "description": "Keep products with at least this public rating out of 5."
              },
              "minReviewsCount": {
                "title": "Minimum reviews",
                "type": "integer",
                "minimum": 0,
                "description": "Keep products with at least this public review count."
              },
              "minPrice": {
                "title": "Minimum price",
                "type": "number",
                "minimum": 0,
                "description": "Keep products at or above this marketplace-local price."
              },
              "maxPrice": {
                "title": "Maximum price",
                "type": "number",
                "minimum": 0,
                "description": "Keep products at or below this marketplace-local price."
              },
              "includePrimeOnly": {
                "title": "Prime only",
                "type": "boolean",
                "default": false,
                "description": "Keep only cards exposing a public Prime signal."
              },
              "includeKeywords": {
                "title": "Include keywords",
                "type": "array",
                "editor": "stringList",
                "items": {
                  "type": "string"
                },
                "description": "Keep titles or card text containing at least one keyword."
              },
              "excludeKeywords": {
                "title": "Exclude keywords",
                "type": "array",
                "editor": "stringList",
                "items": {
                  "type": "string"
                },
                "description": "Discard titles or card text containing any keyword."
              }
            },
            "additionalProperties": false
          },
          "sortBy": {
            "title": "Sort products",
            "enum": [
              "rank_asc",
              "rating_desc",
              "reviews_desc",
              "price_asc",
              "price_desc",
              "title_asc"
            ],
            "type": "string",
            "description": "Stable sort applied after filtering and deduplication.",
            "default": "rank_asc"
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum duration of each public request.",
            "default": 120
          },
          "timeoutSecs": {
            "title": "Timeout alias",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "Compatibility alias for requestTimeoutSecs."
          },
          "requestTimeoutMs": {
            "title": "Timeout alias (ms)",
            "minimum": 15000,
            "maximum": 300000,
            "type": "integer",
            "description": "Compatibility alias converted to seconds."
          },
          "timeoutMs": {
            "title": "Timeout legacy alias (ms)",
            "minimum": 15000,
            "maximum": 300000,
            "type": "integer",
            "description": "Compatibility alias converted to seconds."
          },
          "navigationTimeoutMs": {
            "title": "Navigation timeout alias (ms)",
            "minimum": 15000,
            "maximum": 300000,
            "type": "integer",
            "description": "Compatibility alias converted to seconds."
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Pacing delay before each live public request.",
            "default": 500
          },
          "minDelayMs": {
            "title": "Request delay alias",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Compatibility alias for requestDelayMs."
          },
          "pageDelayMs": {
            "title": "Page delay alias",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Compatibility alias for requestDelayMs."
          },
          "maxConcurrency": {
            "title": "Maximum detail concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum simultaneous detail requests. Pagination requests remain ordered.",
            "default": 3
          },
          "concurrency": {
            "title": "Concurrency alias",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Compatibility alias for maxConcurrency."
          },
          "detailConcurrency": {
            "title": "Detail concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Explicit detail worker limit."
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries timeouts, transient failures, and rate limits; access challenges are not bypassed.",
            "default": 2
          },
          "maxRetries": {
            "title": "Retries alias",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Compatibility alias for maxRequestRetries."
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 100000,
            "maximum": 50000000,
            "type": "integer",
            "description": "Reject unusually large public responses before parsing.",
            "default": 15000000
          },
          "maxBytes": {
            "title": "Response-size alias",
            "minimum": 100000,
            "maximum": 50000000,
            "type": "integer",
            "description": "Compatibility alias for maxResponseBytes."
          },
          "userAgent": {
            "title": "Transparent user agent",
            "type": "string",
            "description": "Optional identifying user-agent string; no stealth rotation is performed."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional ordinary Apify Proxy or public HTTP(S) routing. No CAPTCHA solving or access-control bypass is attempted.",
            "properties": {
              "useApifyProxy": {
                "title": "Use Apify Proxy",
                "type": "boolean",
                "description": "Route live public requests through Apify Proxy."
              },
              "apifyProxyGroups": {
                "title": "Apify Proxy groups",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional Apify Proxy groups."
              },
              "apifyProxyCountry": {
                "title": "Apify Proxy country",
                "type": "string",
                "description": "Optional two- or three-letter country code."
              },
              "proxyUrls": {
                "title": "Public proxy URLs",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional public HTTP(S) proxy URLs used round-robin."
              }
            },
            "additionalProperties": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}