# Dan Murphy's AU Product Scraper (`dromb/danmurphys-au-product-scraper`) Actor

Scrape Dan Murphy's Australia product search results, categories, prices, and liquor-specific data (ABV, volume, region of origin) via internal JSON API.

- **URL**: https://apify.com/dromb/danmurphys-au-product-scraper.md
- **Developed by:** [Dmitriy Gyrbu](https://apify.com/dromb) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Dan Murphy's AU Product Scraper

Scrape Dan Murphy's Australia product search results, categories, prices, and liquor-specific data through the site's internal JSON API.

### Current implementation

- **Lightweight HTTP only:** no browser automation.
- **Transport:** `curl_cffi` with Chrome TLS/browser impersonation through Apify Proxy in cloud runs.
- **Search:** direct API search when product JSON is returned. Department redirects such as Beer, Whisky, and Wine are resolved back to API facet filters rather than downloading a global catalog and filtering it client-side.
- **Item lookup:** exact stockcode (or a stockcode extracted from a Dan Murphy's product URL) is sent directly as the API `SearchTerm`, then exact-matched in the response.
- **Categories:** the categories operation returns the current category list; the category operation resolves a category ID and fetches that category through an API filter.
- **Fail-close:** transport/API failures, unexpected response shapes, and invalid required inputs fail the Actor instead of returning a successful empty Dataset. A valid lookup for a stockcode that does not exist returns `status: not_found` with an empty Dataset.

### Operations

#### `search`

Inputs: `query`, `page`, `pageSize`, optional price bounds, `sort`, and `maxItems`.

Examples:

- `query: "heineken"` — ordinary product search.
- `query: "beer"` or `"whisky"` — department redirects are translated to the matching Variety facet.
- `query: "wine"` — wine redirect is translated to the relevant wine Variety terms.
- `query: "*"` — wildcard catalog page.

The operation is page-based. `maxItems` caps the number of rows returned for the requested page; it does not automatically crawl subsequent pages.

#### `item`

Provide `stockcode` or a Dan Murphy's product `url`. The Actor performs a direct stockcode search and returns the exact matching product when present.

#### `categories`

Returns the category records exposed by the current Dan Murphy's categories API. On 22 September 2026 the verified cloud run returned 364 categories; this count is live data and may change.

#### `category`

Provide a `categoryId` returned by the categories operation. The Actor resolves it to the current category term and returns products from that category.

#### `probe`

Performs a bounded API connectivity/product probe.

### Output

Product rows include identifiers, title, brand, description, URL, prices and price tiers when available, images, pack size, ABV, origin/region, standard drinks, vintage/brewery fields where applicable, source metadata, and category information.

Some historical or unavailable products can legitimately have no current price even when the product record itself is returned.

### Runtime requirements

- Python 3.12 runtime image
- `curl-cffi==0.6.0`
- `apify==3.4.1`
- Apify Proxy configuration available to the cloud run

The Actor intentionally fails if a usable Apify Proxy configuration cannot be created.

### Limitations

- Store/location-specific inventory context is not implemented.
- The target is an internal API and its response/redirect contracts may evolve.
- Pagination is explicit through `page` / `pageSize`; a single run operation does not implicitly crawl every page.
- A product can exist without a current price in the upstream response.

# Actor input Schema

## `operation` (type: `string`):

Actor operation to execute. Each operation has specific required inputs.

## `query` (type: `string`):

Required for search operation. Product search term (e.g., 'wine', 'beer', 'whisky'). Use '\*' for wildcard search.

## `categoryId` (type: `string`):

Required for category operation. Category ID from categories operation (e.g., '1060' for Red Wine).

## `stockcode` (type: `string`):

Required for item operation. Product stock code (e.g., '123456'). Can also use product URL.

## `url` (type: `string`):

Alternative for item operation. Full product URL (e.g., 'https://www.danmurphys.com.au/product/DM\_123456/product-name').

## `page` (type: `integer`):

Optional for search and category operations. Page number for pagination (0-based). Defaults to 0.

## `pageSize` (type: `integer`):

Optional for search and category operations. Number of results per page (max 100). Defaults to 20.

## `minPrice` (type: `number`):

Optional for search operation. Filter results by minimum price.

## `maxPrice` (type: `number`):

Optional for search operation. Filter results by maximum price.

## `sort` (type: `string`):

Optional for search and category operations. Sort order (e.g., 'Name', 'Price'). Defaults to 'Name'.

## `maxItems` (type: `integer`):

Optional for search and category operations. Maximum number of items returned from the requested page. The effective request size is min(pageSize, maxItems, 100).

## Actor input object example

```json
{
  "operation": "search",
  "page": 0,
  "pageSize": 20,
  "sort": "Name",
  "maxItems": 100
}
```

# Actor output Schema

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

Normalized dataset items returned by the actor.

## `summary` (type: `string`):

Run summary JSON stored under the OUTPUT key.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dromb/danmurphys-au-product-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dromb/danmurphys-au-product-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 '{}' |
apify call dromb/danmurphys-au-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dromb/danmurphys-au-product-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/Wae93rawT1PKFcaM3/builds/DJhDXwzvJ9IT82CxN/openapi.json
