# Coles AU - Product prices (`scrapingbuddy/coles-au-products`) Actor

Scrapes products and prices from Coles Australia (coles.com.au) by search term or category, for any store.

- **URL**: https://apify.com/scrapingbuddy/coles-au-products.md
- **Developed by:** [Giacomo Pigani](https://apify.com/scrapingbuddy) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

Scrapes products and prices from [Coles Australia](https://www.coles.com.au). You can search the
same way as on the website, or download every product in a category. Prices and range come from
the Coles store nearest to any suburb or postcode you choose.

### Input

Set a search term or a category, not both: like on the website, Coles' search can't be limited
to a category. Without a store, prices are the ones Coles shows a new visitor (delivery to
Melbourne 3000).

| Parameter | Options | Description |
|---|---|---|
| `searchTerm` | (optional) Text to search for | One search, like the search box on the website. Returns the same products, in the same order, as the website, sponsored ones included. |
| `category` | (optional) Category page URL, e.g. `https://www.coles.com.au/browse/dairy-eggs-fridge/milk`, or its path, e.g. `dairy-eggs-fridge/milk` | Every product in this category or subcategory, in the website's order. |
| `store` | (optional) Suburb or postcode, e.g. `Cannington` or `6107` | Uses the prices and range of the nearest Coles store, as when you choose a Click & Collect store on the website. The run fails if Coles doesn't know the suburb or postcode. |

Example using a search query:

```json
{
  "searchTerm": "tim tam"
}
```

Example using a category, at a store in Perth (a category path works too):

```json
{
  "category": "https://www.coles.com.au/browse/fruit-vegetables",
  "store": "Cannington"
}
```

#### Categories

The top-level categories and their paths. A subcategory's path is the part after `/browse/` in its
URL on the website, e.g. `dairy-eggs-fridge/milk`. Seasonal categories come and go.

| Path | Category |
|------|----------|
| `meat-seafood` | Meat & Seafood |
| `fruit-vegetables` | Fruit & Vegetables |
| `dairy-eggs-fridge` | Dairy, Eggs & Fridge |
| `bakery` | Bakery |
| `deli` | Deli |
| `pantry` | Pantry |
| `chips-chocolates-snacks` | Chips, Chocolates & Snacks |
| `international-foods` | International Foods |
| `health-dietary` | Health & Dietary |
| `drinks` | Drinks |
| `liquorland` | Liquorland |
| `frozen` | Frozen |
| `cleaning-laundry` | Cleaning & Laundry |
| `health-beauty` | Health & Beauty |
| `baby` | Baby |
| `pet` | Pet |
| `home-garden` | Home & Garden |
| `tobacco` | Tobacco |
| `bonus-credit-products` | Bonus Credit Products (seasonal) |
| `back-to-school` | Back to School (seasonal) |
| `big-pack-value` | Big Pack Value |
| `deliver-more-range` | Deliver More Range |

### Output

- **Dataset**: one item per product, as Coles returns it, plus the product page `url` and the main
  `image`. Search results also carry `search_term`. Products come in the order the website shows
  them, each once:
  - Sponsored products are kept where they appear, marked by `adId`. When a sponsored product is
    also in the listing further down, it is kept only at its first place.
  - Banners and "you might also like" products from other categories are left out.
  - Coles' default order sometimes reshuffles while a long listing is paged, which repeats some
    products and skips others. When that happens, the skipped products are collected from the
    listing sorted by price and added at the end.
- **`STORE`** (key-value store): what was requested and which store served the data, e.g.
  `{"requested": "Cannington", "id": "322", "name": "Coles Carousel", "address": "Carousel S/C, 1382 Albany Hwy", "suburb": "Cannington", "postcode": "6107", "state": "WA"}`.
- **`FAILED_REQUESTS`** (key-value store, only when some requests failed): the URL and error
  of each failed page. If any page failed, the run fails rather than returning an incomplete
  dataset as a success.

#### Product fields

Values come as Coles sends them. Prices are in AUD. Fields inside an object are written with a
dot, e.g. `pricing.now`.

| Field | Description |
|---|---|
| `id` | Product code, as at the end of the product page URL. |
| `brand`, `name`, `size` | Brand, name and pack size, e.g. *Dairy Farmers*, *Protein Smoothie Chocolate*, *400mL*. |
| `description` | Full name in capitals. |
| `url`, `image` | Product page and main image. |
| `availability` | Available at the store. Unavailable products have no `pricing`. |
| `pricing.now`, `pricing.was` | Price now, and before a special (`0` when there is none). |
| `pricing.saveAmount`, `pricing.savePercent`, `pricing.saveStatement`, `pricing.priceDescription` | The saving, e.g. *save $1.25*, *1/2 Price*. |
| `pricing.comparable` | Unit price as shown, e.g. *$8.25/ 1L*. `pricing.unit` has it as numbers. |
| `pricing.promotionType`, `pricing.specialType` | Promotion, e.g. `SPECIAL`, `EVERYDAY`, `NEW`, and kind of special, e.g. `MULTI_SAVE`, `PERCENT_OFF`, `REDUCED_TO_CLEAR`. |
| `pricing.offerDescription`, `pricing.multiBuyPromotion` | Multi-buy offer, e.g. *Pick any 2 for $8*. |
| `onlineHeirs` | The product's places on the website: category, subcategory and aisle names and IDs. |
| `restrictions` | Purchase limits, liquor and tobacco age flags, delivery restrictions. |
| `availableQuantity`, `locations` | Units available and aisle information, when Coles has them. |
| `imageUris`, `variations`, `minGuarantee` | All images, number of other sizes or flavours, minimum shelf life. |
| `adId`, `adSource` | Set on a sponsored product: the ad ID and the ad network, e.g. `citrus`. |
| `search_term` | Search rows only: the search that returned the product. |

# Actor input Schema

## `searchTerm` (type: `string`):

One search, like the search box on the Coles website, e.g. "tim tam". Returns the same products, in the same order, as the website, sponsored products included where they appear. Leave empty to scrape a category instead.

## `category` (type: `string`):

A Coles category or subcategory page URL, e.g. https://www.coles.com.au/browse/dairy-eggs-fridge/milk, or just its path, e.g. dairy-eggs-fridge/milk. Scrapes every product in it.

## `store` (type: `string`):

A suburb or postcode, e.g. "Cannington" or "6107". The nearest Coles store's prices and range are used, as when you choose a Click & Collect store on the website. Leave empty for the prices Coles shows a new visitor (delivery to Melbourne 3000).

## Actor input object example

```json
{
  "searchTerm": "tim tam"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "searchTerm": "tim tam"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingbuddy/coles-au-products").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 = { "searchTerm": "tim tam" }

# Run the Actor and wait for it to finish
run = client.actor("scrapingbuddy/coles-au-products").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 '{
  "searchTerm": "tim tam"
}' |
apify call scrapingbuddy/coles-au-products --silent --output-dataset

```

## MCP server setup

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

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/9E9OtH5dh058pX4Vd/builds/BKL0kfvrPziukscnV/openapi.json
