{
  "openapi": "3.0.1",
  "info": {
    "title": "Coles Prices Scraper",
    "description": "Give search terms, Coles category URLs or product ids; get one row per product: price, was-price, unit price, specials, stock and category. Price-drop watch. $1.49 per 1,000 products.",
    "version": "0.1",
    "x-build-id": "d9qRWMWS0uf943Sqi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/1mp~coles-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-1mp-coles-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/1mp~coles-prices/runs": {
      "post": {
        "operationId": "runs-sync-1mp-coles-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/1mp~coles-prices/run-sync": {
      "post": {
        "operationId": "run-sync-1mp-coles-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What to search on coles.com.au, e.g. \"milk\", \"gluten free bread\", \"Cadbury\". Each term is searched separately and paged until maxResults is reached.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category or search URLs",
            "type": "array",
            "description": "Coles listing URLs to read, e.g. https://www.coles.com.au/browse/dairy-eggs-fridge/milk or https://www.coles.com.au/on-special. Must be on coles.com.au. Paging is added for you. A product URL given here is read as a product.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs or ids",
            "type": "array",
            "description": "Coles products to read one by one: a product URL (https://www.coles.com.au/product/coles-full-cream-milk-3l-8150288), its id (8150288) or its slug. One row each. An id that Coles does not have is skipped and not billed.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum products per target",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop each search term or URL after this many unique products. Each product returned is one billed result. Coles serves 48 products a page.",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum products per run",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop the whole run after this many products, over all targets. Use it to cap the cost of one run. Empty: no run cap, only maxResults per target."
          },
          "specialsOnly": {
            "title": "Specials only",
            "type": "boolean",
            "description": "On: return only products on special. Coles' own specials filter is sent with every search and listing URL, so pages hold only specials.",
            "default": false
          },
          "specialType": {
            "title": "Kind of special",
            "enum": [
              "all",
              "halfprice",
              "multibuy",
              "onlineonly"
            ],
            "type": "string",
            "description": "Which specials to return. \"all\" with Specials only off returns every product. Any other value turns Specials only on.",
            "default": "all"
          },
          "inStockOnly": {
            "title": "In stock only",
            "type": "boolean",
            "description": "On: skip products Coles reports as unavailable. Products with no price are always skipped and never billed.",
            "default": false
          },
          "monitorMode": {
            "title": "Price watch",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "snapshot: return current data on each run. changes: compare each product with the last run of the same watchlist, and add changeType (NEW, PRICE_DROP, PRICE_RISE, BACK_IN_STOCK, OUT_OF_STOCK, UNCHANGED) and previousPrice to each row. The last prices are kept in a named key-value store in your Apify account.",
            "default": "snapshot"
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Keeps separate price histories apart, e.g. one per scheduled task. Used only when Price watch is changes.",
            "default": "default"
          },
          "onlyChanged": {
            "title": "Only changed products",
            "type": "boolean",
            "description": "With Price watch on changes: return only products whose price or stock changed since the last run. UNCHANGED products are not returned and not billed. The first run returns every product as NEW.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for one page request. Failed requests are retried with a new proxy session.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default. Coles blocks some data-centre IPs; if pages come back blocked, choose the RESIDENTIAL group with country AU.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}