{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Commerce Intelligence",
    "description": "Observe public Amazon search/product/review pages with normalized records, price snapshots, source provenance and clear access/coverage warnings.",
    "version": "0.1",
    "x-build-id": "uF41JSw3KgRWugCym"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/optirefine~amazon-commerce-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-optirefine-amazon-commerce-intelligence",
        "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/optirefine~amazon-commerce-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-optirefine-amazon-commerce-intelligence",
        "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/optirefine~amazon-commerce-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-optirefine-amazon-commerce-intelligence",
        "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": [
              "product",
              "search",
              "category",
              "reviews",
              "monitor",
              "bestsellers"
            ],
            "type": "string",
            "description": "Choose the workflow. Monitor compares newly observed values with a previous dataset when provided.",
            "default": "product"
          },
          "marketplace": {
            "title": "Amazon marketplace",
            "enum": [
              "US",
              "CA",
              "UK",
              "DE",
              "FR",
              "IT",
              "ES",
              "JP",
              "IN",
              "AU",
              "MX",
              "BR",
              "NL",
              "PL",
              "SE",
              "SG",
              "AE",
              "SA",
              "TR"
            ],
            "type": "string",
            "description": "Amazon site to query for ASINs and keywords; URLs select their own marketplace.",
            "default": "US"
          },
          "asins": {
            "title": "ASINs",
            "type": "array",
            "description": "Product ASINs (10 alphanumeric characters).",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords for Amazon search or product discovery.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Amazon URLs",
            "type": "array",
            "description": "Amazon product, category, search or review URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Public Amazon category or bestseller URLs (URL strings or objects).",
            "items": {
              "type": "string"
            }
          },
          "browseNodeIds": {
            "title": "Browse node IDs",
            "type": "array",
            "description": "Numeric category browse-node IDs.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Maximum pages per search/reviews",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Only follow publicly accessible navigation.",
            "default": 2
          },
          "maxProducts": {
            "title": "Maximum search results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Global cap of emitted search cards.",
            "default": 100
          },
          "maxReviewsPerAsin": {
            "title": "Maximum reviews per ASIN",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound, not a guarantee; only public reviews can be collected.",
            "default": 20
          },
          "maxRequests": {
            "title": "Total request budget",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap for page requests, excluding robots.txt checks.",
            "default": 400
          },
          "maxRequestsPerMinute": {
            "title": "Maximum requests per minute",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Conservative rate cap across all marketplace requests.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Network retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries transient network failures only; never retries CAPTCHA and access challenges.",
            "default": 1
          },
          "requestTimeoutMs": {
            "title": "Timeout in milliseconds",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Page request timeout (1000–60000 recommended).",
            "default": 15000
          },
          "includeProductDetails": {
            "title": "Enrich search results with product details",
            "type": "boolean",
            "description": "Also visit each public product page found in search results.",
            "default": false
          },
          "includeReviews": {
            "title": "Collect publicly visible reviews",
            "type": "boolean",
            "description": "Fetch public review pages for products found in product mode.",
            "default": false
          },
          "includeVariants": {
            "title": "Include variants",
            "type": "boolean",
            "description": "Parse visible variant ASINs from product page.",
            "default": true
          },
          "includeOffers": {
            "title": "Include featured offer record",
            "type": "boolean",
            "description": "Emit the visible Buy Box offer; not a complete offer marketplace.",
            "default": false
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Emit image URLs when visible.",
            "default": true
          },
          "reviewRating": {
            "title": "Review star filter",
            "enum": [
              "all",
              "1",
              "2",
              "3",
              "4",
              "5",
              "positive",
              "critical"
            ],
            "type": "string",
            "description": "Applied locally to visible reviews; does not expand review access.",
            "default": "all"
          },
          "reviewVerifiedOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Filter to reviews marked verified purchase in public HTML.",
            "default": false
          },
          "reviewKeyword": {
            "title": "Review keyword",
            "type": "string",
            "description": "Case-insensitive keyword match against visible review title/body."
          },
          "reviewDateFrom": {
            "title": "Review start date",
            "type": "string",
            "description": "ISO YYYY-MM-DD. Applies locally to dates that could be parsed."
          },
          "reviewDateTo": {
            "title": "Review end date",
            "type": "string",
            "description": "ISO YYYY-MM-DD. Applies locally to dates that could be parsed."
          },
          "reviewSort": {
            "title": "Review sort",
            "enum": [
              "recent",
              "helpful"
            ],
            "type": "string",
            "description": "Public review-page sort selection.",
            "default": "recent"
          },
          "privacyMode": {
            "title": "Reviewer privacy",
            "enum": [
              "minimal",
              "full"
            ],
            "type": "string",
            "description": "Minimal excludes reviewer names and profile links.",
            "default": "minimal"
          },
          "robotsPolicy": {
            "title": "Robots policy",
            "enum": [
              "respect",
              "report_only"
            ],
            "type": "string",
            "description": "Respect blocks disallowed paths (default). Report only requires confirmed authorization.",
            "default": "respect"
          },
          "complianceMode": {
            "title": "Compliance mode",
            "type": "boolean",
            "description": "Identify as an automated agent; do not solve CAPTCHAs or bypass challenges.",
            "default": true
          },
          "authorizedAccessConfirmed": {
            "title": "I have authorization for custom policy",
            "type": "boolean",
            "description": "Only relevant when disabling compliance defaults or choosing report_only.",
            "default": false
          },
          "incremental": {
            "title": "Only output new or changed product records",
            "type": "boolean",
            "description": "Uses baselineDatasetId to compare previous observations.",
            "default": false
          },
          "baselineDatasetId": {
            "title": "Baseline Apify dataset ID",
            "type": "string",
            "description": "Previous run dataset ID for comparing product observations. Requires API read access."
          },
          "deliveryLocation": {
            "title": "Delivery location annotation",
            "type": "object",
            "description": "Optional {\"country\":\"CA\",\"postalCode\":\"M5V3L9\"}; included in snapshots for reference only; does NOT set Amazon delivery destination."
          },
          "proxyConfiguration": {
            "title": "Apify proxy",
            "type": "object",
            "description": "Optional Apify proxy settings for authorized geo-localization. User is charged separately for proxy traffic. No challenge evasion. Example: {\"useApifyProxy\":true,\"apifyProxyGroups\":[\"RESIDENTIAL\"],\"apifyProxyCountry\":\"CA\"}."
          },
          "debug": {
            "title": "Sanitized response diagnostics",
            "type": "boolean",
            "description": "On failed HTTP access, write diagnostic status, page title, and response hash to DEBUG_FAILURE_* key-value records. No raw HTML or secrets stored. Does not bypass site restrictions.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}