{
  "openapi": "3.0.1",
  "info": {
    "title": "Coles Australia Scraper - Prices, Specials, Barcodes",
    "description": "Watch Coles Australia prices at one real store and get back only what moved: price cuts, stock, promotions, unit price. Or scrape outright by keyword, aisle or specials. Pin any run to a store by postcode, suburb or store id, because Coles prices are not national. Barcode and nutrition on request.",
    "version": "0.1",
    "x-build-id": "wbj4QNZGwa8whK5MX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~coles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-coles-scraper",
        "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-r~coles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-coles-scraper",
        "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-r~coles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-coles-scraper",
        "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": {
          "operation": {
            "title": "What to do",
            "enum": [
              "search",
              "category",
              "product",
              "specials"
            ],
            "type": "string",
            "description": "Search the catalogue by keyword, browse a category or aisle, read full detail for known product ids or URLs, or pull the whole current specials catalogue.",
            "default": "search"
          },
          "store": {
            "title": "Price at this store",
            "type": "string",
            "description": "A postcode such as 2000, a suburb such as Parramatta, or a Coles store id such as COL:840. Coles prices are per store, not national: on one day the same Tim Tam pack was marked down from $6.00 in Sydney, $6.30 in Darwin and $6.42 in Karratha, loose bananas were $4.90/kg everywhere except Karratha at $4.50/kg, and 3L Coles milk was simply not sold in Darwin. The range moves too: a small-format CBD store listed 84 milk products and 2.567 specials where a suburban one listed 128 and 7.066. Leave it empty and you get Coles' national catalogue, which is larger than every store measured and is nobody's shelf price. A store that cannot be found stops the run rather than quietly falling back."
          },
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "What to search the Coles catalogue for, one term per line. Used when the operation is 'Search by keyword'. Every term is run separately and each row records which term found it. A term Coles cannot match comes back as a row with found set to false, never as a substitute product.",
            "default": [
              "tim tam"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories to browse",
            "type": "array",
            "description": "Coles category paths, one per line, for the 'Browse a category' operation. A top level looks like dairy-eggs-fridge, fruit-vegetables, bakery, pantry, frozen, drinks or health-beauty. An aisle inside one looks like dairy-eggs-fridge/milk. A path that does not exist is reported as such rather than returning a different aisle.",
            "items": {
              "type": "string"
            }
          },
          "product_ids": {
            "title": "Product ids or product URLs",
            "type": "array",
            "description": "Coles product ids, one per line, for the 'Product detail by id or URL' operation. A full product URL works too, the id is read off the end of it. This is the operation that returns the barcode, ingredients, nutrition panel and country of origin. A product Coles no longer sells comes back with found set to true, is_available false and a null price, never as a free product.",
            "items": {
              "type": "string"
            }
          },
          "special_offer": {
            "title": "Only this kind of offer",
            "enum": [
              "any",
              "half_price",
              "multi_buy",
              "online_only"
            ],
            "type": "string",
            "description": "Narrows a keyword search or a category browse to one kind of promotion. Applied by Coles, not by this actor: 'chocolate' returned 670 products unfiltered and 77 with half price on. Note that a filter leaving nothing behind is reported as no match, because Coles answers it the same way it answers a typo.",
            "default": "any"
          },
          "monitor_mode": {
            "title": "Watch for changes",
            "enum": [
              "off",
              "changes"
            ],
            "type": "string",
            "description": "Off returns current data every run. Track changes compares this run against the last run of the same watchlist name and adds change fields to every row. A first run has no baseline, so it records one and reports no changes rather than calling everything new.",
            "default": "off"
          },
          "watchlist_name": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Separates independent watchlists so a milk list and a bread list do not overwrite each other. Saved under your own Apify account, not ours. Use a different name for a different store or a different set of products.",
            "default": "default"
          },
          "track": {
            "title": "What counts as a change",
            "type": "array",
            "description": "Price, stock, promotion shape and unit price are on by default. Unit price catches a pack shrinking at the same price. Was-price catches an advertised saving moving while the shelf price holds; it is off by default because it moves often.",
            "items": {
              "type": "string",
              "enum": [
                "price",
                "availability",
                "promotion",
                "unit_price",
                "was_price"
              ],
              "enumTitles": [
                "Price",
                "In stock or not",
                "Promotion started or ended",
                "Unit price (per kg or per L)",
                "Was-price (advertised saving)"
              ]
            },
            "default": [
              "price",
              "availability",
              "promotion",
              "unit_price"
            ]
          },
          "only_changed": {
            "title": "Only return rows that changed",
            "type": "boolean",
            "description": "Ignored on a first run, which always returns every row so you can check the watchlist matched the products you meant. A changed row still carries the whole product record, not only the difference.",
            "default": false
          },
          "baseline": {
            "title": "Compare against this baseline instead",
            "type": "array",
            "description": "Optional escape hatch. Paste back the watchlist_state record from an earlier run to compare against it directly. Normally leave this empty: the actor remembers the last run for you under the watchlist name."
          },
          "with_details": {
            "title": "Add barcode, ingredients and nutrition",
            "type": "boolean",
            "description": "Opens each product's own record for its barcode (GTIN), ingredients, allergen statement, nutrition panel, storage instructions and country of origin. None of that is in a listing row. One extra request per product, so runs are slower and cost more.",
            "default": false
          },
          "max_results": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many products to return in total, across every search term or category. A catalogue page carries 48.",
            "default": 100
          },
          "max_pages": {
            "title": "Maximum pages per term or category",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Stops each search term or category after this many pages even if the product target has not been reached.",
            "default": 20
          },
          "retries": {
            "title": "Retries per request",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times to re-ask for a page that did not come back. Coles is steady, so the default is enough for almost every run.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}