# Coles Scraper | Australian Grocery Prices, Specials & Barcodes (`ratatoskr/coles-scraper`) Actor

Scrape Coles (coles.com.au) products by category or specials for any store: price, was-price, unit price, specials, stock and optional barcode and product facts, as clean JSON. Per-store prices.

- **URL**: https://apify.com/ratatoskr/coles-scraper.md
- **Developed by:** [ratatoskr](https://apify.com/ratatoskr) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Coles Scraper: Australian grocery prices, specials & barcodes

Scrape **Coles** (coles.com.au) product data for any Coles store, as clean JSON, CSV or Excel. Give a store number and some categories (or take every category, or just the weekly specials) and get one tidy row per product.

### What you get

Each product row has:

- **Price**: the current shelf price for your chosen store, as a plain number you can sort and sum
- **Was-price and savings**: the previous price and the saving when a product is marked down, with Coles' own deal label ("save $1.80", "1/2 Price", or a multibuy's terms such as "Pick any 2 for $7")
- **Unit price**: price per 100 g, kg, L or each, so different pack sizes compare directly
- **On-special flag**: true for every product Coles has on special at your store, including multibuys and loose fruit and veg that is on special without a was-price
- **Stock**: whether the product is available, and the quantity Coles reports as available
- **Name, brand and pack size**
- **Category**: the list you asked for, and Coles' own product hierarchy
- **Image and product link**
- **Barcode and product facts** (optional): GTIN/EAN barcode, country of origin, ingredients and allergens, pulled from the product page

### Per-store prices

Coles prices and specials vary by store. Pass a **store number** and every row reflects that store. The number is the end of the store's page on Coles' store finder: `coles.com.au/find-stores/coles/wa/karratha-313` is store `313`. Left empty, the Actor uses store `7674`, the store coles.com.au shows a visitor who has not picked one.

### Ways to run it

- **By category**: list category slugs, such as `["pantry", "dairy-eggs-fridge"]`, or a subcategory such as `"pantry/baking"`. *Max products per category* applies to each category you list: two categories at 100 give up to 200 rows.
- **Whole store**: leave the categories empty to walk every top-level category, and set *Max products per category* to 10,000 (the largest category, pantry, holds about 6,200). That gives about 25,000 products in about an hour. With the default of 100 you get a sample of up to 100 from each of the 23 categories.
- **Specials only**: tick *Specials only* to get just the products currently on special for your store. The limit then applies to the specials list.
- **With barcodes**: tick *Include barcode and product facts* to add the GTIN/EAN barcode, country of origin, ingredients and allergens. In our test runs, 92 to 100% of products came back with a barcode (drinks, cleaning, frozen, pantry baking).

**Order:** the Actor reads each category cheapest first, so a capped run gives the cheapest N products of each category, not a random sample.

#### Category slugs

`baby`, `bakery`, `big-pack-value`, `bonus-credit-products`, `chips-chocolates-snacks`, `christmas`, `cleaning-laundry`, `dairy-eggs-fridge`, `deli`, `deliver-more-range`, `drinks`, `frozen`, `fruit-vegetables`, `health-beauty`, `health-dietary`, `home-garden`, `international-foods`, `liquorland`, `lunchbox`, `meat-seafood`, `pantry`, `pet`, `tobacco` (empty online in our runs).

A subcategory slug is the category's path on coles.com.au after `/browse/`: `coles.com.au/browse/pantry/baking` is `pantry/baking`.

### Output

One row per product. A product listed under two of your categories appears once, under the first. An example row with barcodes on (ingredients shortened):

```json
{
  "store": "7674",
  "source": "pantry/baking",
  "id": 5134682,
  "name": "Southern Fried Chicken Coating Mix",
  "brand": "Tandaco",
  "size": "75g",
  "price": 2,
  "wasPrice": 2.3,
  "saveAmount": 0.3,
  "onSpecial": true,
  "promoLabel": "save $0.30",
  "unitPrice": 2.67,
  "unitMeasure": "$2.67/ 100g",
  "available": true,
  "availableQuantity": 254,
  "categoryPath": "MEAL SOLUTIONS > SPICES/HERBS > SEASONINGS",
  "image": "https://productimages.coles.com.au/productimages/5/5134682.jpg",
  "productUrl": "https://www.coles.com.au/product/tandaco-southern-fried-chicken-coating-mix-75g-5134682",
  "gtin": "9300681225596",
  "countryOfOrigin": "Packed in Australia from at least 80% Australian ingredients",
  "ingredients": "Wheat Flour, Breadcrumbs [...], Herbs (0.8%), Natural Flavour. Contains: Wheat, Gluten, Soy.",
  "allergens": "Contains Gluten, Soy, Wheat; May Contain Egg, Milk, Sesame"
}
```

| Field | Meaning |
|---|---|
| `store` | The store number the prices are for |
| `source` | The category slug (or `on-special`) this row came from, as you passed it |
| `id` | Coles' product number, stable across runs: use it to compare runs |
| `price` | Shelf price in AUD, a number |
| `wasPrice`, `saveAmount` | Previous price and saving in AUD when the product is marked down, otherwise null. Multibuys and some fruit-and-veg specials have no was-price |
| `onSpecial` | True when Coles has the product on special at this store |
| `promoLabel` | Coles' deal text, such as "save $0.30", "1/2 Price" or a multibuy's "Pick any 3 for $12", or null; a few specials carry only their type, such as `REDUCED_TO_CLEAR` |
| `unitPrice` | Price per unit as a number, in the unit `unitMeasure` names; null when Coles gives none |
| `unitMeasure` | Coles' unit-price text, such as "$2.67/ 100g" or "$3.50/ 1kg": the unit is after the slash |
| `available` | Whether the product can be ordered at this store |
| `availableQuantity` | The available quantity Coles reports, passed through as Coles publishes it |
| `categoryPath` | Coles' internal product hierarchy, which differs from the website's aisles (coating mix in pantry/baking sits under MEAL SOLUTIONS) |
| `gtin`, `countryOfOrigin`, `ingredients`, `allergens` | With barcodes on only: plain text as Coles states it on the product page, null when the page has none |

### Speed

- **Without barcodes:** 100 products in about 10 to 30 seconds; a whole store takes about an hour.
- **The form's example** (one subcategory, `pantry/baking`, 100 products) took 16 seconds in our test; clear the categories for every category of the store.
- **With barcodes:** about 100 products in 40 seconds.

### Change tracking

Give a run a **Watch name** and schedule it: every run after the first returns only the products that changed since the
watch's last run (a new product, a price drop or rise, a special that started, ended or changed, a product that can no
longer be ordered or can be again). The watch compares each product's shelf price, the deal running in Coles' own words
(`promoLabel`: "save $1.50", "1/2 Price", "Pick any 2 for $7", or "on special" for loose fruit and veg on special with no
label), and whether it can be ordered (`available`). The stock quantity is not compared: in our runs it moved on more
than half of a store's products between a morning and an evening, while products that could no longer be ordered, or
could again, were under 2%; rows still carry `availableQuantity`. Each changed row carries `changeType` (the most
telling change), `changes` (all of them), `previousPrice`, `priceChange`, `priceChangePercent`, `previousPromotion` and
`previousSeenAt`, and the dataset's "Changes since the last run" view shows them first. The first run returns everything
as the baseline.

The watch remembers each product by store and product number, in a key-value store named `coles-scraper-watch` on your
own Apify account, and saves only when a run ends, so a run that fails part-way leaves the last good state; a product
missing from one run stays remembered. Different watch names keep separate memories, one per category for example, and
one name followed at two stores keeps each store's prices apart. *Max products per category* counts the products
compared, so a watch of a whole category needs it above the category's size. With barcodes on, only the products output
have their product page read, and pay the barcode rate. Turn off **Only changes** to get every product, each marked with
its change or `unchanged`. Unchanged products are not output, and you pay only for the rows that are.

```json
{ "storeId": "7674", "categories": ["pantry/baking"], "maxItemsPerCategory": 10000, "watchName": "baking-7674" }
```

### Built for monitoring

- **Change tracking.** Name a watch and schedule the Actor to get only what changed since the last run (above).
- **Prices as numbers**, ready to chart or load into a warehouse.
- **Polite.** A pause between requests keeps the site healthy for its own shoppers.

### Was the run complete?

A run where one part of your input failed (a category, or the specials list) still ends as SUCCEEDED and keeps, and charges, the products it
read; its status message then starts with "Partly failed:" and names what failed. Every run also saves a short record
under the key `OUTPUT` in its default key-value store, so a scheduled job can check it with one call,
`GET https://api.apify.com/v2/actor-runs/<runId>/key-value-store/records/OUTPUT`:

```json
{ "complete": false, "rows": 148, "parts": [
  { "part": "category pantry", "status": "cut-by-limit", "rows": 100 },
  { "part": "category dairy-eggs-fridge", "status": "failed", "reason": "dairy-eggs-fridge: stopped at page 2: Coles refused the request (HTTP 403)", "rows": 48 } ] }
```

`complete` is true when every part was read as far as you asked: `read-whole`, `cut-by-limit` (*Max products per category*) or
`nothing-found`. A part that `failed`, was `stopped-by-time-limit` or `stopped-by-charge-limit`, or was `not-read` makes
it false. `rows` counts the products each part read, those a watch held back as unchanged included.

### Pricing

Pay per result:

- **Without barcodes:** $0.50 per 1,000 products ($0.45 on Apify's Silver plan, $0.40 on Gold and up).
- **With barcodes and product facts:** $0.65 per 1,000. This rate replaces the base rate (it does not add to it), and it is the same on every plan.

Each run also pays a start fee of $0.005. A run of 300 products with barcodes costs about 20 cents. Apify's charged-event counts can lag a little behind the end of a run.

### Notes

This is an unofficial Actor and is not affiliated with Coles. Prices and product facts are read from Coles' own public store pages and passed on as Coles states them. Found a bug, or want another store or field? Open an issue on the Actor's page.

# Actor input Schema

## `storeId` (type: `string`):

Coles store number for per-store prices and specials: the end of the store's page on the Coles store finder (coles.com.au/find-stores/coles/wa/karratha-313 is 313). Left empty, the Actor uses 7674, the store coles.com.au shows a visitor who has not picked one.

## `categories` (type: `array`):

Coles category slugs, e.g. \["pantry", "dairy-eggs-fridge"], or a subcategory such as "pantry/baking" (its path on coles.com.au after /browse/). Leave empty to scrape every top-level category. The README lists all the slugs.

## `onSpecialOnly` (type: `boolean`):

Scrape only the products Coles currently lists on special for the store, instead of the categories.

## `includeDetails` (type: `boolean`):

Also fetch each product's page for its barcode (GTIN/EAN), country of origin, ingredients and allergens. Slower, and charged at the higher 'product-detail' rate.

## `maxItemsPerCategory` (type: `integer`):

Stop each category (or the specials list) after this many products: two categories at 100 give up to 200 rows. Products are read cheapest first. Leave empty for 100; for a whole store set 10000.

## `maxPages` (type: `integer`):

Safety cap on pages walked per category (48 products per page).

## `proxyCountry` (type: `string`):

Country of the residential IP used when Coles refuses a datacenter request. Default AU.

## `watchName` (type: `string`):

Give the watch a name and schedule the run: every run after the first returns only what changed since the last one (a special that started or ended, a price drop or rise, a changed deal, a product that can no longer be ordered or can be again, a new product), each with the previous price and deal. The first run returns everything as the baseline. The stock quantity is not compared, since it moves on most products every day. Different names keep separate memories in a key-value store on your own Apify account, and one name followed at two stores keeps each store's prices apart. Max products per category counts the products compared, not the rows output. With barcodes on, only the products output have their product page read. Unchanged products are not output, and you pay only for the rows that are.

## `onlyChanges` (type: `boolean`):

With a watch name: output only products that changed. Off: every one, each marked with its change (or unchanged), charged as a row.

## Actor input object example

```json
{
  "storeId": "7674",
  "categories": [
    "pantry/baking"
  ],
  "onSpecialOnly": false,
  "includeDetails": false,
  "maxItemsPerCategory": 100,
  "maxPages": 400,
  "proxyCountry": "AU",
  "onlyChanges": true
}
```

# Actor output Schema

## `products` (type: `string`):

One row per product: store, name, brand, price, was-price, unit price, specials, stock, barcode and category.

## `changes` (type: `string`):

With a watch: what changed since the watch's last run, with the previous price and offer.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "categories": [
        "pantry/baking"
    ],
    "maxItemsPerCategory": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("ratatoskr/coles-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "categories": ["pantry/baking"],
    "maxItemsPerCategory": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("ratatoskr/coles-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "categories": [
    "pantry/baking"
  ],
  "maxItemsPerCategory": 100
}' |
apify call ratatoskr/coles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ratatoskr/coles-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/97MynVqMJfeqc6Ms6/builds/VgK8hbJwoTqQHot8t/openapi.json
