{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Product Scraper",
    "description": "Scrape Amazon products, reviews, best seller lists, and seller profiles from any Amazon domain. Supports keyword search, ASIN lookup, review filtering, and pagination.",
    "version": "1.0",
    "x-build-id": "OahelzIJkUvUlEXfg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magicfingers~amazon-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magicfingers-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/magicfingers~amazon-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-magicfingers-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/magicfingers~amazon-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-magicfingers-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",
        "required": [
          "mode",
          "domain"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "SEARCH",
              "PRODUCT_DETAIL",
              "REVIEWS",
              "BEST_SELLERS",
              "SELLER_PROFILE"
            ],
            "type": "string",
            "description": "Choose what to scrape.",
            "default": "SEARCH"
          },
          "searchQueries": {
            "title": "Search Keywords",
            "type": "array",
            "description": "List of keywords to search for on Amazon. Used in SEARCH mode.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "asins": {
            "title": "ASINs or Product URLs",
            "type": "array",
            "description": "List of ASINs or full Amazon product URLs. Used in PRODUCT_DETAIL and REVIEWS modes.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "categoryUrls": {
            "title": "Best Seller Category URLs",
            "type": "array",
            "description": "Full URLs to Amazon Best Seller category pages. Used in BEST_SELLERS mode.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sellerIds": {
            "title": "Seller IDs or URLs",
            "type": "array",
            "description": "Amazon seller IDs or full storefront URLs. Used in SELLER_PROFILE mode.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "domain": {
            "title": "Amazon Domain",
            "enum": [
              "amazon.com",
              "amazon.co.uk",
              "amazon.de",
              "amazon.fr",
              "amazon.it",
              "amazon.es",
              "amazon.ca",
              "amazon.com.au",
              "amazon.in",
              "amazon.co.jp"
            ],
            "type": "string",
            "description": "Which Amazon marketplace to scrape.",
            "default": "amazon.com"
          },
          "maxSearchResults": {
            "title": "Max Search Results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of products to return from search. 0 = unlimited.",
            "default": 5
          },
          "maxSearchPages": {
            "title": "Max Search Pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of search result pages to scrape per query.",
            "default": 5
          },
          "scrapeProductDetails": {
            "title": "Scrape Full Product Details",
            "type": "boolean",
            "description": "In SEARCH mode, also visit each product page for full details (slower but more data).",
            "default": false
          },
          "scrapeReviews": {
            "title": "Also Scrape Reviews",
            "type": "boolean",
            "description": "In PRODUCT_DETAIL mode, also scrape reviews for each product.",
            "default": false
          },
          "maxReviews": {
            "title": "Max Reviews per Product",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of reviews to scrape per product. 0 = unlimited.",
            "default": 100
          },
          "reviewsSort": {
            "title": "Review Sort Order",
            "enum": [
              "recent",
              "helpful"
            ],
            "type": "string",
            "description": "How to sort reviews.",
            "default": "recent"
          },
          "reviewsFilterStar": {
            "title": "Filter Reviews by Star Rating",
            "enum": [
              "all",
              "5",
              "4",
              "3",
              "2",
              "1",
              "positive",
              "critical"
            ],
            "type": "string",
            "description": "Only scrape reviews with this star rating. Leave empty for all.",
            "default": "all"
          },
          "reviewsVerifiedOnly": {
            "title": "Verified Purchases Only",
            "type": "boolean",
            "description": "Only scrape reviews from verified purchases.",
            "default": false
          },
          "reviewsDateFrom": {
            "title": "Reviews Date From",
            "type": "string",
            "description": "Only scrape reviews from this date onwards (YYYY-MM-DD).",
            "default": ""
          },
          "reviewsDateTo": {
            "title": "Reviews Date To",
            "type": "string",
            "description": "Only scrape reviews up to this date (YYYY-MM-DD).",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Use residential proxies for best results. Amazon blocks datacenter IPs aggressively.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of parallel requests. Lower values are safer against blocks.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many times to retry a failed request.",
            "default": 5
          },
          "usePlaywrightFallback": {
            "title": "Enable Playwright Fallback",
            "type": "boolean",
            "description": "Use headless browser as fallback when Cheerio requests get blocked. Slower but more reliable.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}