{
 "openapi": "3.1.0",
 "info": {
  "title": "BetaDeals NZ price check",
  "version": "1.0.0",
  "description": "Today's price of a product at New Zealand stores, each next to the lowest price the same store charged in October 2026, from BetaDeals' own daily record. Free, read-only, no key."
 },
 "servers": [
  {
   "url": "https://betadeals.co.nz"
  }
 ],
 "paths": {
  "/lookup": {
   "get": {
    "operationId": "checkNzPrice",
    "summary": "Check a product's NZ prices against each store's October price",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "maxLength": 80
      },
      "description": "Product name, e.g. 'airpods pro' or 'dyson v15'"
     }
    ],
    "responses": {
     "200": {
      "description": "Up to 8 matching prices, cheapest first, accessories last",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "checked": {
           "type": "string",
           "description": "the day of the answer"
          },
          "summary": {
           "type": "string"
          },
          "prices_found": {
           "type": "integer"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "product": {
              "type": "string"
             },
             "store": {
              "type": "string"
             },
             "price_today": {
              "type": [
               "number",
               "null"
              ]
             },
             "store_says_was": {
              "type": [
               "number",
               "null"
              ]
             },
             "lowest_october_price_same_store": {
              "type": [
               "number",
               "null"
              ]
             },
             "verdict": {
              "type": "string"
             },
             "really_lower": {
              "type": [
               "boolean",
               "null"
              ]
             },
             "store_url": {
              "type": [
               "string",
               "null"
              ]
             }
            }
           }
          },
          "more": {
           "type": "string",
           "description": "the same check as a web page"
          },
          "cite": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}