{
  "openapi": "3.0.1",
  "info": {
    "title": "Alternate Price Watch",
    "description": "Compare the same product across alternate.nl, alternate.be and alternate.at: per-country price, shipping and stock, cross-border savings, and alerts for price drops.",
    "version": "0.0",
    "x-build-id": "PxMtrRQrw3uAlpWqN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goobertje~alternate-price-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goobertje-alternate-price-watch",
        "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/goobertje~alternate-price-watch/runs": {
      "post": {
        "operationId": "runs-sync-goobertje-alternate-price-watch",
        "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/goobertje~alternate-price-watch/run-sync": {
      "post": {
        "operationId": "run-sync-goobertje-alternate-price-watch",
        "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": {
          "productIds": {
            "title": "Product SKUs or URLs",
            "type": "array",
            "description": "Alternate product SKUs (the number in the product URL) or full product URLs on alternate.nl, .be or .at. The same product is looked up in every selected country. Example: [\"1234567\", \"https://www.alternate.nl/Gigabyte/RTX-5070/html/product/1234567\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords matched against product names found in the Alternate sitemap. Each keyword adds the matching products, up to Max items in total. Example: [\"RTX 5070\", \"Ryzen 7 9800X3D\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Alternate category or listing page URLs; only the first page of each (about 17 products) is read, because further pages load dynamically. Example: [\"https://www.alternate.nl/Videokaarten\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries to compare",
            "minItems": 1,
            "type": "array",
            "description": "Which Alternate shops to fetch each product from: nl (Netherlands), be (Belgium), at (Austria). Example: [\"nl\", \"be\"] compares only NL and BE.",
            "items": {
              "type": "string",
              "enum": [
                "nl",
                "be",
                "at"
              ],
              "enumTitles": [
                "Netherlands (alternate.nl)",
                "Belgium (alternate.be)",
                "Austria (alternate.at)"
              ]
            },
            "default": [
              "nl",
              "be",
              "at"
            ]
          },
          "homeCountry": {
            "title": "Home country",
            "enum": [
              "nl",
              "be",
              "at"
            ],
            "type": "string",
            "description": "The country you normally buy from. The savings in arbitrageAlpha are measured against the total price (item plus shipping) in this country. Example: \"nl\".",
            "default": "nl"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of products (dataset items, one per SKU, each one billed) a run outputs; the run stops once reached. It also caps how many search results are used per search query. Product IDs you list are all checked until the cap is reached. Example: 50.",
            "default": 50
          },
          "onlyPriceDrops": {
            "title": "Only output price drops",
            "type": "boolean",
            "description": "If enabled, only products that are new (first time seen) or whose lowest total price fell by at least Minimum drop (%) since the previous run are output; unchanged, higher or slightly lower prices are skipped and not billed. A small drop does not move the comparison baseline, so slow slides add up until they reach the threshold. Example: true.",
            "default": false
          },
          "minDropPct": {
            "title": "Minimum drop (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Smallest price drop in percent that counts as a drop when Only output price drops is on. Range 0 to 100. Example: 5.0.",
            "default": 5
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "minLength": 3,
            "maxLength": 63,
            "type": "string",
            "description": "Name of the persistent key-value store holding the last seen prices, used for delta tracking between runs. Use a different name to keep separate watchlists. Only lowercase letters, digits and hyphens are allowed (not at the start or end). Example: \"alternate-price-state\".",
            "default": "alternate-price-state"
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional https URL that receives a JSON alert when price drops are found. Works with Discord, Slack or any generic JSON webhook. Treated as a secret because it contains a token. Example: \"https://hooks.slack.com/services/T000/B000/XXXX\"."
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "number",
            "description": "Pause between requests to Alternate to stay polite. Minimum 1, maximum 30. Example: 1.0.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}