{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Buy Box Monitor Agent",
    "description": "Watch ASINs on a schedule. Snapshot Buy Box winner, price, and stock, then emit changed, unchanged, or new verdicts.",
    "version": "0.0",
    "x-build-id": "Y58tlJk1JszOqeya4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/buzzidata~amazon-buybox-monitor-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-buzzidata-amazon-buybox-monitor-agent",
        "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/buzzidata~amazon-buybox-monitor-agent/runs": {
      "post": {
        "operationId": "runs-sync-buzzidata-amazon-buybox-monitor-agent",
        "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/buzzidata~amazon-buybox-monitor-agent/run-sync": {
      "post": {
        "operationId": "run-sync-buzzidata-amazon-buybox-monitor-agent",
        "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": {
          "asins": {
            "title": "ASINs",
            "type": "array",
            "description": "Amazon ASINs to watch (10-character identifiers). Duplicate ASINs are checked once per marketplace.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Amazon product URLs. The Actor extracts the ASIN from `/dp/`, `/gp/product/`, `/gp/aw/d/`, or an `asin=` query parameter.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Marketplace",
            "enum": [
              "com",
              "co.uk",
              "de"
            ],
            "type": "string",
            "description": "Amazon marketplace TLD used for every ASIN in this run.",
            "default": "com"
          },
          "postalCode": {
            "title": "Postal / ZIP code",
            "type": "string",
            "description": "Deliver-to ZIP or postal code for Buy Box, shipping eligibility, and stock. The Actor applies Amazon location cookies before fetching product pages. Without a deliver-to location, Amazon often hides the Buy Box or shows that the item cannot be shipped. Default 92618 is Irvine, CA. Use a local postcode for amazon.co.uk or amazon.de. Accepts US ZIP (for example 92618) and alphanumeric UK and DE postcodes. Alias: `zipCode` in JSON input is treated the same.",
            "default": "92618"
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "When true (default), compare this run's Buy Box snapshot to the last snapshot for the same watchlistId, ASIN, and marketplace, then emit changeType changed, unchanged, or new. When false, still snapshot and persist, but skip comparison and treat each successful check as new.",
            "default": true
          },
          "watchlistId": {
            "title": "Watchlist ID",
            "type": "string",
            "description": "Named watchlist used to persist snapshots in a key-value store (`buybox-monitor-{watchlistId}`). Use a stable ID on Apify Schedules so later runs can compare. Letters, digits, and hyphens only after sanitization. Default: default.",
            "default": "default"
          },
          "onlyChanges": {
            "title": "Only changes",
            "type": "boolean",
            "description": "When true, the dataset skips `changeType: unchanged` rows. Snapshots are still saved, and successful unchanged checks still charge asin_unchanged. Errors and BLOCKED rows are still written.",
            "default": false
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Parse, write dataset items, and persist snapshots as usual, but never charge `asin_changed` or `asin_unchanged`. Use this to test without billing.",
            "default": false
          },
          "proxyGroup": {
            "title": "Apify Proxy group",
            "enum": [
              "UNBLOCKER",
              "RESIDENTIAL"
            ],
            "type": "string",
            "description": "Choose which Apify Proxy product to use. UNBLOCKER is the recommended Amazon.com production default (CAPTCHA bypass, billed in Unblocker units). Choose RESIDENTIAL when you need sticky US IPs so deliver-to ZIP cookies hold (billed per GB). This field overrides the proxy widget below.",
            "default": "UNBLOCKER"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Console proxy widget. The Amazon.com production default is proxyGroup=UNBLOCKER, which overrides this widget. Choose RESIDENTIAL on proxyGroup when you need sticky US IPs. Datacenter and AUTO IPs are often CAPTCHA'd. Set useApifyProxy to false only for local debugging.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}