# Sainsbury's Groceries Scraper (`crawloop/sainsbury-scraper`) Actor

Scrape Sainsbury's UK grocery search. Export shelf price, unit price, Nectar offers, EAN, rating, and stock. HTTP, no browser.

- **URL**: https://apify.com/crawloop/sainsbury-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce, Automation
- **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.
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

## Sainsbury's Groceries Scraper

> **Disclaimer:** Unofficial tool — not affiliated with, sponsored by, or endorsed by Sainsbury's Supermarkets Ltd or its affiliates. Data is read from publicly accessible grocery search results only. No login. You are responsible for complying with applicable law (including GDPR where personal data appears) and the site’s terms. No warranty on accuracy or availability. Provided for informational and research use.

Sainsbury's UK grocery prices, unit prices, Nectar offers, and EAN from search. This Sainsbury's scraper is an API alternative for price monitoring. Paste keywords. Each dataset row is one product. Run it from Python, Node.js, or MCP and export JSON.

| UK grocery search | US weekly ad | EU leaflets | US grocery |
| :--- | :--- | :--- | :--- |
| Sainsbury's Groceries Scraper ◄── you are here | [Aldi Weekly Ad Scraper](https://apify.com/crawloop/aldi-weekly-ad-scraper) | [Lidl Weekly Offers Scraper](https://apify.com/crawloop/lidl-weekly-offers-scraper) | [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) |

### When to use

- Snapshot Sainsbury's UK shelf prices for a keyword
- Flag Nectar promotions next to the current shelf price and the regular price
- Match products by EAN, unit price, and category

Use a grocery circular Actor when you need a weekly ad rather than the live online shelf.

### Key features

- Search keywords, paginated until `maxItems` or `maxPages`
- Price, regular price, unit price, previous unit price, currency, stock flag
- Nectar promotion text and a Nectar boolean
- EAN, rating, review count, category
- HTTP fetch, 256 MB, no browser

### Input

| Field | Required | Description |
| :--- | :--- | :--- |
| `queries` | Yes | Search terms such as `milk` |
| `maxItems` | No | Stop after this many products. Default 24, maximum 1000 |
| `maxPages` | No | Pages per keyword. Default 1. Up to 60 products per page |
| `nectarOnly` | No | Keep only rows with a Nectar promotion |

#### Input example

```json
{
  "queries": ["baked beans"],
  "maxItems": 24,
  "maxPages": 1
}
```

### Output

| Field | Description |
| :--- | :--- |
| `title` | Product name |
| `price` | Current shelf price |
| `regularPrice` | Price before the current promotion |
| `unitPrice` | Price per unit |
| `unitOfMeasure` | Unit, such as ltr or kg |
| `wasUnitPrice` | Previous unit price |
| `currency` | GBP |
| `nectarOffer` | True when a Nectar promotion is present |
| `promotionText` | Promotion strap line |
| `ean` | Barcode when the listing includes one |
| `inStock` | Listing availability |
| `rating` | Average rating when reviews exist |
| `reviewCount` | Number of reviews |
| `category` | First category name |
| `productUrl` | Product page URL |

#### Output example

```json
{
  "source": "sainsburys.co.uk",
  "productId": "123",
  "title": "Branston Baked Beans 4x410g",
  "ean": "5000354900012",
  "price": 2.5,
  "regularPrice": 3,
  "unitPrice": 1.52,
  "unitOfMeasure": "kg",
  "wasUnitPrice": 1.83,
  "currency": "GBP",
  "inStock": true,
  "nectarOffer": true,
  "promotionText": "Buy 1 for 2.5",
  "promotionEndsAt": "2026-10-12T23:00:00Z",
  "rating": null,
  "reviewCount": 0,
  "category": "Baked beans",
  "productUrl": "https://www.sainsburys.co.uk/gol-ui/product/branston-baked-beans",
  "query": "baked beans"
}
```

### Use cases

- **Price check** — export shelf and unit price for one keyword
- **Nectar watch** — turn on `nectarOnly` and keep the strap line and regular price
- **Catalog match** — join EAN to another grocery file

### Integration examples

Replace `APIFY_TOKEN` with your Apify token. The Actor name is `crawloop/sainsbury-scraper`.

#### Node.js

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("crawloop/sainsbury-scraper").call({
  queries: ["baked beans"],
  maxItems: 24,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("crawloop/sainsbury-scraper").call(run_input={
    "queries": ["baked beans"],
    "maxItems": 24,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/crawloop~sainsbury-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"queries\":[\"baked beans\"],\"maxItems\":24}"
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp). Connect your Apify account, then call this Actor by its Store name.

Example prompts:

- "Run Sainsbury's Groceries Scraper for baked beans and return title, price, unit price, Nectar, and EAN as JSON"
- "Scrape Sainsbury's search for milk with nectarOnly and list the promotion text"
- "Pull 24 Sainsbury's milk rows, then run Aldi Weekly Ad Scraper for ZIP 60174 and compare milk prices"

### Suite next step

After Sainsbury's UK shelf prices, run [Aldi Weekly Ad Scraper](https://apify.com/crawloop/aldi-weekly-ad-scraper) for a US weekly circular, or [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) for ZIP-local US grocery prices.

### Related Actors

- Sainsbury's Groceries Scraper ◄── you are here
- [Aldi Weekly Ad Scraper](https://apify.com/crawloop/aldi-weekly-ad-scraper) — ALDI US weekly ad and ALDI Finds
- [Lidl Weekly Offers Scraper](https://apify.com/crawloop/lidl-weekly-offers-scraper) — Lidl weekly leaflets
- [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) — ZIP-local Walmart prices
- [DoorDash Menu Scraper](https://apify.com/crawloop/doordash-menu-scraper) — chain menu items

### FAQ

**Does this open a product page for nutrition and ingredients?**
No. It reads the search listing: price, unit price, Nectar text, EAN, rating, and category.

**Are these prices for a chosen store?**
No. Rows are the online search listing. `inStock` is the listing flag, not stock at a postcode.

**What if the keyword matches nothing?**
The run finishes with an empty dataset. Other keywords in the same input still run.

**How many products are on a page?**
Up to 60. Raise `maxPages` when you need more than one page. `maxItems` caps the combined rows.

# Actor input Schema

## `queries` (type: `array`):

Shopper search terms, for example milk or baked beans. Each keyword is paginated until maxItems or maxPages.

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

Stop after this many products across all keywords.

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

Search pages to open for each keyword. A page holds up to 60 products.

## `nectarOnly` (type: `boolean`):

Keep products whose listing includes a Nectar promotion.

## Actor input object example

```json
{
  "queries": [
    "milk"
  ],
  "maxItems": 24,
  "maxPages": 1,
  "nectarOnly": false
}
```

# Actor output Schema

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

Default dataset items.

# 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 = {
    "queries": [
        "milk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/sainsbury-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 = { "queries": ["milk"] }

# Run the Actor and wait for it to finish
run = client.actor("crawloop/sainsbury-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 '{
  "queries": [
    "milk"
  ]
}' |
apify call crawloop/sainsbury-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/sainsbury-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/wwb2RMiudqYEIalYO/builds/DeGXbDNaf3TAOi8j4/openapi.json
