{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Product Scraper",
    "description": "Input product name, location, price and sort search results then extract product titles, ASINs, prices, ratings, reviews, stock status, delivery estimates, features, specs, seller info, and bestseller ranks from any Amazon product.",
    "version": "0.0",
    "x-build-id": "r6dv7KvFVzEye3dp5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codenest~amazon-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codenest-amazon-product-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/codenest~amazon-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-codenest-amazon-product-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/codenest~amazon-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-codenest-amazon-product-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": {
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Enter one or more search keywords (e.g. \"car\", \"toys\", \"electronics\", \"wireless earbuds\"). The scraper will search Amazon and scrape the matching products.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Amazon Marketplace / Country Location (Optional)",
            "enum": [
              "US",
              "UK",
              "DE",
              "CA",
              "IN",
              "FR",
              "IT",
              "ES",
              "JP",
              "AU",
              "AE",
              "SA",
              "MX",
              "BR",
              "NL",
              "SG",
              "TR",
              "PL",
              "SE",
              "BE",
              "EG"
            ],
            "type": "string",
            "description": "Select an Amazon regional store to search. If left default (US) or blank, it searches Amazon.com, which is Amazon's global store that ships worldwide to any country.",
            "default": "US"
          },
          "maxItemsPerKeyword": {
            "title": "Max Items Per Keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of products to scrape for each search keyword. Default is 20.",
            "default": 20
          },
          "scrapeProductDetails": {
            "title": "Scrape Deep Product Details",
            "type": "boolean",
            "description": "If enabled (recommended), fetches full product detail pages (specifications, high-res images, bullet features, seller info, variants). If disabled, extracts product list data directly from search result cards (super fast, finishes 100 items in seconds).",
            "default": true
          },
          "sortBy": {
            "title": "Sort Search Results By (Optional)",
            "enum": [
              "relevance",
              "price-asc-rank",
              "price-desc-rank",
              "review-rank",
              "date-desc-rank"
            ],
            "type": "string",
            "description": "Sort order for Amazon keyword search results. Default is Featured / Relevance.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum Price Filter (Optional)",
            "type": "number",
            "description": "Filter search results with minimum price in local currency (e.g. 10). Leave empty for no minimum limit."
          },
          "maxPrice": {
            "title": "Maximum Price Filter (Optional)",
            "type": "number",
            "description": "Filter search results with maximum price in local currency (e.g. 50). Leave empty for no maximum limit."
          },
          "productUrls": {
            "title": "Direct Product URLs or ASINs (Optional)",
            "type": "array",
            "description": "Direct Amazon product URLs or 10-character ASINs (e.g. https://www.amazon.com/dp/B0G4SW3XXP or B0G4SW3XXP). Can be combined with keywords or used alone.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrency (Speed)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of product pages to scrape in parallel. Higher values (8-12) scrape significantly faster. Default is 8.",
            "default": 8
          },
          "minDelayMs": {
            "title": "Minimum Delay (ms)",
            "minimum": 100,
            "type": "integer",
            "description": "Minimum delay in milliseconds between requests. Default is 400ms for fast extraction.",
            "default": 400
          },
          "maxDelayMs": {
            "title": "Maximum Delay (ms)",
            "minimum": 200,
            "type": "integer",
            "description": "Maximum delay in milliseconds between requests. Default is 1200ms.",
            "default": 1200
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Apify Residential proxies matching the target Amazon marketplace are highly recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}