If you pull prices from supermarket websites, one column looks easy: is the product in stock? Look at a few thousand rows and you will see a small share marked as not available. It is tempting to call that "out of stock" and rank the shops by it. Don't. Here is what the flag actually is, with one week of our own counts.

What the flag is

Each shop's website shows, per product, whether you can order it right now. In the UK Supermarket Price Scraper that arrives as inStock: true, false or null. The Actor's field notes say null means the retailer does not report stock online, and it is always null for Aldi.

So the flag is the website's own "available to order" signal at the moment of the snapshot. It says nothing about the shelf in a store, a warehouse or tomorrow's delivery.

One week of counts: 2026-W48

We publish a free weekly count of products shown as not available, from the online catalogue we collect from each retailer's product pages. Week 2026-W48:

Shop Products listed Flagged not available Share
Tesco 24,872 463 1.9%
Asda 21,019 1,035 4.9%
Sainsbury's 27,093 0 0.0%
Aldi 4,043 no flag published n/a

Do not read that as "Asda runs out of stock more than Tesco". The three flags are not the same measurement:

  • Tesco: one national online flag.
  • Asda: the flag is read at one store, so it describes that store's range.
  • Sainsbury's: its listing mostly drops products that are not available, so the flagged count is near zero. The signal there is a product disappearing, not being flagged.
  • Aldi: the website shows no flag at all, so only listing counts are possible.

Absence is a different signal

Because some shops hide an unavailable product instead of marking it, the index also counts products that entered the listing, left it, came back, or were listed two weeks ago and absent in both weeks since. We call that last group "delisted", and it means only that absence. It is not a statement that a shop has stopped selling the product; a product can be missing from a listing for many reasons, including one category going missing from a snapshot.

The W48 counts for the four shops:

Shop Entered Left Delisted (2 weeks) Relisted
Tesco 483 333 339 255
Sainsbury's 261 246 176 205
Asda 110 62 116 21
Aldi 159 78 60 7

For Sainsbury's, "left" is the useful column. For Aldi it is the only one.

Reading it in pandas

If you collect rows yourself, count the three states separately and keep "not reported" apart from "not available". Save a run's dataset as week-a.json, then:

import pandas as pd rows = pd.read_json("week-a.json", dtype={"retailerProductId": str}) state = rows["inStock"].map({True: "available", False: "not available"}).fillna("not reported") print(pd.crosstab(rows["retailer"], state)) 

To see absence between two runs of the same input, join on the retailer and product id:

a = pd.read_json("week-a.json", dtype={"retailerProductId": str}) b = pd.read_json("week-b.json", dtype={"retailerProductId": str}) key = ["retailer", "retailerProductId"] m = a[key].merge(b[key], on=key, how="left", indicator=True) gone = m[m["_merge"] == "left_only"] print(gone.groupby("retailer").size()) 

That only means something if both runs ask for the same thing and neither was cut short by maxItems. A search or category run is not a full catalogue, so a product missing from week B may simply have fallen outside the cap.

Limits worth stating

  • A shop-week whose snapshot is much smaller or larger than that shop's median is marked and not compared. A smaller shortfall, or one lost category, is not detected and can show as products leaving. No week in our data has been marked so far, so that check has been tested only on synthetic data.
  • Class-level entered and left counts also include products that only moved class between weeks.
  • Morrisons is not in this dataset.
  • These are posted online prices and flags, not CPI and not a measure of what is on any shelf.

The method, the column list and every status value are on https://data.yappman.com/availability-index/ (free, CC BY 4.0, counts only, no product names).

Where the row-level flag comes from

The product-level inStock field is returned by the UK Supermarket Price Scraper on the Apify Store, pay per use and charged to the account that runs it: https://apify.com/yappman/uk-supermarket-price-scraper?fpr=wy5pu7 (affiliate link: we may earn a commission if you sign up through it).

We hold no permission from any retailer and are not affiliated with Tesco, Sainsbury's, Asda or Aldi. Prices are facts; the retailers' own content is not ours.