{
  "openapi": "3.0.1",
  "info": {
    "title": "Coles & Woolworths Scraper: Prices, Specials & Unit Prices",
    "description": "Get Australian supermarket prices from Coles and Woolworths by keyword, category or product ID: current price, was-price, unit price, specials (half price, multi-buy), promotions and stock in one unified format. For price tracking, price comparison apps and grocery specials alerts.",
    "version": "1.0",
    "x-build-id": "VY3cH9ed44H2Wltst"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/egra_van~au-grocery-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-egra_van-au-grocery-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/egra_van~au-grocery-prices/runs": {
      "post": {
        "operationId": "runs-sync-egra_van-au-grocery-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/egra_van~au-grocery-prices/run-sync": {
      "post": {
        "operationId": "run-sync-egra_van-au-grocery-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": {
          "stores": {
            "title": "Stores",
            "type": "array",
            "description": "Which supermarkets to search. Search terms, bare product numbers and \"Only specials\" run on every selected store. Category and product links always run on the store they belong to.",
            "items": {
              "type": "string",
              "enum": [
                "coles",
                "woolworths"
              ],
              "enumTitles": [
                "Coles",
                "Woolworths"
              ]
            },
            "default": [
              "coles",
              "woolworths"
            ]
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search in each selected store, e.g. \"milk\", \"tim tam\", \"nappies\". Each term returns up to \"Max products per search\" products per store.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Category pages copied from the store website, e.g. https://www.coles.com.au/browse/dairy-eggs-fridge or https://www.woolworths.com.au/shop/browse/fruit-veg. Sub-categories work too. Use https://www.woolworths.com.au/shop/browse/specials or https://www.coles.com.au/on-special for the current specials.",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Products (links or IDs)",
            "type": "array",
            "description": "Specific products to check: product links (https://www.coles.com.au/product/...-1234567, https://www.woolworths.com.au/shop/productdetails/123456/...), prefixed IDs (\"coles:1234567\", \"woolworths:123456\") or bare product numbers, which are looked up in every selected store.",
            "items": {
              "type": "string"
            }
          },
          "onlySpecials": {
            "title": "Only specials",
            "type": "boolean",
            "description": "Return only products that are on special (a was-price, a half-price or a promotion). With no search terms, categories or products, the Actor returns the stores' full specials lists.",
            "default": false
          },
          "maxItemsPerSearch": {
            "title": "Max products per search",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of products saved for each search term, category or specials list, per store. You pay only for products saved.",
            "default": 100
          },
          "includeSponsored": {
            "title": "Include sponsored products",
            "type": "boolean",
            "description": "Also save the paid 'sponsored' / 'promoted' products the stores insert into results. Off by default because they often don't match the search and repeat on every page. Sponsored rows are marked with isSponsored.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy used for both stores. The default Apify Proxy works in most cases. If the log says requests are BLOCKED, switch to the RESIDENTIAL group with country Australia (AU) — Coles in particular is protected by Imperva.",
            "default": {
              "useApifyProxy": true
            }
          },
          "useBrowserForCookies": {
            "title": "Use a browser to pass Coles bot protection",
            "type": "boolean",
            "description": "Open the Coles homepage once in a real Chrome browser to pass its bot protection and collect cookies, then load products with fast JSON requests. Keep this on: Coles blocks plain requests. Woolworths never needs it (a browser is only used there if plain requests get blocked).",
            "default": true
          },
          "browserFallback": {
            "title": "Switch to in-browser requests when blocked",
            "type": "boolean",
            "description": "If fast requests keep getting blocked, load the JSON from inside the real browser (slower, but looks exactly like a visitor). Recommended.",
            "default": true
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety limit on result pages read per search term or category (Coles shows 48 products per page, Woolworths 36). Mostly matters with \"Only specials\", where many pages may be checked to find enough specials.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed or blocked request is retried (with a new IP and new cookies when blocked) before that search is reported as failed.",
            "default": 4
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Average pause between two requests to the same store. Slower is less likely to be blocked.",
            "default": 800
          },
          "saveDebugPages": {
            "title": "Save block pages for diagnosis",
            "type": "boolean",
            "description": "When a store answers with a block/captcha page, save up to 4 such pages (and a browser screenshot) per store to the run's key-value store as DEBUG-* records. Free; helps report problems.",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw store data",
            "type": "boolean",
            "description": "Add the original product object from the store's API as a \"raw\" field on every product (large; for debugging or fields not in the unified format).",
            "default": false
          },
          "colesBaseUrl": {
            "title": "Coles base URL (testing)",
            "type": "string",
            "description": "For testing only: send Coles requests to this address instead of https://www.coles.com.au (e.g. a local mock server). Leave empty."
          },
          "woolworthsBaseUrl": {
            "title": "Woolworths base URL (testing)",
            "type": "string",
            "description": "For testing only: send Woolworths requests to this address instead of https://www.woolworths.com.au (e.g. a local mock server). Leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}