{
  "openapi": "3.0.1",
  "info": {
    "title": "Coles Scraper: Grocery & Unit Prices, Specials",
    "description": "Coles scraper for Australian grocery prices on coles.com.au: shelf price, was price, unit price per kg or litre, half-price and multibuy specials, stock and aisle, for any keyword, aisle, product id and store. Track price changes between runs. One flat row per product, no personal data.",
    "version": "0.1",
    "x-build-id": "mEO9E2KYSaWalIavl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/myth84~coles-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-myth84-coles-product-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/myth84~coles-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-myth84-coles-product-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/myth84~coles-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-myth84-coles-product-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": "Search keywords",
            "type": "array",
            "description": "Enter one search per line, as you would type it in the Coles search box, e.g. <code>milk</code>, <code>coffee beans</code> or <code>nappies</code>. Each keyword is searched at each store below. Prefilled with <code>milk</code>: clear it to list only aisles, specials or product ids. Optional: with no keyword, aisle, specials or product id at all, the Actor searches milk.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Aisles",
            "type": "array",
            "description": "Coles aisles to list in full, as a slug or a browse URL copied from coles.com.au, e.g. <code>dairy-eggs-fridge</code>, <code>pantry</code>, <code>dairy-eggs-fridge/cheese</code> or <code>https://www.coles.com.au/browse/bakery</code> (read by the Actor, never opened). An unknown aisle is left out with a message. Default empty: keywords are enough.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "specials": {
            "title": "Specials",
            "enum": [
              "none",
              "all",
              "halfprice",
              "multibuy"
            ],
            "type": "string",
            "description": "Keep only the products on special. Alone (no keyword, no aisle: clear the prefilled milk) it lists every product of that type at the store; with keywords or aisles it filters them, e.g. the half-price coffee. Default none: regular results, specials included and flagged in promotionLabels.",
            "default": "none"
          },
          "productIds": {
            "title": "Product ids (basket)",
            "type": "array",
            "description": "Coles product ids or product page URLs to read one by one, e.g. <code>8150288</code> or <code>https://www.coles.com.au/product/coles-full-cream-milk-3l-8150288</code> (only the id is read, the page is never opened): the basket to track every day. Every id is read at every store; maxResults does not apply. Default empty.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "storeIds": {
            "title": "Coles store numbers",
            "type": "array",
            "description": "Coles store numbers whose prices and stock you want, e.g. <code>7674</code> (the default online store, Truganina VIC) or <code>313</code> (Karratha WA). Prices and stock differ from store to store: every keyword, aisle and product id is read at every store, one row per product and store. Default 7674.",
            "default": [
              "7674"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum products per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop each keyword, aisle or specials search, at each store, after this many unique products; you are never charged for more. A page holds 48 products. Default 50: the top of a search in two pages; the form is prefilled with 20 for a quick first run. Up to 10,000 (a whole aisle).",
            "default": 50
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "salesDescending",
              "priceAscending",
              "priceDescending",
              "unitPriceAscending",
              "relevance"
            ],
            "type": "string",
            "description": "Order of the results. Best sellers (the Coles default), price low to high and unit price low to high were validated at build time; price high to low and relevance come from the Coles website and are not verified yet. Default salesDescending: best sellers first.",
            "default": "salesDescending"
          },
          "monitorPrices": {
            "title": "Monitor prices",
            "type": "boolean",
            "description": "Off (default): every product is returned and the four monitoring columns stay null. On: every product is compared with the previous run of the same search or basket, by Coles product id and store, and maxResults becomes the number of products compared per search.",
            "default": false
          },
          "onlyChanges": {
            "title": "Return only changes",
            "type": "boolean",
            "description": "With price monitoring on: return and charge only the new products and the products whose price changed since the previous run; a run without any change succeeds with an empty dataset. Off (default): every compared product is returned with its changeType (new, price_changed, unchanged). Recommended for scheduled runs.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitoring store",
            "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$",
            "type": "string",
            "description": "Name of the key-value store, in your account, that keeps the previous prices (one record per search and Coles store, one per basket), e.g. <code>coles-weekly-basket</code>. Runs sharing a name share the records; use one name per schedule. Letters, digits and dashes only, at most 63 characters; upper case is lowered. Default coles-price-monitor.",
            "default": "coles-price-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify residential proxies with an Australian exit (default, required for Coles); other countries are refused by Coles and the run logs a warning. Free Apify datacenter proxies are tried automatically when the residential ones are refused several times in a row. You can also provide your own Australian proxy URLs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "AU"
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Searches and product ids read at the same time, each request on its own proxy session. Lower it if Coles refuses many requests (the log says so). Default 3: validated at build time (24 of 24 pages served).",
            "default": 3
          },
          "maxRequests": {
            "title": "Max requests",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap on the requests of one run, all searches, product ids and retries included. Default 1000: about 45,000 products at 48 per page, far above a usual run; raise it for a basket of more than about 900 product ids.",
            "default": 1000
          },
          "debugStoreHtml": {
            "title": "Store raw API answers",
            "type": "boolean",
            "description": "Debugging only: save every answer of Coles (JSON, or the refusal page) in the run's key-value store. Uses storage and slows the run down a little. Default off: not needed to get the rows.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}