{
  "openapi": "3.0.1",
  "info": {
    "title": "All-in-One Amazon Scraper",
    "description": "Stop paying $40/month for Amazon data. 6 modes in 1 actor: search, details, reviews, bestsellers, offers, sellers. From $0.75/1K, 15 marketplaces, 100+ fields. 4x cheaper reviews. MCP-ready for AI agents (Claude, GPT, Cursor). Integrates w n8n, Make, Zapier.",
    "version": "1.0",
    "x-build-id": "omyjWtutIZ51fNWsc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/get-leads~all-in-one-amazon-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-get-leads-all-in-one-amazon-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/get-leads~all-in-one-amazon-scraper/runs": {
      "post": {
        "operationId": "runs-sync-get-leads-all-in-one-amazon-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/get-leads~all-in-one-amazon-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-get-leads-all-in-one-amazon-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"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "search",
              "asins",
              "bestsellers",
              "categoryUrl",
              "offers",
              "seller"
            ],
            "type": "string",
            "description": "How to find products. 'search' = keyword search (16-48 products/page). 'asins' = lookup specific products by ASIN code. 'bestsellers' = Amazon Best Sellers by category. 'categoryUrl' = any Amazon browse/category URL. 'offers' = all sellers/prices for an ASIN. 'seller' = seller storefront products.",
            "default": "search"
          },
          "keyword": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Amazon search term (required for search mode). Examples: 'wireless headphones', 'protein powder', 'usb c charger 65w'. Each page returns 16-48 products. Also accepts aliases: searchTerms, searchQuery, query, search, q."
          },
          "asins": {
            "title": "Product ASINs",
            "type": "array",
            "description": "List of Amazon ASINs to look up (for asins and offers modes). Find the ASIN in any Amazon product URL after '/dp/' — e.g. amazon.com/dp/B0DGHMNQ5Z → ASIN is B0DGHMNQ5Z.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Best Sellers Category",
            "type": "string",
            "description": "Amazon Best Sellers category path (for bestsellers mode). Examples: 'electronics', 'books', 'computers-accessories/headphones'."
          },
          "categoryUrl": {
            "title": "Category / Browse URL",
            "type": "string",
            "description": "Full Amazon category or browse URL (for categoryUrl mode). Paste any Amazon category page URL. Example: 'https://www.amazon.com/s?rh=n%3A172282'."
          },
          "sellerIds": {
            "title": "Seller IDs",
            "type": "array",
            "description": "List of Amazon Seller IDs (for seller mode). Find in any seller page URL after 'seller=' — e.g. amazon.com/sp?seller=AXXXXXXXXXXXXX → Seller ID is AXXXXXXXXXXXXX. You can also copy it from a product's 'Sold by' link on any Amazon marketplace.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Amazon URLs (auto-detect mode)",
            "type": "array",
            "description": "Easiest way to start — paste any Amazon URL(s) and the scraper auto-detects the correct mode and marketplace. Supports product pages (/dp/), search results (/s?k=), category pages, seller pages, bestseller pages, and offer listings. Paste an amazon.de link and it scrapes in German mode automatically.",
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "title": "Pages to Scrape",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of search result pages to scrape (1-20). Each page has 16-48 products. Start with 1-3 pages for most use cases. Only applies to search and categoryUrl modes.",
            "default": 1
          },
          "detailLevel": {
            "title": "Data Depth (selects pricing tier)",
            "enum": [
              "reviews",
              "details",
              "seller",
              "search",
              "complete"
            ],
            "type": "string",
            "description": "Pick how deep you want the scraper to go — and which pricing tier you pay. Reviews ($0.75/1K): ~6 inline reviews per product, 20 fields each (rating, text, author, verified-purchase, Vine badge, images, videos, helpful votes, plus review_url permalink and profile_photo URL). Details ($1.50/1K): 60+ fields per product (specs, seller, variants, BSR, breadcrumb, A+ content, return policy) plus monthly_purchase_volume_int analytics-ready numeric form of the 'X bought past month' signal and product_overview consumer-facing facet table (Brand/Color/Form Factor/Material/Capacity). Seller ($2.50/1K): 24-field seller profiles (business name, ratings-by-period, email, VAT, trade register, EU compliance). Search ($3/1K): 26 card fields per product from search / bestsellers / category pages; Best Sellers cards also include category_name (display label), category_url (source URL echo), and subcategories[] for hierarchical joins. Complete ($5/1K): full Details + inline Reviews in one record — the best value if you need both.",
            "default": "search"
          },
          "includeReviews": {
            "title": "Include Customer Reviews (deprecated)",
            "type": "boolean",
            "description": "DEPRECATED: Use detailLevel='reviews' or 'complete' instead. Kept for backward compatibility — setting this to true with detailLevel='standard' or 'detailed' will auto-map to 'complete'.",
            "default": false
          },
          "reviewPages": {
            "title": "Dedicated Review Pages (deprecated)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "DEPRECATED: Since Nov 2024, Amazon requires login for /product-reviews/ pages, so this setting has no effect. All review tiers now extract ~6 inline reviews directly from the product page (no login required). Kept for backward compatibility.",
            "default": 0
          },
          "reviewSort": {
            "title": "Review Sort Order",
            "enum": [
              "helpful",
              "recent"
            ],
            "type": "string",
            "description": "How to sort inline reviews: 'helpful' = most helpful first (default), 'recent' = newest first. Applies to Reviews and Complete tiers.",
            "default": "helpful"
          },
          "marketplace": {
            "title": "Amazon Marketplace",
            "enum": [
              "com",
              "ca",
              "co.uk",
              "in",
              "de",
              "fr",
              "it",
              "es",
              "co.jp",
              "com.au",
              "com.br",
              "nl",
              "se",
              "com.mx",
              "ae",
              "us",
              "uk",
              "jp",
              "usa",
              "gb",
              "br",
              "au",
              "mx",
              "uae",
              "united states",
              "america",
              "canada",
              "united kingdom",
              "england",
              "britain",
              "india",
              "germany",
              "france",
              "italy",
              "spain",
              "japan",
              "australia",
              "brazil",
              "netherlands",
              "holland",
              "sweden",
              "mexico"
            ],
            "type": "string",
            "description": "Which Amazon domain to scrape. All 15 marketplaces fully supported with locale-specific parsing (rating, delivery, free delivery, bought count in 10+ languages) and automatic WAF bypass. Non-US marketplaces include a one-time $0.01 WAF setup fee per run. Default memory: 512 MB. Accepts many aliases: short codes (us, uk, jp), ISO codes (usa, gb, br, au, mx, uae), and full country names (germany, france, japan, brazil, etc.).",
            "default": "com"
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "OPTIONAL — leave empty for best results. The scraper ships with built-in residential proxies (country-matched to every marketplace, billed at cost), automatic country-mismatch retry, WAF cookie bypass on non-US domains, and human-like request pacing — no setup required. Datacenter-first cascade is applied automatically for cheap, low-risk pages so your proxy bill stays low. You can optionally route through your own proxies here, but the built-in residential pool is usually the most cost-effective choice. Pair with `maxProxyGbPerRun` for a hard cost ceiling per run. TIP: set the AMZ_<MARKET>_COOKIE env var (see docs/COOKIES_SETUP.md) to skip the Playwright WAF launch on non-US markets — faster runs, lower proxy cost."
          },
          "cacheMode": {
            "title": "Detail cache mode",
            "enum": [
              "read-write",
              "read-only",
              "write-only",
              "disabled"
            ],
            "type": "string",
            "description": "Optional split-TTL per-ASIN detail cache: 24h for the full payload (prices + specs), then static fields (specs, brand, dimensions, breadcrumb) still served from cache for up to 7 days while prices are marked stale. Re-scraping the same ASIN within 24h returns the cached result instantly (zero network, zero cost). 'read-write' (default) reads and writes the cache. 'read-only' uses the cache but never refreshes it. 'write-only' always scrapes fresh and updates the cache. 'disabled' bypasses the cache entirely. Only applies to ASIN lookup in details/complete mode.",
            "default": "read-write"
          },
          "trackHistory": {
            "title": "Track price history",
            "type": "boolean",
            "description": "When enabled, every detail/complete scrape appends a snapshot (price, availability, rating, review_count) to a per-ASIN price-history table in the KV store. The last 30 entries are returned in the output under `price_history`. Snapshots less than 1 hour apart overwrite the previous entry (prevents flooding on repeat runs). History retention: 90 entries per ASIN (~3 months of daily scrapes). Cost: tiny KV-store usage only.",
            "default": false
          },
          "diffMode": {
            "title": "Changes-only output (diff mode)",
            "type": "boolean",
            "description": "When enabled, the scraper emits only products whose price, was_price, in_stock, availability, rating, or review_count changed since the last run. First-time scrapes of an ASIN always pass through. Output is enriched with `change_type`, `previous_price`, `previous_rating`, `previous_review_count`, `previous_scraped_at`. Perfect for daily monitoring — turns a 1000-ASIN run into just the few rows that actually moved. Snapshots are stored in the `amazon-diff-snapshots` KV store.",
            "default": false
          },
          "audit": {
            "title": "Public accuracy dashboard (audit mode)",
            "type": "boolean",
            "description": "When enabled, bypasses the normal scrape and instead runs a 15-marketplace canary audit: one well-known ASIN per market is fetched, scored by the null-is-correct rule, and aggregated into a self-contained HTML dashboard written to the run's KV store under the key `accuracy-dashboard`. Perfect for scheduling as a daily cron — the run's KV URL can be mirrored to GitHub Pages, Slack, or any dashboard. Cost: one details charge per marketplace (~$0.02 per audit) and one WAF setup charge per non-US market.",
            "default": false
          },
          "downloadMedia": {
            "title": "Download product images + videos",
            "type": "boolean",
            "description": "When enabled, product images (max 10) and videos (max 3) are downloaded to the run's KV store and referenced via public URLs in the output fields `downloaded_images` and `downloaded_videos`. Ideal for computer-vision, AI catalogues, or archival workflows. Cost: additional proxy bandwidth per run, capped at 10 MB per file.",
            "default": false
          },
          "marketplaces": {
            "title": "Multi-market fan-out",
            "type": "array",
            "description": "Optional. Pass an array like [\"com\",\"de\",\"fr\"] to scrape multiple marketplaces in one run. The actor spawns one child run per marketplace in parallel and merges results into this run's dataset. Each marketplace retains its own sticky residential IP and locale-aware parsing. Leave empty or pass a single code to use the regular single-market flow.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "regressionWebhookUrl": {
            "title": "Regression alert webhook URL (optional)",
            "type": "string",
            "description": "Optional Slack/Discord/custom webhook URL. When `audit: true` runs detect a ≥5pp accuracy drop on any market vs the prior daily snapshot, the actor POSTs a Slack-compatible payload (`text` + `content` + structured `regressions` array) to this URL. Catches Amazon DOM drift in hours, not weeks. Also reads from `AMZ_REGRESSION_WEBHOOK` env var if input field is empty."
          },
          "fields": {
            "title": "Output fields filter (optional)",
            "type": "array",
            "description": "Optional list of field names to include in output rows. Pass an array like [\"asin\",\"title\",\"price\",\"rating\"] to get only those fields — smaller dataset, faster downloads, simpler downstream processing. Leave empty (default) to return all fields for the selected tier. `asin`, `marketplace`, `error_code`, and `scrapedAt` are always included. The `_run_stats` summary row is unaffected. Useful for price-monitoring pipelines that only need a handful of fields.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxProxyGbPerRun": {
            "title": "Max residential-proxy bandwidth per run (GB)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Optional hard cap on residential-proxy bandwidth per run. When the cap is reached the scraper emits an error_code: BANDWIDTH_BUDGET_EXCEEDED row and exits cleanly. Defaults to 0 (unlimited). Use this as a safety rail for large ASIN lists or WAF-heavy markets — at the built-in pass-through proxy rate, a 10 GB cap bounds proxy cost predictably regardless of how hostile the target pages are. Every run also emits a `bandwidth` telemetry block on the `_run_stats` row even when no cap is set, so you always see per-run MB used and estimated cost.",
            "default": 0
          },
          "reviewDepth": {
            "title": "Review pagination depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many review pages to attempt per product in Reviews or Complete mode. 1 (default) = inline reviews only (~6 per product, always works). 2–10 = try deeper pagination for ~30–100 reviews per product. Amazon's login wall may block deeper pages on some markets/products — in that case the scraper falls back silently and returns the inline set.",
            "default": 1
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests to run in parallel. Default 3 keeps the request pattern human-like and keeps block rates near zero. Increase to 5–10 for faster runs when you trust the marketplace to handle higher volume.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed request before giving up. Each retry rotates to a fresh proxy session. Auto-increased on non-US marketplaces where WAF challenges are more common.",
            "default": 3
          },
          "minDelay": {
            "title": "Min Delay (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum delay between requests in milliseconds. Actual delays are randomised between min and max using a human-like Box-Muller distribution (gentler on Amazon's bot detection than a flat interval).",
            "default": 1500
          },
          "maxDelay": {
            "title": "Max Delay (ms)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Maximum delay between requests in milliseconds. The actual delay is randomised between min and max — mimics real browsing rhythm.",
            "default": 4000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}