# Sainsbury's API — UK groceries, shelf and Nectar prices

> Search the public UK online grocery assortment by keyword and page. Page size varies; pages above the live ceiling are explicitly clamped to the final page. No unverified source filters.
> ReefAPI engine `sainsburys` · 2 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/sainsburys/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Send the key as `Authorization: Bearer <key>`, or put it in the URL (`?key=<key>`) when the client has no header field, as ChatGPT does.

## Endpoints

### POST https://api.reefapi.com/sainsburys/v1/search — 3 credits
Search the public UK online grocery assortment by keyword and page. Page size varies; pages above the live ceiling are explicitly clamped to the final page. No unverified source filters.

**Parameters:**
- `query` (string, required) — Grocery search term, for example milk, cheese or apples.
- `country` (enum, optional, default "uk") — Public storefront market; UK only. [one of: uk]
- `page` (integer, optional, default 1) — Positive page number. Values above last_page return the final page with page_clamped=true; stop when has_more=false.

**Returns:** products[], total, returned, requested_page, page, last_page, page_clamped, has_more and next_page. Products carry product_uid, URL, EANs, GBP shelf and separate Nectar prices, unit prices, promotions and source availability.

**Example request body:**
```json
{
  "query": "milk"
}
```

### POST https://api.reefapi.com/sainsburys/v1/product/detail — 3 credits
Read the public product page by the source slug id or URL returned by search. Numeric product_uid is a separate legacy identifier and not a resolver.

**Parameters:**
- `id` (string, optional) — Source URL slug id returned by search; required unless url is supplied.
- `url` (string, optional) — Sainsbury's gol-ui/product URL returned by search; required unless id is supplied.
- `country` (enum, optional, default "uk") — Public storefront market; UK only. [one of: uk]

**Returns:** product with search fields plus complete cleaned product_details, nutrition_tables, descriptions, label notices, full-size images, brand, breadcrumbs and product classifications.

**Example request body:**
```json
{
  "url": "https://www.sainsburys.co.uk/gol-ui/product/oatly-oat-drink-barista-edition-long-life-1l"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=sainsburys
- Human docs page: https://reefapi.com/docs/sainsburys
- Overview page: https://reefapi.com/sainsburys-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
