# NZ Grocery Prices API | $0.02/call (`architekture/nz-grocery-prices-api`) Actor

NZ grocery prices API for Woolworths NZ, PAK'nSAVE, New World, Four Square, FreshChoice and SuperValue: one HTTP call searches a product at every chain or compares one product across chains with a match confidence and the cheapest price.

- **URL**: https://apify.com/architekture/nz-grocery-prices-api.md
- **Developed by:** [architek.earth](https://apify.com/architekture) (community)
- **Categories:** E-commerce, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 api calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## NZ Grocery Prices API: Compare Supermarkets | $0.02/call

One HTTP call returns live New Zealand supermarket prices from Woolworths NZ, PAK'nSAVE, New World, Four Square, FreshChoice and SuperValue. Search a product at every chain, or compare one product across chains with a match confidence and the cheapest price. $0.02 per successful call; repeat calls within three hours answer from cache in under a second.

**Recorded call: one product compared at six chains in 10.5 seconds** (2026-11-15, `/v1/compare?q=anchor blue milk 2l`, standby run `QutdWteYNbtDsqDLF`). Four chains matched, PAK'nSAVE cheapest at $5.58; a single-product sample.

architek.earth: an independent data studio. Pay-per-result scrapers with recorded runs, published canaries and stable schemas, built for people and AI agents.

Use it from your app, a spreadsheet script or an AI agent: send a product name, get back each chain's price, pack size, unit price, specials and product link as JSON.

### Why choose this API

#### Six chains in one request

The six chains are read in parallel, so a compare across all of them takes about as long as the slowest chain (10 to 20 seconds on a fresh query). The same query again within three hours answers from cache in well under a second.

#### Matching you can audit

`/v1/compare` matches barcodes first, then names and pack sizes. Every match carries `confidence` and `matchMethod`; different pack sizes and variants (Diet, Decaf, Unsalted) are not accepted. When nothing is close enough you get the best candidates instead.

#### You pay for answers, nothing else

One charge per successful search or compare, however many chains it covers. Errors, a time when every source is unavailable, health checks, the chain list and the API description are free.

### Worth knowing up front

- **Prices are live, not a database.** A fresh query reads the chains' websites, which takes 10 to 20 seconds; set your HTTP client timeout to at least 60 seconds.
- Each chain is read at one store (defaults: PAK'nSAVE Royal Oak, New World Thorndon, Four Square Ohope Beach, FreshChoice Queenstown, SuperValue Milton; Woolworths NZ prices are national online prices). Choose another with `store.<chain>=<store id or name>`.
- Four Square lists weekly specials only, so most products have no Four Square match in most weeks.
- If one chain fails, the answer still comes back with that chain marked `failed` and `partial: true`. If every chain fails you get HTTP 503 and nothing is charged.
- Call the API with your API token (`Authorization: Bearer <token>`). A normal run does one search or compare from its input, for schedules and no-code tools.

### Try the example

```bash
curl -H "Authorization: Bearer $TOKEN" \
  "https://architekture--nz-grocery-prices-api.apify.actor/v1/compare?q=anchor%20blue%20milk%202l"
```

#### Example task: compare one product at six chains

A normal run with this input saves one row per chain to the dataset.

```json
{
  "mode": "compare",
  "q": "anchor blue milk 2l"
}
```

#### Example task: search two chains

Up to 10 offers per chain for one query.

```json
{
  "mode": "search",
  "q": "milk",
  "chains": ["paknsave", "woolworths-nz"],
  "limit": 10
}
```

### Input

Endpoints (Standby):

| Endpoint | Parameters | Returns |
|---|---|---|
| `GET /v1/search` | `q` (required), `chains` (comma list, default all six), `limit` 1 to 20 (default 10), `store.<chain>` | Offers per chain with `status`, `store`, `cached`. |
| `GET /v1/compare` | `q` or `barcode`, `size`, `threshold` 0.3 to 1 (default 0.6), `chains`, `store.<chain>` | Best match per chain with `confidence`, `matchMethod`, `offer`, and `cheapest`. |
| `GET /v1/chains` | none | Chain keys, labels, default stores, limits. Free. |
| `GET /openapi.json` | none | OpenAPI 3.0 description. Free. |
| `GET /health` | none | Liveness. Free. |

Batch run input:

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `compare` | `compare` or `search`. |
| `q` | string | `anchor blue milk 2l` in the form | Product name. |
| `barcode` | string | none | 8 to 14 digits (compare). |
| `size` | string | none | Pack size (compare). |
| `chains` | array | all six | `woolworths-nz`, `paknsave`, `new-world`, `foursquare`, `freshchoice`, `supervalue`. |
| `stores` | object | `{}` | Store per chain. |
| `limit` | integer | `10` | Offers per chain (search). |
| `feedback` | string | none | Optional note for the maintainers. Read by a human; never changes output. |

### Stable fields

Fields are only ever added, never renamed or removed.

| Field | Type | Meaning |
|---|---|---|
| `chain`, `chainLabel` | string | Chain key and name. |
| `status` | string | `ok`, `partial` or `failed` for that chain. |
| `store` | string | Store the prices apply to. |
| `cached` | boolean | Answered from the three-hour cache. |
| `offers[]` / `offer` | object | `productId`, `name`, `brand`, `size`, `price`, `unitPrice`, `unitLabel`, `wasPrice`, `promo`, `inStock`, `barcode`, `url`, `store`. |
| `matched`, `confidence`, `matchMethod` | boolean, number, string | Compare: the match and how it was made (`barcode`, `name+size`). |
| `candidates[]` | object | Compare: closest products when nothing matched. |
| `cheapest` | object | Compare: chain, price and name of the cheapest match. |
| `partial` | boolean | At least one chain failed or stopped early. |
| `charged` | boolean | This answer was billed. |
| `error.code`, `error.message` | string | On 4xx and 503 answers. |

### Output example

From `/v1/compare?q=anchor blue milk 2l` (2026-11-15, shortened):

```json
{
  "query": "anchor blue milk 2l",
  "partial": false,
  "results": [
    {"chain": "paknsave", "status": "ok", "store": "PAK'nSAVE Royal Oak", "matched": true, "confidence": 1.0, "matchMethod": "name+size", "offer": {"name": "Blue Milk", "brand": "Anchor", "size": "2l", "price": 5.58}},
    {"chain": "woolworths-nz", "status": "ok", "matched": true, "confidence": 0.944, "offer": {"name": "anchor milk standard blue", "price": 5.68}},
    {"chain": "freshchoice", "status": "ok", "matched": false, "candidates": [{"name": "Anchor UHT Blue Top Milk 1L", "price": 4.6, "confidence": 0.547}]}
  ],
  "cheapest": {"chain": "paknsave", "price": 5.58, "name": "Blue Milk"},
  "charged": true
}
```

### Advanced usage

#### Precise comparisons

Pass `barcode` where you have it, or `size` with the name. Raise `threshold` to 0.8 to accept only close matches.

#### Your local stores

`/v1/chains` lists the store parameter for each chain; for example `store.new-world=New World Queenstown`.

#### Many products

Call once per product; repeat queries within three hours are answered from cache. For a weekly list with history and price-drop alerts, use the NZ Price Monitor instead.

### Integrations

Any HTTP client works: JavaScript `fetch`, Python `requests`, Google Apps Script `UrlFetchApp`, Zapier or Make webhooks. The OpenAPI file at `/openapi.json` imports into API tools and marketplaces.

### Pricing

| Event | Price | When |
|---|---|---|
| API call | $0.02 | One successful search or compare answer, any number of chains. |

1,000 compares a month: $10. Errors, unavailable sources, health, chains and the API description are free.

### FAQ

#### Why is the first call slow?

A fresh query reads six websites live. The answer is cached for three hours, so repeats are fast.

#### Why did a chain not match?

The chain does not sell that product at that store, the closest product is a different size or variant, or (Four Square) it is not on special this week. The `candidates` list shows what was close.

#### Can an AI assistant run this?

Yes. AI assistants and agents can call the endpoints above over HTTP, or start a normal run through the API with the JSON input above and read the rows back; the stable fields and JSON error codes are designed for that.

### Related New Zealand prices

**New Zealand prices:** [Woolworths NZ](https://apify.com/architekture/woolworths-nz-scraper), [PAK'nSAVE](https://apify.com/architekture/paknsave-nz-scraper), [New World](https://apify.com/architekture/new-world-nz-scraper), [Four Square](https://apify.com/architekture/foursquare-nz-scraper), [FreshChoice](https://apify.com/architekture/freshchoice-nz-scraper), [SuperValue](https://apify.com/architekture/supervalue-nz-scraper), [NZ Price Monitor](https://apify.com/architekture/nz-price-monitor), NZ Grocery Prices API (this API).

### Support and legal

Questions or a product that will not match: open an issue on this page or use the `feedback` input. This API reads publicly available prices only, uses no login or account, and is not affiliated with the retailers.

architek.earth

### Changelog

- 2026-11-15: 0.1 first release. Search and compare endpoints for six NZ chains, store choice, three-hour cache, OpenAPI description.

# Actor input Schema

## `mode` (type: `string`):

compare: the best match for one product at each chain, with confidence and the cheapest. search: the offers each chain returns for the query.

## `q` (type: `string`):

Product name, for example "anchor blue milk 2l". For compare, q or barcode is required.

## `barcode` (type: `string`):

8 to 14 digits; matches first where the chain publishes barcodes.

## `size` (type: `string`):

Optional, for example "2l" or "500g".

## `chains` (type: `array`):

Default: all six.

## `stores` (type: `object`):

Store per chain, for example {"paknsave": "<store id>"}. Blank uses each chain's default store.

## `limit` (type: `integer`):

Search results returned per chain.

## `feedback` (type: `string`):

Tell us what you needed and did not get. Read by a human; never changes the output.

## Actor input object example

```json
{
  "mode": "compare",
  "q": "anchor blue milk 2l",
  "stores": {},
  "limit": 10
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "q": "anchor blue milk 2l"
};

// Run the Actor and wait for it to finish
const run = await client.actor("architekture/nz-grocery-prices-api").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 = { "q": "anchor blue milk 2l" }

# Run the Actor and wait for it to finish
run = client.actor("architekture/nz-grocery-prices-api").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 '{
  "q": "anchor blue milk 2l"
}' |
apify call architekture/nz-grocery-prices-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,architekture/nz-grocery-prices-api"
        }
    }
}
```

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/bFk2eqfp1KBgZ57fx/builds/LlP5xUK4TdZTEChlm/openapi.json
