{
  "openapi": "3.0.1",
  "info": {
    "title": "Australian Supermarket Price Tracker (Coles, Woolworths, ALDI)",
    "description": "Compare grocery prices across Coles, Woolworths and ALDI in one run: price, unit price, specials, was-price, stock, images. Weekly price-drop alerts and change mode return only what moved since your last run.",
    "version": "0.3",
    "x-build-id": "w87uZmPVkOUn2jBgp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luke-main~au-supermarket-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luke-main-au-supermarket-prices",
        "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/luke-main~au-supermarket-prices/runs": {
      "post": {
        "operationId": "runs-sync-luke-main-au-supermarket-prices",
        "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/luke-main~au-supermarket-prices/run-sync": {
      "post": {
        "operationId": "run-sync-luke-main-au-supermarket-prices",
        "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": {
          "stores": {
            "title": "Stores",
            "type": "array",
            "description": "Which supermarkets to check. Search terms run on every selected store; category URLs run only on the store they belong to.",
            "items": {
              "type": "string",
              "enum": [
                "coles",
                "woolworths",
                "aldi"
              ],
              "enumTitles": [
                "Coles",
                "Woolworths",
                "ALDI"
              ]
            },
            "default": [
              "coles",
              "woolworths",
              "aldi"
            ]
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Product searches, e.g. 'milk', 'tim tam', 'nappies'. Each term is searched on each selected store.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Category / aisle pages copied from the browser, e.g. https://www.coles.com.au/browse/dairy-eggs-fridge/milk or https://www.woolworths.com.au/shop/browse/dairy-eggs-fridge/milk or https://www.coles.com.au/on-special.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerQuery": {
            "title": "Max products per search term / category (per store)",
            "minimum": 1,
            "type": "integer",
            "description": "Stops paging a search or category after this many products on each store.",
            "default": 200
          },
          "maxItems": {
            "title": "Max products in total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on products processed across all stores in this run. Also limits what you pay.",
            "default": 1000
          },
          "priceDropsOnly": {
            "title": "Price drops only (weekly price-drop alerts)",
            "type": "boolean",
            "description": "Outputs only products whose price FELL since the previous run of this watch-list: store, product, old price, new price, $ and % drop, unit price and special flag. Uses the same saved-price store as change mode. The first run saves a baseline (no rows); schedule it weekly or daily to get a drop feed. Billed like change mode: per product checked plus per drop row returned.",
            "default": false
          },
          "changesOnly": {
            "title": "Only report changes since the last run",
            "type": "boolean",
            "description": "Remembers each product's price in a named key-value store and outputs only products whose price changed (with oldPrice and pctChange), plus new products if enabled below. Schedule it daily for a cheap price-change feed.",
            "default": false
          },
          "includeNewProducts": {
            "title": "Include newly seen products in change mode",
            "type": "boolean",
            "description": "In change mode, also output products never seen before (changeType = 'new'). On the very first change-mode run every product is new.",
            "default": true
          },
          "minPctChange": {
            "title": "Minimum % change to report",
            "minimum": 0,
            "type": "integer",
            "description": "In change mode or price-drops mode, ignore price moves smaller than this percentage. 0 = report every change.",
            "default": 0
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store (in your account) holding last-seen prices. Use different names to keep separate watch-lists (e.g. one for a weekly price-drop alert, one for a daily change feed).",
            "default": "au-supermarket-prices-state"
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Polite pause between requests to the same store (randomised ±30%). Stores are crawled in parallel, one request at a time each.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a failed or blocked request is retried (with exponential backoff and a fresh browser fingerprint) before that search/category is skipped. Results collected so far are kept.",
            "default": 4
          },
          "retryPasses": {
            "title": "Retry passes for failed searches/categories",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "If a search or category still fails after its per-request retries (e.g. a long bot-wall streak), the Actor cools down and retries it later in the same run, resuming from the page where it stopped. 0 disables this.",
            "default": 3
          },
          "includeRawData": {
            "title": "Include raw retailer data",
            "type": "boolean",
            "description": "Adds a 'raw' field with the retailer's full original product record (bigger output; useful for fields we don't map yet, e.g. multibuy details, aisle locations).",
            "default": false
          },
          "autoProxyFallback": {
            "title": "Auto-switch to Apify Proxy when blocked",
            "type": "boolean",
            "description": "If Woolworths or ALDI shows repeated bot walls and no proxy is set above, retry that store through Apify Proxy (datacenter) automatically. Not used for Coles, whose bot protection walls datacenter IPs; Coles uses the browser fallback above, then back-off and retry passes (or set a residential AU proxy above).",
            "default": true
          },
          "colesBrowserFallback": {
            "title": "Coles: browser fallback when blocked",
            "type": "boolean",
            "description": "If a Coles page is blocked by Coles' bot protection, load it in a real Chrome browser (no proxy, no extra cost to you) and keep using the browser for the following Coles pages while it works. Needs at least 1 GB of run memory (the default). Turn off to use plain requests with back-off only.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in our tests (Coles, Woolworths and ALDI all worked without a proxy from Apify). Set one if a store keeps blocking you; residential AU is the strongest option.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}