{
  "openapi": "3.0.1",
  "info": {
    "title": "ALDI Stock Checker & API: Special Buys Stock by Store",
    "description": "ALDI Australia stock checker and API: Special Buys stock at every store near your postcode (in stock, medium, low or none), plus prices, unit prices and on-sale dates. This week's Special Buys, search, categories or product links. Scheduled runs = restock alerts.",
    "version": "0.1",
    "x-build-id": "HsDAe7q38If8DBT0s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~aldi-stock-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-aldi-stock-checker",
        "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/s_actors~aldi-stock-checker/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-aldi-stock-checker",
        "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/s_actors~aldi-stock-checker/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-aldi-stock-checker",
        "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": {
          "specialBuys": {
            "title": "🛒 Special Buys",
            "type": "array",
            "description": "Special Buys ranges, one per line: \"latest\" (the newest on-sale date), \"next\" (the next one), \"this week\", \"upcoming\", \"all\" (every date ALDI still lists), a date (2026-10-17) or a Special Buys link (https://www.aldi.com.au/special-buys/2026-10-17).",
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "📍 Postcodes (store stock)",
            "type": "array",
            "description": "Australian postcodes, one per line (2000, 3000, 4000). For each, the stock of every product at the nearest ALDI stores. ALDI shows store stock only for Special Buys. Empty = prices only, no store stock.",
            "items": {
              "type": "string"
            }
          },
          "storesPerPostcode": {
            "title": "🏬 Stores per postcode",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the nearest ALDI stores to check around each postcode.",
            "default": 10
          },
          "radiusKm": {
            "title": "📏 Radius (km)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Only stores this close to the postcode.",
            "default": 25
          },
          "searchTerms": {
            "title": "🔎 Search terms",
            "type": "array",
            "description": "What to search on aldi.com.au, one per line (e.g. \"air fryer\", \"heater\", \"milk\").",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Whole ALDI categories, one per line: a category link (https://www.aldi.com.au/products/dairy-eggs-fridge/milk/k/1111111160), its path (\"dairy-eggs-fridge/milk\") or its name (\"Milk\", \"Limited Time Only\", \"Lower Prices\", \"Super Savers\", \"Christmas\").",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "title": "🏷️ Products (links or SKUs)",
            "type": "array",
            "description": "Exact products, one per line: an aldi.com.au product link (https://www.aldi.com.au/product/ambiano-3-5l-air-fryer-000000000000737588) or its SKU (737588). Best for a restock watchlist.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerQuery": {
            "title": "🔢 Max products per query",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many products to take from each Special Buys date, search term or category. 0 = all of them.",
            "default": 100
          },
          "sortBy": {
            "title": "↕️ Sort by",
            "enum": [
              "relevance",
              "priceLowToHigh",
              "priceHighToLow",
              "nameAZ",
              "nameZA"
            ],
            "type": "string",
            "description": "The order of aldi.com.au, which decides the products taken when there is a limit.",
            "default": "relevance"
          },
          "inStockOnly": {
            "title": "✅ Only stores with stock",
            "type": "boolean",
            "description": "Return only stores showing \"Stock available\" or \"Medium stock\" (skips \"Low/no stock\" and products without store stock).",
            "default": false
          },
          "specialBuysOnly": {
            "title": "🛒 Only Special Buys",
            "type": "boolean",
            "description": "Skip regular range products in searches and categories.",
            "default": false
          },
          "maxPrice": {
            "title": "💲 Maximum price (AUD)",
            "minimum": 0,
            "type": "integer",
            "description": "Return only products at or below this price. Empty = any."
          },
          "onlyChanges": {
            "title": "🔔 Only report changes",
            "type": "boolean",
            "description": "For scheduled runs. The first run saves stock and prices; later runs return only what changed: back in stock, restocked, low or sold out, stock down, on sale now, price drops and rises, new products. You pay only for the changes returned.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Separate monitors keep separate memory. Use a different name for each scheduled task.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}