DEV Community

Max Prozapas
Max Prozapas

Posted on

Track competitor prices on any Shopify store with products.json (and catch restocks)

If a competitor runs on Shopify, their whole catalog — prices, compare-at prices, SKUs, stock flags — is one public
URL away:

curl "https://www.allbirds.com/products.json?limit=250&page=1"
Enter fullscreen mode Exit fullscreen mode

Paging and collections

  • limit max is 250; increment page until {"products": []}.
  • One collection only: /collections/{handle}/products.json.
  • Around 25,000 products the deep pages stop — slice big catalogs by collection.

The 403 trap

Some big stores block products.json on their main domain. Their homepage HTML still contains the internal
something.myshopify.com host — query that one instead and build product URLs on the public domain.

What you get per variant

id, sku, price, compare_at_price, available, option1..3, plus product-level title, handle, vendor, product_type,
tags, images, created_at, updated_at
. Discount % = (compare_at − price) / compare_at.

One caveat: prices are in the store's default market currency and the JSON doesn't say which — don't guess.

Turning snapshots into alerts

Store {price, available} per store:variantId, then on each run:

Change Rule
new not in snapshot
priceDrop / priceIncrease price changed
backInStock available false → true
outOfStock available true → false
removed missing now — only if the store fetch succeeded

A 7,000-variant snapshot is ~160 KB gzipped, so you can keep months of history cheaply.

Reference & ready-made tool

Top comments (0)