{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Deals Scraper",
    "description": "Fetches public Amazon deals pages and emits normalized deal records from product state embedded in the page.",
    "version": "1.2",
    "x-build-id": "zCIELOnQOKiH5YlnG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~amazon-deals-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-amazon-deals-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/w3crawler~amazon-deals-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-amazon-deals-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/w3crawler~amazon-deals-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-amazon-deals-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": {
          "url": {
            "title": "Deals URL",
            "type": "string",
            "description": "Public Amazon deals grid URL on a supported marketplace.",
            "default": "https://www.amazon.com/deals"
          },
          "maxItems": {
            "title": "Maximum deals",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum source-backed deal records emitted after filters and deduplication. Diagnostics are emitted in addition to this limit.",
            "default": 30
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum serialized public page offsets requested.",
            "default": 1
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Offset increment used for later public page requests.",
            "default": 30
          },
          "startIndex": {
            "title": "Starting offset",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Zero-based public page offset for the first request.",
            "default": 0
          },
          "filters": {
            "title": "Deal filters",
            "type": "object",
            "description": "Optional local filters applied only to fields exposed by the public page.",
            "properties": {
              "brands": {
                "title": "Brands",
                "description": "Keep records whose brand exactly matches one of these values, case-insensitively.",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": []
              },
              "departmentIds": {
                "title": "Department IDs",
                "description": "Keep records belonging to at least one public Amazon department identifier.",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": []
              },
              "dealTypes": {
                "title": "Deal types",
                "description": "Keep records whose embedded public deal type matches one of these values.",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": []
              },
              "minSavingsPercent": {
                "title": "Minimum savings percent",
                "description": "Keep records with displayed or computed savings at least this value.",
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "minPrice": {
                "title": "Minimum deal price",
                "description": "Keep records whose normalized public deal price is at least this marketplace-local value.",
                "type": "number",
                "minimum": 0
              },
              "maxPrice": {
                "title": "Maximum deal price",
                "description": "Keep records whose normalized public deal price is at most this marketplace-local value.",
                "type": "number",
                "minimum": 0
              }
            },
            "default": {},
            "additionalProperties": false
          },
          "includeDetails": {
            "title": "Include deal details",
            "type": "boolean",
            "description": "Include embedded deal state, badge, review, category, cart, and variation fields.",
            "default": true
          },
          "includeMedia": {
            "title": "Include media",
            "type": "boolean",
            "description": "Include embedded product image URLs and media metadata.",
            "default": true
          },
          "deduplicate": {
            "title": "Deduplicate by ASIN",
            "type": "boolean",
            "description": "Remove repeated ASINs across serialized page responses before applying maxItems.",
            "default": true
          },
          "locale": {
            "title": "Request locale",
            "type": "string",
            "description": "BCP-47-like locale used in the ordinary Accept-Language header; the User-Agent remains fixed and transparent.",
            "default": "en-US"
          },
          "concurrency": {
            "title": "Page concurrency (compatibility)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Accepted for older saved inputs only; direct public page requests are always serialized.",
            "default": 1
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause before each later serialized page request.",
            "default": 800
          },
          "retries": {
            "title": "Retries (compatibility)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Accepted for older saved inputs only; direct public requests are attempted once and never retried.",
            "default": 0
          },
          "maxRetries": {
            "title": "Retries alias (compatibility)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Accepted for older saved inputs only; direct public requests are attempted once and never retried.",
            "default": 0
          },
          "requestTimeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Maximum time allowed for each direct public request.",
            "default": 45000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}