{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Product Scraper - BSR, Buybox & Review Monitor",
    "description": "Scrapes Amazon products, reviews, and sellers. Returns a ranked incident queue: buybox changes, BSR trajectory, defect emergence from review themes, comp-set position. Monitor up to 1,000 ASINs. Drop-in junglee/Amazon-crawler replacement.",
    "version": "1.0",
    "x-build-id": "tLgJcUbweAksX7XKH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~amazon-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-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/ryanclinton~amazon-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-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/ryanclinton~amazon-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "monitor",
              "search",
              "products",
              "reviews",
              "compset",
              "seller"
            ],
            "type": "string",
            "description": "Entry point. 'monitor' (default) tracks ASINs over time and returns a ranked incident queue of only what changed - the killer mode; paste one ASIN for the 10-second outcome. 'search' ranks a search/category by commercial risk. 'products' analyses specific ASINs. 'reviews' pulls + synthesises reviews for an ASIN. 'compset' ranks a product against competitors. 'seller' follows a seller storefront. Same input shape as junglee/Amazon-crawler.",
            "default": "monitor"
          },
          "track": {
            "title": "ASINs / product URLs to monitor (monitor mode)",
            "maxItems": 1000,
            "type": "array",
            "description": "Monitor mode: Amazon ASINs (e.g. B09X7MPX8L) or /dp/ URLs to track over time. Each run returns only what changed since the last run - price + BSR trajectory, buybox/seller change, defect emergence, comp-set movement. Schedule a daily/weekly run across your catalog.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "asins": {
            "title": "ASINs / product URLs (products / reviews mode)",
            "maxItems": 1000,
            "type": "array",
            "description": "Products or reviews mode: Amazon ASINs or /dp/ URLs to analyse. Each result carries its commercial state, price + BSR trajectory, review sentiment + aspect synthesis, defect emergence, and an attention queue.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms (search mode)",
            "maxItems": 50,
            "type": "array",
            "description": "Search mode: keywords/categories to search, e.g. [\"microsd card\"] or [\"wireless earbuds\"]. Results surface the BSR-rising and price-pressured products first. Amazon caps search at ~7 pages per term; coverage reports requested vs returned honestly.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "rankBy": {
            "title": "Rank by",
            "enum": [
              "attention",
              "commercialRisk",
              "trajectory",
              "priceCompetitiveness",
              "reviewVelocity"
            ],
            "type": "string",
            "description": "How to order the queue. 'attention' uses the composite attentionIndex. 'commercialRisk' surfaces at-risk listings first. 'trajectory' surfaces the steepest decliners. 'priceCompetitiveness' surfaces price-pressured listings. 'reviewVelocity' orders by review volume.",
            "default": "attention"
          },
          "maxProducts": {
            "title": "Max products (search / seller mode)",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "Maximum products to analyse in search/seller mode. Coverage reports requested vs returned honestly.",
            "default": 50
          },
          "includeReviewsSample": {
            "title": "Include + synthesise reviews",
            "type": "boolean",
            "description": "When on (default), each product carries the deterministic review sentiment + aspect synthesis (lexicon-tfidf-v1) and defect-emergence detection. Turn off for a faster substrate-only run.",
            "default": true
          },
          "reviewsSamplePerProduct": {
            "title": "Reviews to sample per product",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "How many recent reviews to pull and synthesise per product. Larger samples raise the sentiment confidence band; sampling is disclosed honestly per product.",
            "default": 100
          },
          "marketplaces": {
            "title": "Marketplaces",
            "maxItems": 20,
            "type": "array",
            "description": "One or more Amazon domains to run against (e.g. amazon.com, amazon.co.uk, amazon.de). Each marketplace is pinned to its own residential proxy country so prices and offers are accurate - a non-US exit on amazon.com returns wrong/blank prices. The same ASIN tracked across domains is linked by ASIN with a per-marketplace record.",
            "default": [
              "amazon.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "watchlistName": {
            "title": "Watchlist name (monitor mode)",
            "type": "string",
            "description": "Monitor mode: a stable name for this watchlist. State (price/BSR/rating history, seller history, incident lifecycle, defect recurrence, trajectory) persists in a named store keyed on this name across runs - the moat. Rename = a fresh memory clock. Defaults to a slug of the tracked ASINs.",
            "default": ""
          },
          "deltaWindowDays": {
            "title": "Delta window (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "The comparison window for delta intelligence (what changed since the prior run).",
            "default": 7
          },
          "asinRevenue": {
            "title": "Per-ASIN revenue map (optional)",
            "type": "object",
            "description": "Optional. A map of ASIN -> your monthly revenue for that listing. When supplied, risk concentration is weighted by YOUR revenue (it's your number, not ours). Left empty, concentration is weighted by tracked-ASIN count - the actor never fabricates a revenue figure.",
            "default": {}
          },
          "product": {
            "title": "Product ASIN / URL (compset mode)",
            "type": "string",
            "description": "Compset mode: the ASIN or /dp/ URL of YOUR product - the anchor everything else is benchmarked against.",
            "default": ""
          },
          "competitors": {
            "title": "Competitor ASINs / URLs (compset mode)",
            "maxItems": 50,
            "type": "array",
            "description": "Compset mode: ASINs or /dp/ URLs of competitors to rank against the anchor product above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sellerUrls": {
            "title": "Seller storefront URLs (seller mode)",
            "maxItems": 100,
            "type": "array",
            "description": "Seller mode: Amazon seller storefront URLs (e.g. https://www.amazon.com/sp?seller=A210SJF12S88M5). The actor resolves the storefront's ASINs and runs them through the product/monitor pipeline plus seller intelligence.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "persona": {
            "title": "Persona",
            "enum": [
              "brand_protection",
              "catalog_operations",
              "seller_competitive",
              "quality_assurance",
              "executive_summary",
              "sourcer"
            ],
            "type": "string",
            "description": "Reshapes materiality weights, escalation, and which signals are suppressed. 'brand_protection' weights buybox + BSR + defects; 'seller_competitive' weights price + comp-set; 'quality_assurance' weights defects + review velocity; 'sourcer' weights rising rank + review velocity. Orthogonal to mode and rankBy; explicit fields always override.",
            "default": "catalog_operations"
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "signals",
              "compat",
              "minimal"
            ],
            "type": "string",
            "description": "'signals' (default) = full envelope: incident + signals + attention routing + commercial profile + review intelligence + trajectory + delta. 'compat' = exact junglee product field set + dataCompleteness, no signal fields (migration parity). 'minimal' = ASIN + title + price + BSR + rating only.",
            "default": "signals"
          },
          "analysisDepth": {
            "title": "Analysis depth",
            "enum": [
              "fast",
              "standard",
              "deep"
            ],
            "type": "string",
            "description": "'fast' = substrate + profile. 'standard' (default) = + signals + review intelligence. 'deep' = + full trajectory, anomaly, and recurrence.",
            "default": "standard"
          },
          "explainability": {
            "title": "Explainability",
            "enum": [
              "standard",
              "full"
            ],
            "type": "string",
            "description": "'standard' trims the heaviest diagnostic blocks (evidenceQuality, signalProfileEvidence, historicalSimilarity). 'full' keeps everything.",
            "default": "standard"
          },
          "exportBundles": {
            "title": "Analyst export bundles",
            "type": "array",
            "description": "Optional named CSV/export bundles written to the key-value store for non-engineer consumers (each a deterministic projection of records already in the dataset). Default none.",
            "items": {
              "type": "string",
              "enum": [
                "seller_risk_matrix",
                "incident_report",
                "catalog_health",
                "executive_briefing",
                "sourcing_sheet",
                "compset_benchmark",
                "defect_watch"
              ],
              "enumTitles": [
                "Seller risk matrix",
                "Incident report",
                "Catalog health",
                "Executive briefing",
                "Sourcing sheet",
                "Comp-set benchmark",
                "Defect watch"
              ]
            },
            "default": []
          },
          "maxRuntimeSeconds": {
            "title": "Max runtime (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "Soft runtime budget. The actor auto-clamps against the Apify timeout and emits partial output (attention-queue-first) before a hard kill, so a scheduled Zapier/Make run gets a usable result on time.",
            "default": 3600
          },
          "startUrls": {
            "title": "Start URLs (compat alias)",
            "maxItems": 1000,
            "type": "array",
            "description": "Drop-in migration: paste your existing junglee/Amazon-crawler product or search URLs here. /dp/ URLs map to products mode, /s? URLs map to search mode. Use 'track' / 'asins' / 'searchTerms' for new runs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs (compat alias)",
            "maxItems": 1000,
            "type": "array",
            "description": "Drop-in migration: Amazon product URLs, mapped to products mode. Use 'asins' for new runs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query (compat alias)",
            "type": "string",
            "description": "Drop-in migration: a single search term, mapped to search mode. Use 'searchTerms' for new runs.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy. Defaults to RESIDENTIAL (REQUIRED for Amazon - datacenter IPs are blocked and return wrong/blank prices). Each marketplace is pinned to its own residential country automatically. Leave as default unless you have a reason to change it.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}