{
  "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.1",
    "x-build-id": "RR5YCKhYqDbsJPmyH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codingfrontend~amazon-bestsellers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codingfrontend-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/codingfrontend~amazon-bestsellers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-codingfrontend-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/codingfrontend~amazon-bestsellers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-codingfrontend-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": "What to collect",
            "enum": [
              "category",
              "categoryUrl",
              "productUrl"
            ],
            "type": "string",
            "description": "Choose an Amazon Best Sellers category, a Best Sellers page URL, or product page URLs.",
            "default": "category"
          },
          "category": {
            "title": "Category slug",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$",
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "Amazon Best Sellers category slug used in category mode, such as electronics or books.",
            "default": "electronics"
          },
          "categoryUrl": {
            "title": "Best Sellers page URL",
            "maxLength": 2048,
            "type": "string",
            "description": "Required in Best Sellers URL mode. Must be a public Best Sellers page on the selected marketplace.",
            "default": ""
          },
          "productUrls": {
            "title": "Product page URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Required in Product URLs mode. Provide up to 100 public Amazon product pages; each URL selects its own marketplace.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            "default": []
          },
          "country": {
            "title": "Amazon marketplace",
            "enum": [
              "com",
              "in",
              "co.uk",
              "de",
              "co.jp",
              "ca",
              "com.au",
              "com.br"
            ],
            "type": "string",
            "description": "Marketplace for category modes. Product URLs use the marketplace in each URL.",
            "default": "com"
          },
          "locale": {
            "title": "Request language",
            "enum": [
              "en-IN",
              "en-US",
              "en-GB",
              "de-DE",
              "ja-JP",
              "fr-CA",
              "en-AU",
              "pt-BR"
            ],
            "type": "string",
            "description": "Optional request language. When omitted, category requests use the selected marketplace language and each product URL uses its own marketplace language."
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum products to save. In category modes this is the run-wide saved-record limit; in Product URLs mode it caps the number processed.",
            "default": 50
          },
          "maxPages": {
            "title": "Maximum Best Sellers pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum category pages to read in category modes. The Actor follows only next-page links published by the listing page.",
            "default": 2
          },
          "deepSearch": {
            "title": "Read product details",
            "type": "boolean",
            "description": "In category modes, visit selected product pages for additional public details. Product URLs mode always reads product pages.",
            "default": false
          },
          "extractReviews": {
            "title": "Include public review excerpts",
            "type": "boolean",
            "description": "Read up to ten publicly visible review excerpts from each product page when available. Requires Read product details.",
            "default": false
          },
          "includeMedia": {
            "title": "Include product media",
            "type": "boolean",
            "description": "Include public product gallery images and video links when available. The Actor returns links and does not download media files.",
            "default": true
          },
          "includeTechnicalDetails": {
            "title": "Include specifications",
            "type": "boolean",
            "description": "Include technical attributes, named specification sections, and overview rows on product pages.",
            "default": true
          },
          "filters": {
            "title": "Category filters",
            "type": "object",
            "description": "Optional filters applied to category results before products are saved. They do not filter direct product URLs.",
            "properties": {
              "minRating": {
                "title": "Minimum rating",
                "type": "number",
                "description": "Keep products with at least this published rating, from 0 to 5.",
                "minimum": 0,
                "maximum": 5
              },
              "minReviewsCount": {
                "title": "Minimum reviews or ratings",
                "type": "integer",
                "description": "Keep products with at least this many published reviews or ratings.",
                "minimum": 0,
                "maximum": 1000000000
              },
              "minPrice": {
                "title": "Minimum price",
                "type": "number",
                "description": "Keep products whose published current price, or explicit offers-from minimum when no current price is shown, is at least this amount. No currency conversion is performed.",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "maxPrice": {
                "title": "Maximum price",
                "type": "number",
                "description": "Keep products whose published current price, or explicit offers-from minimum when no current price is shown, is at most this amount. No currency conversion is performed.",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "includePrimeOnly": {
                "title": "Prime badge only",
                "type": "boolean",
                "description": "Keep only listing cards that display a public Prime badge.",
                "default": false
              },
              "includeKeywords": {
                "title": "Include keywords",
                "type": "array",
                "description": "Keep a product when one or more words appear in the available product title, brand, product description, feature bullets, or attribute labels and values.",
                "editor": "stringList",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "default": [],
                "maxItems": 50
              },
              "excludeKeywords": {
                "title": "Exclude keywords",
                "type": "array",
                "description": "Discard a product when any word appears in the available product title, brand, product description, feature bullets, or attribute labels and values.",
                "editor": "stringList",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "default": [],
                "maxItems": 50
              }
            },
            "default": {},
            "additionalProperties": false
          },
          "deduplicate": {
            "title": "Remove duplicate products",
            "type": "boolean",
            "description": "Avoid saving repeated ASINs across category pages or repeated marketplace and ASIN pairs in Product URLs mode.",
            "default": true
          },
          "minDelayMs": {
            "title": "Minimum wait between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum pacing delay between serialized public requests.",
            "default": 500
          },
          "maxDelayMs": {
            "title": "Maximum wait between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum randomized pacing delay between serialized public requests. Must be at least the minimum delay.",
            "default": 1500
          },
          "maxRetries": {
            "title": "Retries for temporary failures",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Additional attempts for transient network failures. Access denials, challenges, and rate limits are not retried.",
            "default": 2
          },
          "navigationTimeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 5000,
            "maximum": 180000,
            "type": "integer",
            "description": "Maximum time for each public page request; the Actor also has a finite overall run budget.",
            "default": 60000
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Optional request routing. Direct requests are the default. Apify Proxy use may incur account charges.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}