APIs / Marketplaces / Sainsbury's

1 credit per call5 endpoints2 datapointsChecked working 6 Dec 2026

Sainsbury's API

Sainsbury's API for UK grocery search, product details with prices, unit prices, EANs and ratings, and categories as JSON. 1 credit per successful call.

Sainsbury's
GET/v1/sainsburys/search?query=milk
{
  "success": true,
  "data": {
    "query": "milk",
    "page": 1,
    "sort": "-relevance",
    "count": 60,
    "total": 954,
    "has_next_page": true,
    "filters": [
      {
        "key": "nav_Filter-Your-Results",
        "name": "Most Popular"
      },
      {
        "key": "nav_Brand",
        "name": "Brand"
      },
      {
        "key": "allergyandintolerance",
        "name": "Allergy & Intolerance"
      }
    ],
    "items": [
      {
        "id": "357937",
        "product_uid": "357937",
        "sain_id": "yp025e2m",
        "name": "Sainsbury's British Semi Skimmed Milk 2.27L (4 pint)",
        "url": "https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-semi-skimmed-milk-2-27l-4-pint",
        "image": "https://assets.sainsburys-groceries.co.uk/gol/357937/image.jpg",
        "currency": "GBP",
        "price": 1.75,
        "regular_price": 1.75,
        "unit_price": 0.77,
        "unit": "ltr",
        "availability": true,
        "rating": 4.6108,
        "review_count": 2243,
        "sponsored": false,
        "categories": [
          {
            "id": "12431",
            "name": "Fresh milk"
          },
          {
            "id": "474592",
            "name": "Dairy & chilled essentials"
          }
        ],
        "eans": [
          "0000000357937",
          "0000050181117"
        ],
        "labels": [
          {
            "label_uid": "BRITISH",
            "text": "BRITISH",
            "alt_text": "BRITISH",
            "color": "#4c4c4c",
            "link": "https://www.sainsburys.co.uk/gol-ui/features/best-of-british",
            "link_opens_in_new_window": false
          },
          {
            "label_uid": "ALDI PRICE MATCH*",
            "text": "ALDI PRICE MATCH*",
            "alt_text": "ALDI PRICE MATCH*",
            "color": "#D70000",
            "link": "https://www.sainsburys.co.uk/gol-ui/events/aldi-price-match",
            "link_opens_in_new_window": false
          }
        ]
      },
      {
        "id": "1137637",
        "product_uid": "1137637",
        "sain_id": "1hdmbscw",
        "name": "Sainsbury's British Semi Skimmed Milk 1.13L (2 pint)",
        "url": "https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-semi-skimmed-milk-1-13l-2-pint",
        "image": "https://assets.sainsburys-groceries.co.uk/gol/1137637/image.jpg",
        "currency": "GBP",
        "price": 1.3,
        "regular_price": 1.3,
        "unit_price": 1.14,
        "unit": "ltr",
        "availability": true,
        "rating": 4.6108,
        "review_count": 2243,
        "sponsored": false,
        "categories": [
          {
            "id": "12431",
            "name": "Fresh milk"
          },
          {
            "id": "474592",
            "name": "Dairy & chilled essentials"
          }
        ],
        "eans": [
          "5000181013566",
          "0000001137637"
        ],
        "labels": [
          {
            "label_uid": "BRITISH",
            "text": "BRITISH",
            "alt_text": "BRITISH",
            "color": "#4c4c4c",
            "link": "https://www.sainsburys.co.uk/gol-ui/features/best-of-british",
            "link_opens_in_new_window": false
          },
          {
            "label_uid": "ALDI PRICE MATCH*",
            "text": "ALDI PRICE MATCH*",
            "alt_text": "ALDI PRICE MATCH*",
            "color": "#D70000",
            "link": "https://www.sainsburys.co.uk/gol-ui/events/aldi-price-match",
            "link_opens_in_new_window": false
          }
        ]
      },
      {
        "id": "181402",
        "product_uid": "181402",
        "sain_id": "pk8d2gsp",
        "name": "Sainsbury's British Whole Milk 2.27L (4 pint)",
        "url": "https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-whole-milk-2-27l-4-pint",
        "image": "https://assets.sainsburys-groceries.co.uk/gol/181402/image.jpg",
        "currency": "GBP",
        "price": 1.75,
        "regular_price": 1.75,
        "unit_price": 0.77,
        "unit": "ltr",
        "availability": true,
        "rating": 4.7308,
        "review_count": 1029,
        "sponsored": false,
        "categories": [
          {
            "id": "12431",
            "name": "Fresh milk"
          },
          {
            "id": "474592",
            "name": "Dairy & chilled essentials"
          }
        ],
        "eans": [
          "0000000487429",
          "0000050181100",
          "0000000181402"
        ],
        "labels": [
          {
            "label_uid": "BRITISH",
            "text": "BRITISH",
            "alt_text": "BRITISH",
            "color": "#4c4c4c",
            "link": "https://www.sainsburys.co.uk/gol-ui/features/best-of-british",
            "link_opens_in_new_window": false
          },
          {
            "label_uid": "ALDI PRICE MATCH*",
            "text": "ALDI PRICE MATCH*",
            "alt_text": "ALDI PRICE MATCH*",
            "color": "#D70000",
            "link": "https://www.sainsburys.co.uk/gol-ui/events/aldi-price-match",
            "link_opens_in_new_window": false
          }
        ]
      }
    ]
  },
  "meta": {
    "endpoint_family": "search",
    "request_id": "req_787041a4c7774b7587048b0375c4878b",
    "credits_charged": 1,
    "credits_remaining": 4815
  }
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Sample data

What one call returns

A recorded run of search: the fields and shapes you will get, shortened to 3 items.

#keystringnamestring
1nav_Filter-Your-ResultsMost Popular
2nav_BrandBrand
3allergyandintoleranceAllergy & Intolerance

Recorded from our API · 3 items shown · 2 datapoints per itemGET /v1/sainsburys/search?query=milk

2 datapoints

Identity

  • namestring

Other

  • keystring

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/sainsburys/search?query=milk" \
  -H "X-API-Key: $API_KEY"

Sainsbury's · 5 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/sainsburys/pdp
url
product
1 credit
GET/v1/sainsburys/product
uid
product
1 credit
GET/v1/sainsburys/search
query+3 optional
idproduct_uidsain_idnameurlimage+12 more
1 credit
GET/v1/sainsburys/sitemap
none
urls
1 credit
GET/v1/sainsburys/taxonomy
none
categories
1 credit

Overview

About the Sainsbury's API

What you can get

The Sainsbury's API returns Sainsbury's UK grocery data, with prices in GBP, as JSON through 5 endpoints.

  • Search: search takes a query, with page, sort (-relevance, price, -price or -customer rating) and category.
  • Products: product takes a product uid. pdp takes a product page url and returns a shorter record.
  • Categories: taxonomy needs no parameters and returns the grocery category tree.
  • Sitemap: sitemap returns the site's sitemap URLs (7 in the recording).

The recorded search for "milk" returns total (954 in that recording), count (60 per page), page, has_next_page, filters and items. Each item has id, product_uid, name, url, image, currency, price, regular_price, unit_price, unit, availability, rating, review_count, sponsored, categories, eans and labels. The first result was Sainsbury's British Semi Skimmed Milk 2.27L at 1.75 GBP (0.77 per litre), rated 4.61 from 2,243 reviews.

How a call works

Search, then look up: GET /v1/sainsburys/search?query=milk with your key in the X-API-Key header returns each product's product_uid. Pass it to product as uid: GET /v1/sainsburys/product?uid=357937. If you only have a product page URL, pdp takes it and returns id, name, brand, description, image, price, rating and review_count; use that id with product for unit price, EANs and labels. Page with page while has_next_page is true. Every successful call costs 1 credit; failed calls cost nothing.

MarketplacesJSONRESTMCP

More marketplaces APIs

Use cases

Track UK grocery prices and promotions for a basket of products

Use the Sainsbury's API to track UK grocery prices and promotions for a basket of products

Compare unit prices across brands for one product type

Use the Sainsbury's API to compare unit prices across brands for one product type

Match Sainsbury's products to other retailers by EAN

Use the Sainsbury's API to match Sainsbury's products to other retailers by EAN

Watch availability for a product list

Use the Sainsbury's API to watch availability for a product list

FAQ

Questions

How much does the Sainsbury's API cost?

Each successful call costs one credit, whichever endpoint you call, and each search page is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.

Does it show promotional prices?

Each product has `price` and `regular_price`; when they differ, the product is on offer. `labels` carries badges such as BRITISH.

Are sponsored results marked?

Yes. Each search item has `sponsored`, so you can drop paid placements.

Do I need a Sainsbury's account?

No. You call this Sainsbury's API with your Perceptlayer key in the `X-API-Key` header, with no Sainsbury's login.

Is this the official Sainsbury's API?

No. Perceptlayer is an independent service and is not affiliated with Sainsbury's. It returns Sainsbury's data as JSON with a Perceptlayer key, so there is no Sainsbury's developer account, app review or partner approval to get first. It only reads data: if Sainsbury's has an official API and you need to act on your own Sainsbury's account, such as posting, managing orders or reading private data, use that one.

Should I build a Sainsbury's scraper instead?

You can, but a Sainsbury's scraper is code you maintain: page changes break it, requests get blocked, and Sainsbury's's terms govern how you collect data. The Sainsbury's API gives you 5 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the Sainsbury's API with 100 free credits

No credit card. Failed calls are never billed.