{
  "openapi": "3.0.1",
  "info": {
    "title": "Coles Scraper - Prices, Specials, Half Price & Nutrition",
    "description": "Scrape Coles Australia by keyword, category, aisle, specials (half price, multi-buy, online only), link or product number: price, was price, unit price per kg/L, offer, stock, limits, category, images. Barcode, ingredients, nutrition add-on. Store directory. $0.45 per 1,000 products, no start fee.",
    "version": "0.1",
    "x-build-id": "KYtmq0f32UltT9qWv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~coles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-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/topapi~coles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-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/topapi~coles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Products to search for, one per line, e.g. \"milk\", \"tim tam\", \"nappies\". A Coles product number (e.g. 8150288) finds that product.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Coles links",
            "type": "array",
            "description": "Any coles.com.au link: a product page, a category or aisle (…/browse/dairy-eggs-fridge/milk), a search (…/search/products?q=coffee, with the sort and filters you set there), the specials (…/on-special?filter_Special=halfprice) or a store page (…/find-stores/coles/wa/karratha-313).",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Departments, categories or aisles by name or slug path, e.g. \"Dairy, Eggs & Fridge\", \"dairy-eggs-fridge/milk\", \"pantry/breakfast\", \"milk\". Every product in it is read (up to Max per search).",
            "items": {
              "type": "string"
            }
          },
          "allDepartments": {
            "title": "Every department (whole catalogue)",
            "type": "boolean",
            "description": "Read all 18 Coles departments, about 31,000 products before overlaps (tobacco only when you name it in Categories). Set Max per search to 0 for everything.",
            "default": false
          },
          "specials": {
            "title": "Specials",
            "enum": [
              "none",
              "all",
              "halfprice",
              "multibuy",
              "onlineonly"
            ],
            "type": "string",
            "description": "Read Coles' On Special catalogue. On its own it reads the whole catalogue; with Categories it reads that category's specials; with Search terms it keeps the matching specials.",
            "default": "none"
          },
          "productIds": {
            "title": "Product numbers",
            "type": "array",
            "description": "Coles product numbers, the digits at the end of a product link, e.g. \"8150288\".",
            "items": {
              "type": "string"
            }
          },
          "storeDirectory": {
            "title": "Store directory",
            "type": "boolean",
            "description": "Add Coles store rows: address, phone, coordinates, trading and holiday hours, services (878 stores; narrow with States). Charged per store row.",
            "default": false
          },
          "storeStates": {
            "title": "States (store directory)",
            "type": "array",
            "description": "Only stores in these states.",
            "items": {
              "type": "string",
              "enum": [
                "NSW",
                "VIC",
                "QLD",
                "WA",
                "SA",
                "TAS",
                "ACT",
                "NT"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "priceAscending",
              "priceDescending",
              "unitPriceAscending"
            ],
            "type": "string",
            "description": "Order of Coles' listings.",
            "default": "relevance"
          },
          "specialsOnly": {
            "title": "Only products on special",
            "type": "boolean",
            "description": "Keep only products Coles marks as a special (half price, % off, multi-buy, was-price).",
            "default": false
          },
          "halfPriceOnly": {
            "title": "Only half price",
            "type": "boolean",
            "description": "Keep only half-price specials.",
            "default": false
          },
          "inStockOnly": {
            "title": "Only available",
            "type": "boolean",
            "description": "Keep only products Coles shows as available.",
            "default": false
          },
          "minPrice": {
            "title": "Min price ($)",
            "minimum": 0,
            "type": "number",
            "description": "Lowest shelf price to keep."
          },
          "maxPrice": {
            "title": "Max price ($)",
            "minimum": 0,
            "type": "number",
            "description": "Highest shelf price to keep."
          },
          "minDiscountPercent": {
            "title": "Min discount (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Keep only products with at least this saving off the was price, e.g. 40."
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Keep only these brands, e.g. \"Coles\", \"Arnott's\".",
            "items": {
              "type": "string"
            }
          },
          "excludeCategories": {
            "title": "Exclude categories",
            "type": "array",
            "description": "Drop products in these departments, categories or aisles, e.g. \"Liquorland\", \"Baby\".",
            "items": {
              "type": "string"
            }
          },
          "includeSponsored": {
            "title": "Include sponsored tiles",
            "type": "boolean",
            "description": "Coles puts a few advertised products at the top of page 1; they count in Coles' own result total, so they are kept by default (each product once, flagged is_sponsored). Off: Coles' unsponsored list only.",
            "default": true
          },
          "includeSuggested": {
            "title": "Include suggested products",
            "type": "boolean",
            "description": "Add the cross-sell product Coles suggests beside some results (flagged is_associated_result; not part of the search).",
            "default": false
          },
          "includeDetails": {
            "title": "Product details",
            "type": "boolean",
            "description": "Read each product's page: barcode (GTIN), ingredients, allergens, dietary, nutrition panel (per serve and per 100 g), storage, dimensions, country of origin, long description, variants. One extra request per product.",
            "default": false
          },
          "dietary": {
            "title": "Dietary (needs details)",
            "type": "array",
            "description": "Keep only products whose label says all of these, e.g. \"vegan\", \"gluten free\". Turns details on.",
            "items": {
              "type": "string"
            }
          },
          "excludeAllergens": {
            "title": "Exclude allergens (needs details)",
            "type": "array",
            "description": "Drop products whose allergen or ingredient text mentions any of these, e.g. \"peanut\", \"milk\". Turns details on.",
            "items": {
              "type": "string"
            }
          },
          "maxSugarPer100g": {
            "title": "Max sugars per 100 g (needs details)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products at or under this many grams of sugars per 100 g. Turns details on."
          },
          "minProteinPer100g": {
            "title": "Min protein per 100 g (needs details)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products with at least this many grams of protein per 100 g. Turns details on."
          },
          "monitorMode": {
            "title": "Only new or changed",
            "type": "boolean",
            "description": "Remember what earlier runs with the same inputs delivered. Later runs deliver only new products and those whose price, was price, special or availability changed, each with change_type, old_price and price_delta.",
            "default": false
          },
          "onlyChanged": {
            "title": "Skip unchanged products",
            "type": "boolean",
            "description": "With monitoring on: off delivers every product with its change fields (unchanged ones as UNCHANGED, charged).",
            "default": true
          },
          "includeDisappeared": {
            "title": "Report disappeared products",
            "type": "boolean",
            "description": "With monitoring on: add a DISAPPEARED row for each product an earlier run delivered that Coles no longer lists in the same inputs (only after a run that read the whole scope).",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that remembers delivered products. Use a different name per watchlist.",
            "default": "coles-scraper-state"
          },
          "maxResultsPerSearch": {
            "title": "Max per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Products per search term, category, specials list or link. 0 = no limit.",
            "default": 100
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Rows per run across every input (stores count too). 0 = no limit.",
            "default": 1000
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional: stop each search, category or specials list after this many Coles pages (48 products a page)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave empty: the run starts direct and moves to Apify's datacenter, then Australian residential proxy only if Coles turns it away. Your own proxy replaces the direct start."
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Requests in flight at once. Requests to Coles are spaced on one address either way.",
            "default": 2
          },
          "requestIntervalMs": {
            "title": "Gap between requests (ms)",
            "minimum": 800,
            "maximum": 10000,
            "type": "integer",
            "description": "Time between two requests from the same address. Coles' firewall turns away bursts; 1,500 ms is the tested pace.",
            "default": 1500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}