{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Buy Box + Offers Agent",
    "description": "Check Amazon ASINs for the Buy Box winner, stock, and landed-cost offers. Returns structured JSON. Failed checks are never billed.",
    "version": "0.1",
    "x-build-id": "GCUyfuJyzJOEM6lx4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/buzzidata~amazon-buybox-offers-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-buzzidata-amazon-buybox-offers-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-offers-agent/runs": {
      "post": {
        "operationId": "runs-sync-buzzidata-amazon-buybox-offers-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-offers-agent/run-sync": {
      "post": {
        "operationId": "run-sync-buzzidata-amazon-buybox-offers-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 check (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": "Primary Amazon storefront. Used for every ASIN unless you add more under Also check marketplaces.",
            "default": "com"
          },
          "alsoCheckMarketplaces": {
            "title": "Also check marketplaces",
            "uniqueItems": true,
            "type": "array",
            "description": "Extra marketplaces to snapshot for the same ASINs. Each marketplace × ASIN pair is one output row.",
            "items": {
              "type": "string",
              "enum": [
                "com",
                "co.uk",
                "de"
              ],
              "enumTitles": [
                "amazon.com (US)",
                "amazon.co.uk (UK)",
                "amazon.de (DE)"
              ]
            },
            "default": []
          },
          "includeAllOffers": {
            "title": "Include all offers",
            "type": "boolean",
            "description": "Also fetch competing offers with landed cost (price plus shipping) from Amazon's All Offers Display.",
            "default": true
          },
          "maxOffers": {
            "title": "Max offers",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum offers to keep per marketplace × ASIN snapshot, sorted by landed price.",
            "default": 20
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Reserved. The Actor always returns a one-shot snapshot and does not store previous winners or emit change events.",
            "default": false
          },
          "postalCode": {
            "title": "Postal / ZIP code",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 \\-]{2,11}$",
            "minLength": 3,
            "maxLength": 12,
            "type": "string",
            "description": "Deliver-to ZIP or postal code for Buy Box, shipping eligibility, and landed-cost offers. Amazon often hides the Buy Box or shows cannot-ship copy when location is unset or outside the ship area. Default 92618 is Irvine, CA, an example US deliver-to. Use a local postcode for co.uk and de. Alias: zipCode.",
            "default": "92618"
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Write dataset items without billing asin_check. Use this to test a run.",
            "default": false
          },
          "proxyGroup": {
            "title": "Apify Proxy group",
            "enum": [
              "RESIDENTIAL",
              "UNBLOCKER"
            ],
            "type": "string",
            "description": "UNBLOCKER is the amazon.com default (CAPTCHA bypass, billed in Unblocker units). RESIDENTIAL is a sticky-IP fallback billed per GB. Set this field to UNBLOCKER. Do not put UNBLOCKER under apifyProxyGroups.",
            "default": "UNBLOCKER"
          },
          "proxyCountry": {
            "title": "Proxy country",
            "enum": [
              "US",
              "GB",
              "DE"
            ],
            "type": "string",
            "description": "Proxy country when proxyGroup is RESIDENTIAL. Use US for amazon.com. Ignored for UNBLOCKER, because country targeting shrinks the Unblocker pool. Residential runs also apply California to match ZIP 92618.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave Apify Proxy on for production. The Actor uses proxyGroup (default UNBLOCKER) even if this widget shows RESIDENTIAL. Choose RESIDENTIAL on proxyGroup when you need sticky US IPs. Set useApifyProxy to false only for local debugging. Datacenter and AUTO IPs are often blocked.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}