Is that Black Friday deal real? Check Coles, Woolworths, Tesco and Sainsbury's specials in 20 lines of JavaScript
Disclosure: I built the APIs in this post. Written with AI assistance. Black Friday is on 27 November. Every supermarket banner will say SPECIAL, and shoppers will ask one question: is this actually cheaper? I checked
Disclosure: I built the APIs in this post. Written with AI assistance.
Black Friday is on 27 November. Every supermarket banner will say SPECIAL, and shoppers will ask one question: is this actually cheaper?
I checked this morning (3 November 2026). Of the 20 chocolate specials Coles had online, 14 were real price drops (most of them half price), 4 only saved money if you bought two, and 2 carried a special label with a saving of $0. Same banner, three very different deals.
You can tell them apart automatically. Every product from the supermarket price APIs below comes back with the price, the was-price and the offer type, and one parameter, onlySpecials=true, returns only the products on offer. That is everything a deal checker needs.
Try the Australian Supermarket Prices API on RapidAPI: Coles, Woolworths, ALDI, IGA and Harris Farm, free plan included.
1. The deal checker (20 lines)
Save as deals.mjs, run with Node 18 or newer:
const APIS = {
au: { host: 'australian-supermarket-prices-api-coles-woolworths-aldi.p.rapidapi.com', path: '/grocery-au/search' },
uk: { host: 'uk-supermarket-prices-tesco-sainsburys-asda-morrisons.p.rapidapi.com', path: '/grocery-uk/search' },
};
const [country = 'au', store = 'coles', query = 'chocolate'] = process.argv.slice(2);
const { host, path } = APIS[country];
const url = `https://${host}${path}?store=${store}&query=${encodeURIComponent(query)}&onlySpecials=true&limit=20`;
const res = await fetch(url, { headers: { 'x-rapidapi-host': host, 'x-rapidapi-key': process.env.RAPIDAPI_KEY } });
const { results = [] } = await res.json();
const rows = results
.filter((p) => p.status === 'OK')
.map((p) => {
const drop = p.wasPrice > p.price ? Math.round((1 - p.price / p.wasPrice) * 100) : 0;
const verdict = drop ? `${drop}% off today` : p.multiBuy ? `saves only if you buy ${p.multiBuy.quantity}` : 'no price drop';
return { name: p.name.slice(0, 44), price: p.price, was: p.wasPrice ?? '', drop, verdict };
})
.sort((a, b) => b.drop - a.drop);
console.table(rows.map(({ drop, ...r }) => r));
RAPIDAPI_KEY=your_key node deals.mjs au coles chocolate
What it printed on 3 November 2026 (shortened):
name price was verdict
KitKat Mini Milk Chocolate Share Pack 11 Pie 3.75 7.5 50% off today
Toblerone Milk Chocolate 10 20 50% off today
Lindt Teddy & Friends Chocolate Advent Calen 20 30 33% off today
Kinder Surprise Chocolate Egg 1.95 2.8 30% off today
Lindt Lindor Assorted Chocolate Cornet 30 30 saves only if you buy 2
Cadbury Favourites Chocolate Gift Box 14 14 saves only if you buy 2
Maltesers Milk Chocolate Party & Share Bucke 15 15 no price drop
M&M's Milk Chocolate Party & Share Bucket 15 15 no price drop
The Lindor cornet is a "Pick any 2 for $30" offer: one costs exactly what it cost before. The Maltesers bucket is flagged as a special ("while stocks last") with a saving of zero. A shopper scrolling past a yellow tag would never know. Your app does.
2. Same code, UK supermarkets
Change two arguments:
RAPIDAPI_KEY=your_key node deals.mjs uk sainsburys christmas
name price was verdict
Galaxy 234g Chocolate Large Christmas Select 2.75 4.5 39% off today
Cadbury 125g Chocolate Christmas Selection B 1.65 2.5 34% off today
Maltesers 108g Reindeer Chocolate Christmas 2.5 3.75 33% off today
Lindt 5 x 50g Santa Christmas Milk Chocolate 3 3.5 14% off today
Sainsbury's also returns the date each offer ends. On 3 November, 7 of the 8 chocolate offers we pulled ended on 24 November, three days before Black Friday. If your users plan their Black Friday shop, that is worth telling them.
Other stores work the same way: store=tesco|sainsburys|asda|morrisons in the UK, store=coles|woolworths|aldi|iga|harris-farm in Australia, and Woolworths New Zealand with /grocery-nz/search?store=woolworths-nz.
3. The real test: your own price history
The was-price is the store's claim. The strongest answer to "is this deal real?" is your own record: if the Black Friday price is not below the lowest price you saw in November, it is not a Black Friday deal.
Add five lines and run the checker once a day (cron, a GitHub Action, a serverless timer):
import fs from 'node:fs';
const file = 'prices.json';
const history = fs.existsSync(file) ? JSON.parse(fs.readFileSync(file, 'utf8')) : {};
const today = new Date().toISOString().slice(0, 10);
for (const p of results) (history[p.url] ??= {})[today] = p.price;
fs.writeFileSync(file, JSON.stringify(history, null, 1));
Start today and you have 24 days of history by Black Friday. Start on the day and you have one. That is the whole difference between a deal checker and a list of yellow tags.
What you can build before 27 November
- A "real deal or not" page for your city: the top specials sorted by real percentage off.
- A Black Friday basket alert: watch 20 products, ping Discord or Slack when one drops below its November low.
- A newsletter or social feed of the week's genuine half-price items at Coles, Woolworths or Tesco.
- An AI shopping assistant tool that answers "is this a good price?" with data instead of a guess.
Plans
The same plans on all three APIs:
- Basic: free, 50 requests a month: one daily check of one search, every day until Black Friday
- Pro: $9.99 a month for 1,000 requests
- Ultra: $29.99 a month for 3,000 requests
- Mega: $99.99 a month for 10,000 requests
Black Friday is in 24 days
The deal checkers that will matter on 27 November are the ones collecting prices now. The free plan is enough to wire this up today and let it run.
Get your free key for the Australian Supermarket Prices API ยท UK Supermarket Prices API (Tesco, Sainsbury's, Asda, Morrisons)
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.