Scraper APISainsbury's
sainsburys.product
One Sainsbury's grocery product: name, brand, price, unit price, offers, rating, barcodes, description, shelf and pictures.
- Id
sainsburys.product- Version
- 1
- Billed per
- request — 1 unit for a charged run
- Runs
- within one request
Start it with POST /v1/scrapers/sainsburys.product/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
productrequired | string | The product's id (357937), or its address on sainsburys.co.uk (https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-semi-skimmed-milk-2-27l-4-pint).Limit: at least 3 characters, at most 2048 characters. |
Record fields
Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.
| Field | Type | Notes |
|---|---|---|
product_id | string | Sainsbury's id of the product (357937). sainsburys.product takes it. |
url | string or null | The product's page on sainsburys.co.uk. |
name | string | The product's name as the shop writes it, with its size. |
price | number or null | The price the shop shows first, in pounds. Where an offer for Nectar members sets the price of one item, this is that price, and price_before_offer is the price without it. Null for an item priced by its band of weight (see weights). |
price_before_offer | number or null | The price without the offer that sets price, in pounds; null when no such offer applies. |
currency | string | The currency of the prices: always GBP.Default: "GBP". |
sold_by | string or null | kg for a product priced by weight (loose fruit and vegetables); null for one sold by the item. |
weights | array of object | For an item whose weight varies (a joint, a pack of chicken fillets), the bands of weight it comes in and the price of each; price is then null. Empty for any other product. |
weight (in weights[]) | string | A band of weights the item can come in, as the shop writes it, e.g. 400g - 600g. |
price (in weights[]) | number or null | What an item in that band costs, in pounds. |
unit_price | number or null | The price per unit_amount unit, in pounds, as the shop compares products. |
unit | string or null | The unit of unit_price as the shop writes it: kg, ltr, ea (each), 100g... |
unit_amount | number or null | How many unit the unit price is for, usually 1. |
available | boolean or null | Whether the shop offers the product for delivery now. |
offers | array of object | The offers on the product now. |
text (in offers[]) | string | The offer as the shop writes it, e.g. Buy 1 for 7.25 or Buy any 2 for £4.00 with Nectar. |
nectar (in offers[]) | boolean or null | True for an offer that needs a Nectar card. |
starts_at (in offers[]) | string (date-time) or null | When the offer began, in UTC. |
ends_at (in offers[]) | string (date-time) or null | When the offer ends, in UTC. |
rating | number or null | The average customer rating, out of 5. |
review_count | integer or null | How many customer reviews the rating is from. |
barcodes | array of string | The product's barcodes (EAN-13), as the shop lists them. |
categories | array of string | The shop's categories the product is placed in. |
labels | array of string | The labels on the product's tile: BRITISH, ALDI PRICE MATCH*... |
image | string or null | The address of the product's main picture. |
fetched_at | string (date-time) | When the shop answered, in UTC. |
brand | string or null | The brand, as the shop names it. |
description | string or null | The product's description from its page. |
department | string or null | The aisle the product is in, e.g. Milk & milk drinks. |
breadcrumbs | array of string | The path of shelves to the product, from the widest. |
images | array of string | Every picture of the product, at the largest size the shop offers. |
Example request
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/sainsburys.product/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"product":"357937"}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("sainsburys.product", {"product": "357937"})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("sainsburys.product", { product: "357937" });
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "sainsburys.product", map[string]any{"product": "357937"})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("sainsburys.product", Map.of("product", "357937"));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run sainsburys.product --input-json '{"product":"357937"}'Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"input": {
"product": "357937"
}
}Example response
The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.
{
"id": "run_841742f37553189ff9c27ba1",
"scraper_id": "sainsburys.product",
"scraper_version": 1,
"status": "ok",
"reason": null,
"input": {
"product": "357937"
},
"record_count": 1,
"units": 1,
"units_per_request": 1,
"units_per_record": null,
"units_per_page": null,
"diagnostics": {
"requests": 1,
"bytes": 259214,
"wall_ms": 885,
"facts": {}
},
"created_at": "2026-11-16T22:37:50.170950Z",
"started_at": "2026-11-16T22:37:50.178331Z",
"finished_at": "2026-11-16T22:37:51.066313Z"
}Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.
{
"records": [
{
"product_id": "357937",
"url": "https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-semi-skimmed-milk-2-27l-4-pint",
"name": "Sainsbury's British Semi Skimmed Milk 2.27L (4 pint)",
"price": 1.75,
"price_before_offer": null,
"currency": "GBP",
"sold_by": null,
"weights": [],
"unit_price": 0.77,
"unit": "ltr",
"unit_amount": 1,
"available": true,
"offers": [],
"rating": 4.607,
"review_count": 2206,
"barcodes": [
"0000000357937",
"0000050181117"
],
"categories": [
"Fresh milk",
"Pancake Day",
"About Nectar"
],
"labels": [
"BRITISH",
"ALDI PRICE MATCH*"
],
"image": "https://assets.sainsburys-groceries.co.uk/gol/357937/image.jpg",
"fetched_at": "2026-11-19T18:23:57.385799Z",
"brand": "Sainsbury's",
"description": "Pasteurised homogenised semi-skimmed milk",
"department": "Milk & milk drinks",
"breadcrumbs": [
"Hot drinks, soft drinks & water",
"Milk & milk drinks",
"Fresh milk"
],
"images": [
"https://assets.sainsburys-groceries.co.uk/gol/357937/1/2365x2365.jpg"
]
}
],
"next_cursor": null
}What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].
- Shortened:
categories: 13 items, the first 3 shown.
A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Sainsbury's scrapers are in their own section there.