A price monitor works when each observation answers the same question. If your own feed lists the standard price and the website shows a coupon price for logged-in buyers, store those as different price types. Ask the owner which value the business actually needs, when it needs it, and how an analyst should confirm a change.
| Input | Good fit | What to verify |
|---|---|---|
| Authorized catalog feed or API | Stable IDs, regular batches, and explicit prices across your own or a partner's catalog | Feed freshness, country, scheduled price changes, tax treatment, and variant identity |
| Product page HTML with structured data | An approved public page that publishes variant and offer data in its response | The page markup contains the selected SKU, and its offer matches the current buyer-facing price |
| Rendered product page | A store that sets price when a buyer chooses a variant or loads the page dynamically | The correct variant and stock state have loaded, and the captured price belongs to that variant |
Start with a small set of known product URLs and record each site's approved access method and rate limits. For a hard access refusal, pause the source and ask the owner about an authorized feed or access path. If you see a rate-limit response, reduce request volume and respect any supplied Retry-After value. HTTP 429 and Retry-After
Give the watchlist a durable key such as store_id + variant_id + offer_id + market + price_kind. Your catalog SKU may identify the same product across stores, but a seller can change, a bundle can differ, and a store may publish its own IDs. Keep the original product URL and chosen variant URL where available. If a variant is selected only after loading the page, save that selection as part of the test evidence.
For each observation, capture the following fields:
| Field | Why it belongs in the record |
|---|---|
| Variant ID, merchant, and market | Prevents a size, seller, or regional offer from replacing the comparison baseline |
| Price, ISO currency, and price type | Separates list price, buyer-visible promotional price, and membership or coupon price |
| Availability and observation timestamp | Shows whether the offer could be purchased when checked |
| Source URL, capture method, and status | Lets an analyst verify the result and distinguish a price update from a parser or access failure |
Decide separately whether shipping, sales tax, or discounts at checkout count toward the comparison. Price, shipping, and tax make different records useful. Google's merchant listing guidance describes Offer price, currency, and availability fields, and its variant guidance explains how ProductGroup represents related Product variants. Google merchant listing structured data Β· Google product variant structured data
Check one SKU by hand while developing the parser. Record the selected variant, relevant market, exact displayed price, stock status, and whether the offer requires a member account. Inspect the corresponding Product and Offer markup. A store may publish an AggregateOffer containing a range or include more than one seller. Choose the concrete offer matching your monitoring rule. Schema.org Offer properties
Use a browser check if the HTML response lacks the selected offer. Wait for an explicit page state, such as the selected variant label and purchase availability, before reading the price. If the page and markup disagree after a fresh capture, label the observation for review and investigate how the site publishes prices. Suppress alerts sourced from that conflicting observation.
The following Python example reads saved HTML files only. Save it as compare_price.py. Each file should contain an application/ld+json script with a Product whose sku is GRINDER-01, and one nested Offer with price, priceCurrency, and availability. For a quick fixture, use 59.00 and 54.00 as the two USD prices, with https://schema.org/InStock as the availability value. Run python3 compare_price.py yesterday.html today.html --sku GRINDER-01 --currency USD.
import argparse
import json
from decimal import Decimal, InvalidOperation
from html.parser import HTMLParser
from pathlib import Path
class ProductMarkup(HTMLParser):
def __init__(self):
super().__init__()
self.blocks = []
self.parts = None
def handle_starttag(self, tag, attrs):
if tag == "script" and dict(attrs).get("type") == "application/ld+json":
self.parts = []
def handle_endtag(self, tag):
if tag == "script" and self.parts is not None:
self.blocks.append("".join(self.parts))
self.parts = None
def handle_data(self, data):
if self.parts is not None:
self.parts.append(data)
def nodes(value):
if isinstance(value, list):
for item in value:
yield from nodes(item)
elif isinstance(value, dict):
yield value
yield from nodes(value.get("@graph"))
yield from nodes(value.get("hasVariant"))
def has_type(item, expected):
actual = item.get("@type")
return actual == expected or isinstance(actual, list) and expected in actual
def observation(file, sku, currency):
parser = ProductMarkup()
parser.feed(Path(file).read_text(encoding="utf-8"))
matches = []
for block in parser.blocks:
for item in nodes(json.loads(block, parse_float=Decimal)):
if not has_type(item, "Product") or item.get("sku") != sku:
continue
offers = item.get("offers")
offers = offers if isinstance(offers, list) else [offers]
for offer in offers:
if not isinstance(offer, dict) or not has_type(offer, "Offer"):
continue
if offer.get("priceCurrency") != currency:
continue
amount = Decimal(str(offer["price"]))
if not amount.is_finite() or amount < 0:
raise ValueError("Offer price must be finite and nonnegative")
availability = offer["availability"]
if not isinstance(availability, str) or not availability:
raise ValueError("Offer availability must be a nonempty string")
matches.append((amount, availability))
if len(matches) != 1:
raise ValueError(f"Expected one {currency} offer for {sku}, got {len(matches)}")
return matches[0]
def main():
cli = argparse.ArgumentParser()
cli.add_argument("previous")
cli.add_argument("current")
cli.add_argument("--sku", required=True)
cli.add_argument("--currency", required=True)
args = cli.parse_args()
try:
before, _ = observation(args.previous, args.sku, args.currency)
after, availability = observation(args.current, args.sku, args.currency)
except (ValueError, OSError, KeyError, InvalidOperation) as error:
cli.error(str(error))
print(json.dumps({
"sku": args.sku,
"currency": args.currency,
"previous": str(before),
"current": str(after),
"delta": str(after - before),
"availability": availability,
}))
if __name__ == "__main__":
main()
For those inputs, the difference is -5.00 USD. The script rejects missing or ambiguous matching offers. It supports simple nested variants and graph nodes, and an adapter would be needed for sites that reference offers by ID, use other pricing fields, or need a rendered browser. Run it only on captures for the same merchant, variant, market, and price type. Those comparisons are defined by your watchlist.
Write each attempt to your monitoring log with an outcome such as valid, unavailable, conflicting, or failed. Update the last verified price from valid observations. Treat an unparseable page as unknown and route it to the source owner if it repeats.
| What you observe | How to classify it | What to do |
|---|---|---|
| Price changes from USD 59 to USD 54 on the same in-stock variant | Candidate price change | Confirm with a fresh capture or the authorized feed, then emit one alert |
| Different currency or market appears | Scope mismatch | Restore the expected market context and verify the offer before comparing |
| Current variant is out of stock | Availability event | Track stock separately and apply your policy for alerts on unavailable products |
| Product markup disappears or returns a range | Extraction or offer-definition issue | Preserve the last verified price and review the source adapter |
| Identical change appears in the next scheduled run | Repeat observation | Use a deduplication key for the confirmed change and retain evidence without sending another alert |
As a pilot, 150 pages checked every six hours produce 600 planned fetches per day before retries. Allocate those checks across each approved source's limits, and back off when a source signals throttling. Keep the collection schedule and the alert thresholds in configuration. Measure valid observation coverage per source in addition to the number of alerts. A source can go quiet because prices stopped changing or because its parser stopped finding products.
Nstbrowser can give QA teams named Browser Profiles for manual checks of authorized storefronts. Group those profiles by merchant or market so an operator can reopen the setup used for a disputed observation. Use a distinct workspace when site preferences or state affect which offer is displayed. Review team access so only authorized operators can open profiles for a given merchant. Keep the primary watchlist and observation history in your own monitoring system.
Store QA β US β Price Check and record the storefront and market configuration in the runbook.Pick a handful of variants that cover regular price, a promotion, and an unavailable item. Capture values two or more times, then simulate one changed price and one failed extraction on local fixtures. Confirm that the system sends one alert for the valid change and sends the failure to review. Extend the pilot once someone can reproduce each result from its source record.
Yes, when an approved feed, API, or HTML response contains an offer matching the SKU, seller, market, and price type you need. Validate the captured amount against what buyers see before trusting it as a baseline.
Choose a cadence based on business need, source freshness, and per-source limits. Start with a pilot and measure how often new observations lead to useful decisions before increasing frequency.
Track each required variant separately. Use the exact variant or SKU when extracting its offer and record its currency and availability. Treat a price range as an aggregate value.
Decide this in the monitoring rule. Many teams track changes in price and availability separately so an out-of-stock offer won't be treated like a price shoppers can pay.