# Morrisons Grocery Price Scraper (`madjad33/morrisons-grocery-price-scraper`) Actor

Extract Morrisons product prices, availability and ratings as structured JSON. No personal data, ever.

- **URL**: https://apify.com/madjad33/morrisons-grocery-price-scraper.md
- **Developed by:** [Jad D.](https://apify.com/madjad33) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Morrisons Grocery Price Scraper

Extract **Morrisons** product prices, availability, brands and ratings as clean structured JSON. Point it at a category, a list of products, or the whole catalogue. No account, no browser, no personal data.

Press **Start** and it returns 100 real products immediately — every input field has a working default.

### What you get

One flat row per product. No nested objects, no arrays to unpick.

```json
{
  "sku": "108413093",
  "name": "Morrisons Whole Cucumber",
  "brand": "Morrisons",
  "description": "Morrisons Whole Cucumber",
  "price": 0.99,
  "currency": "GBP",
  "pricePerUnit": null,
  "availability": "InStock",
  "itemCondition": "NewCondition",
  "ratingValue": 3.6,
  "ratingCount": 28,
  "imageUrl": "https://groceries.morrisons.com/images-v3/4b85987b-.../500x500.jpg",
  "productUrl": "https://groceries.morrisons.com/products/morrisons-whole-cucumber/108413093",
  "categoryPath": "Groceries > Fruit & Veg",
  "scrapedAt": "2026-08-11T09:14:22.187Z"
}
```

| Field | Type | Notes |
|---|---|---|
| `sku` | string | Morrisons product id, stable across runs — use it as your join key |
| `name` | string | Product title |
| `brand` | string | Brand name |
| `description` | string | Short description |
| `price` | number | Current price as a number, not a string |
| `currency` | string | ISO code, `GBP` |
| `pricePerUnit` | number | null | Unit price where published |
| `availability` | string | `InStock`, `OutOfStock`, … |
| `itemCondition` | string | `NewCondition` |
| `ratingValue` | number | null | Mean customer rating |
| `ratingCount` | number | null | Number of ratings |
| `imageUrl` | string | 500×500 product image |
| `productUrl` | string | Canonical product page |
| `categoryPath` | string | null | Breadcrumb trail, when crawled from a category |
| `scrapedAt` | string | ISO 8601 timestamp of extraction |

### Three ways to run it

| Mode | Use it for | Cost profile |
|---|---|---|
| **Category pages** *(default)* | Assortment and pricing for a section | 50 products per category page |
| **Whole catalogue via sitemap** | A full price file. Walks Morrisons' own published sitemap — 30,000+ products | One row per product, capped by `maxItems` |
| **Specific product URLs** | Daily price tracking on a fixed basket | Cheapest per run |

`maxItems` is a hard cap on billable results, so it is also your spend cap.

### Why not just build this yourself

You can. Here is the honest arithmetic before you do.

A scraper against a live retail site is 20–40 hours to build and a few hours a month to keep alive, because the source changes and yours breaks quietly. At a £60–100/hour loaded rate that is **£1,200–4,000 to build**, plus maintenance, plus your own error monitoring so you find out before your data does.

This actor costs **$0.003 per product**. A full 30,000-product catalogue sweep is about **$90**. A daily 500-product basket check is about **$1.50 a day**.

Below roughly 100,000 rows a month, the buy decision is not close. Above it, build — and I would tell you the same thing.

### Compliance, stated plainly

**This actor never returns personal data.** Not "strips it" — never collects it. The output schema is a fixed allowlist of 15 fields, and rows are constructed from that list rather than filtered against a blocklist. If Morrisons begins publishing review authors tomorrow, those fields cannot appear in your dataset without a deliberate code change here. There is a test that proves it, and a runtime guard that refuses to push a row carrying a forbidden field.

Aggregate ratings *are* included, because a mean and a count are aggregates over people, not data about an identifiable person.

**robots.txt is respected in code, not just in spirit.** `groceries.morrisons.com` disallows `/sso-login`, `/previewer/*`, `/api/` and `/events/` for all user agents. This actor refuses those paths even if you pass them in as input. Everything it does crawl — category pages, product pages, and the sitemap — is explicitly permitted, and the sitemap is published by Morrisons themselves.

**No login, ever.** All data is read from pages served to an anonymous visitor.

### Publishing notes (for the actor owner, not the buyer)

Pay-per-event pricing is configured in the Apify console, not in this repo. Create **one** charge event named exactly `product` — that is the event name `src/main.js` charges, and a mismatch means you ship for free.

Suggested price **$0.003 per result**. Do not undercut to $0.001: raising a price later requires 14 days' notice to existing users, so the floor you set is the floor you live with for a fortnight.

Running locally you will see `Ignored attempt to charge for an event — the Actor does not use the pay-per-event pricing`. That is expected and harmless; charging only exists on the platform.

### Notes

Prices are read from the schema.org `Product` JSON-LD that Morrisons publishes for search engines, not from CSS selectors. That makes this actor unusually stable: structured data is a contract the site maintains deliberately, so it changes far less often than markup does. It is also why no browser is needed, which is why it is cheap.

Grocery prices are store- and time-sensitive. Treat every row as a reading at `scrapedAt`, not a permanent fact.

Pages that do not yield a usable product are **skipped without charge**. You pay for results, not attempts.

# Actor input Schema

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

categories — crawl category pages and take the 50 products each one lists. sitemap — walk the publisher's own sitemap for full catalogue coverage (30,000+ products). productUrls — refresh a specific list of products, the cheapest mode for daily price monitoring.

## `startUrls` (type: `array`):

Category or product URLs from groceries.morrisons.com. Ignored in sitemap mode. Paths under /api/, /events/, /sso-login and /previewer/ are refused because the site's robots.txt disallows them.

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

Hard cap on billable results. You are charged per product returned, so this is also your spend cap.

## `maxConcurrency` (type: `integer`):

Parallel requests. The default is deliberately moderate — this actor needs no browser, so it is already fast, and being polite keeps it working.

## `proxyConfiguration` (type: `object`):

Optional. Morrisons serves this data to plain HTTP clients, so no proxy is needed in normal use and leaving this off is cheaper.

## Actor input object example

```json
{
  "mode": "categories",
  "startUrls": [
    {
      "url": "https://groceries.morrisons.com/categories/fruit-veg/176738"
    }
  ],
  "maxItems": 100,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of products with name, brand, price, availability and SKU.

## `allFields` (type: `string`):

Every field, including price per unit, item condition, rating count, image and category path.

## `csv` (type: `string`):

The same results as a spreadsheet.

# 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 = {
    "startUrls": [
        {
            "url": "https://groceries.morrisons.com/categories/fruit-veg/176738"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("madjad33/morrisons-grocery-price-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 = { "startUrls": [{ "url": "https://groceries.morrisons.com/categories/fruit-veg/176738" }] }

# Run the Actor and wait for it to finish
run = client.actor("madjad33/morrisons-grocery-price-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 '{
  "startUrls": [
    {
      "url": "https://groceries.morrisons.com/categories/fruit-veg/176738"
    }
  ]
}' |
apify call madjad33/morrisons-grocery-price-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,madjad33/morrisons-grocery-price-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/GCtmLAWoeSkvI50U3/builds/JcVl6gOCicPB6e57m/openapi.json
