Project Hub

Project · Competitor price tracker

Knowing every competitor price change on 356 products, every week

The problem

Prices are checked by hand on a few competitor sites now and then, so the business finds out it was undercut after the sales are gone.

The solution

A weekly pipeline reads competitor prices, matches each product to the client's own, keeps every price with its date, emails an alert when a key product is undercut, and shows price gaps in Power BI.

How it works

  • Collect: Competitor prices read every week, from product pages and published shelf prices
  • Match: Each competitor product matched to the client's own product, by barcode or by name
  • Store: Every price kept with its date, so changes become history
  • Alert: An email when a competitor undercuts a key product
  • Report: Power BI pages of price gaps and changes by product

A closer look

The alert email for the week of 2 August 2026: Smart & Final extra! cut Medium Roast from 11.99 to 10.99 on 30 July 2026, below our 11.49, a 4% undercut.
The email the run sent when a key product was undercut.
Pipeline diagram: published shelf prices, web shop pages and our catalogue load into warehouse tables; views work out price changes, gaps and undercuts for an alert email and a Power BI report.
The weekly pipeline, from competitor prices to the alert and the report.
The weekly loop: every Sunday the run reads competitor prices, matches them to our products, stores every price with its date and sends an alert on an undercut; one product's history shows a cut that stays above our price, then a cut below it that raises the alert.
Read, match, store, alert, every week.
Data flow: one box per step, in run order, from the input files to the report.
The steps, in run order.
Star schema of the Power BI model: three fact tables of 1,018 daily prices, 824 price gaps and 127 price changes share 360 products, 11 stores and 808 dates.
Three facts, three shared dimensions.
Chart: price changes caught by each weekly run from September 2025 to October 2026, 127 in all, 52 cuts and 75 rises, with the biggest runs at 20, 21 and 27 changes.
Cuts and rises caught by each run.

The code

for attempt in range(8):
    response = http.get(url, params=params or None, timeout=60)
    if response.status_code not in (429, 503):
        break
    wait = response.headers.get("Retry-After", "")
    time.sleep(int(wait) if wait.isdigit() else 2 ** attempt)
response.raise_for_status()
return response
tracker.py

The impact

  • Competitor prices checked automatically, with no one browsing.
  • An alert the week a key product is undercut.
  • Price history, so promotions and patterns show up.

The result

356 products across 10 stores: 127 price changes caught, each within one run.

Built with

  • Python
  • BeautifulSoup
  • Airflow
  • PostgreSQL
  • Power BI