{
  "openapi": "3.0.1",
  "info": {
    "title": "NZ Price Monitor | $1.70/1K product checks",
    "description": "NZ grocery price monitor for Woolworths NZ, PAK'nSAVE, New World, Four Square, FreshChoice and SuperValue: watch products by name, barcode or URL, get one price snapshot per run, price history, and drop, threshold and back-in-stock alerts by webhook or email.",
    "version": "0.1",
    "x-build-id": "NmlaQMfbgkTb3ujWn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/architekture~nz-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-architekture-nz-price-monitor",
        "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/architekture~nz-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-architekture-nz-price-monitor",
        "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/architekture~nz-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-architekture-nz-price-monitor",
        "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": {
          "products": {
            "title": "Products to watch",
            "type": "array",
            "description": "Up to 500. Each is a name (\"anchor blue milk 2l\") or an object {\"name\", \"barcode\", \"url\", \"size\", \"maxPrice\"}. Barcode matches first; otherwise name and size with a confidence score."
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Names the history dataset and comparison store in your account. Keep it the same across runs to get history and alerts.",
            "default": "my-watchlist"
          },
          "chains": {
            "title": "Chains",
            "type": "array",
            "description": "Which chains to check. Default: all six.",
            "items": {
              "type": "string",
              "enum": [
                "woolworths-nz",
                "paknsave",
                "new-world",
                "foursquare",
                "freshchoice",
                "supervalue"
              ]
            },
            "default": [
              "woolworths-nz",
              "paknsave",
              "new-world",
              "foursquare",
              "freshchoice",
              "supervalue"
            ]
          },
          "stores": {
            "title": "Stores (optional)",
            "type": "object",
            "description": "Store per chain, for example {\"paknsave\": \"<store id>\", \"new-world\": \"New World Thorndon\", \"freshchoice\": \"queenstown\"}. Blank uses each chain's default store.",
            "default": {}
          },
          "frequency": {
            "title": "Frequency",
            "enum": [
              "weekly",
              "daily"
            ],
            "type": "string",
            "description": "How often you schedule this monitor. The free tier is weekly.",
            "default": "weekly"
          },
          "dropPercent": {
            "title": "Alert: price drop of at least (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Alert when a price falls by at least this much since the previous run. 0 turns it off.",
            "default": 10
          },
          "priceAtOrBelow": {
            "title": "Alert: price at or below (NZD)",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Alert when a price crosses to this level or lower. Per-product maxPrice overrides it."
          },
          "backInStock": {
            "title": "Alert: back in stock",
            "type": "boolean",
            "description": "Alert when a product that was unavailable or unmatched is found again.",
            "default": true
          },
          "freeTier": {
            "title": "Free tier",
            "type": "boolean",
            "description": "Up to 10 products, weekly, 4 runs per account, never charged. Turn off for paid monitoring.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Alerts are POSTed here as JSON when any fire."
          },
          "notificationEmail": {
            "title": "Alert email (optional)",
            "type": "string",
            "description": "Alerts are emailed here when any fire."
          },
          "matchThreshold": {
            "title": "Match confidence threshold",
            "minimum": 0.3,
            "maximum": 1,
            "type": "number",
            "description": "Name and size matches below this confidence are reported as unmatched, with candidates.",
            "default": 0.6
          },
          "candidatesPerProduct": {
            "title": "Candidates per product",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Search results considered per product and chain.",
            "default": 5
          },
          "feedback": {
            "title": "Feedback",
            "type": "string",
            "description": "Tell us what you needed and did not get. Read by a human; never changes the output."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}