{
  "openapi": "3.0.1",
  "info": {
    "title": "Coles Scraper: Prices, Specials, Stock by Store",
    "description": "Scrape Coles Australia products and prices by keyword, category, specials or product link: price, was price, half price and multi buy offers, unit price per kg or litre, stock, barcode, nutrition, category. Prices and stock by store or postcode. Monitor mode returns price changes only.",
    "version": "0.1",
    "x-build-id": "XeWx0EQEPuKmHRlZv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~coles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~coles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~coles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Products as you would type them in the coles.com.au search box, one per line. Example: milk, coffee beans, nappies. Each keyword reads Coles' search results, 48 per page, up to Max products per list. Any Coles link (product, category, specials, search) works here too. Up to 100 searches per run.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (optional)",
            "type": "array",
            "description": "Coles categories by name (Milk, Dairy, Eggs & Fridge, Soft Drinks), slug path (dairy-eggs-fridge/milk) or link (https://www.coles.com.au/browse/dairy-eggs-fridge/milk). A department includes its categories and aisles. Write all to read every department.",
            "items": {
              "type": "string"
            }
          },
          "specials": {
            "title": "Specials",
            "enum": [
              "none",
              "all",
              "halfprice",
              "multibuy",
              "onlineonly"
            ],
            "type": "string",
            "description": "Read Coles' specials list: every product on special, half price only, multi buy only, or online only specials. Coles changes its specials on Wednesday.",
            "default": "none"
          },
          "productUrls": {
            "title": "Product links or product ids (optional)",
            "type": "array",
            "description": "Coles product links (https://www.coles.com.au/product/coles-full-cream-milk-3l-8150288) or product ids (8150288), 24 per call. Each comes with barcode, ingredients, allergens, nutrition and all images (stock quantity comes on list rows only). Built for one record at a time from Clay, n8n or an AI agent, and for watch lists.",
            "items": {
              "type": "string"
            }
          },
          "storeIds": {
            "title": "Store ids for store prices (optional)",
            "type": "array",
            "description": "Coles prices, was prices and stock differ by store. Give store ids, the number at the end of a store page link (313 in https://www.coles.com.au/find-stores/coles/wa/karratha-313), or the store links themselves. Every list and product is read once per store and each row carries the store. Up to 50 stores per run, store ids and postcodes together. Empty: Coles' default online store.",
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "Postcodes for store prices (optional)",
            "type": "array",
            "description": "Australian postcodes, for example 2000 or 6714. Each one uses the nearest Coles supermarket that sells online (a store without an online range is skipped for the next nearest).",
            "items": {
              "type": "string"
            }
          },
          "fullCatalogue": {
            "title": "Read the full catalogue",
            "type": "boolean",
            "description": "On: every Coles department (24,926 products for one store in our test). Max products per list does not limit it; use the run's max cost to cap the spend.",
            "default": false
          },
          "maxItems": {
            "title": "Max products per list",
            "minimum": 1,
            "maximum": 30000,
            "type": "integer",
            "description": "The most products to return for each keyword, category or specials list, per store, 1 to 30,000. Product links are not limited by this. Example: 500.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "recommendedDescending",
              "priceAscending",
              "priceDescending",
              "unitPriceAscending",
              "productNameAscending",
              "productNameDescending",
              "salesDescending"
            ],
            "type": "string",
            "description": "Order of the results, as on coles.com.au. Empty: relevance for keywords, name A to Z for categories and specials (stable between runs, so long lists come back complete)."
          },
          "includeDetails": {
            "title": "Add barcode, ingredients and nutrition to list rows",
            "type": "boolean",
            "description": "On: the barcode (GTIN), ingredients, allergens, dietary and storage text, nutrition panel, country of origin and all images are added to the rows of keyword, category and specials lists, one extra call per 24 products. Product links always come with these. No extra charge.",
            "default": false
          },
          "includeSponsored": {
            "title": "Keep sponsored products",
            "type": "boolean",
            "description": "Coles mixes up to 9 paid placements into the first page of a keyword or category. On: they are kept and marked is_sponsored. Off: they are left out and not charged.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode: only what changed since the last run",
            "type": "boolean",
            "description": "On: the actor remembers the last price of every product it delivered (per store, under the monitor name) and returns only products whose price or was price changed, with previous_price, price_change and price_change_percent, plus new products. Unchanged products are not delivered and not charged. Run it on a schedule with the same input.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate price memories for separate watch lists, for example dairy-wa. Letters, numbers and dashes. Only used in monitor mode.",
            "default": "default"
          },
          "monitorWatch": {
            "title": "What counts as a change",
            "enum": [
              "price",
              "all"
            ],
            "type": "string",
            "description": "Price: price and was price only. All: also a special starting, ending or changing its offer, and a product going in or out of stock.",
            "default": "price"
          },
          "includeNewProducts": {
            "title": "Return new products in monitor mode",
            "type": "boolean",
            "description": "On: products the monitor has not seen before are returned with change_type new (on the first run, that is every product). Off: they are saved as the baseline and not returned or charged, so the first run costs nothing per product.",
            "default": true
          },
          "residentialRetry": {
            "title": "Retry refused pages on an Australian residential IP",
            "type": "boolean",
            "description": "Coles sometimes answers datacenter IPs with a bot check page. On: a page refused twice gets a last try on an Australian residential IP, and while most datacenter calls are refused the actor goes to residential IPs first (capped per run, at no extra cost to you). Off: datacenter IPs only, and refused pages are skipped.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy by default, which Coles answered on most calls in our tests.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}