Skip to main content
A pricing team tracks 12 competitors in 3 countries. Its tool takes the text of each pricing page and compares it with last week’s. The advertising and a date in the footer change every week, so every page is reported as changed. The one change that mattered, a plan that went from 49 to 59 in Germany only, was in a table that the tool had flattened into one line. This page builds a watch that reads the table as a table, in each country, and reports the cell.

The run in 4 steps

Read the page from each country

A site can show another price to a visitor from another country. Send the same address once for each market, with the country to read it from and the language to ask for.
Request body of fetch_contents_batch
Replace PRICING_PAGE_URL with the address of the pricing page, and each placeholder that ends in _FINGERPRINT with the fingerprint of that country’s record from the week before. With block_kinds set to table, each record has the tables of the page and none of its other text. screenshot and raw_html add a picture of the page and the bytes as the server sent them.

Skip the countries where nothing changed

A record whose text is the same as last week’s comes back as unchanged. The advertising and the footer are not part of the main content of the page, so they do not make a page count as changed.

Find the cell that changed

For a country that changed, compare the new record with last week’s. This response is cut to the fields that say what changed.
Part of the response
One cell changed, and the alert says which: the price in row 2. Read that row and the heading of its column from the table, and the alert reads “Team plan, monthly, Germany: 49 to 59”.

Store what the page showed

The record of the German page has a picture of the whole page and the bytes as served, each with a digest, and the country it was read from. Store them. When someone asks in March what the price was in November, you show the page.

What the head of pricing can check

Know the limits

A page is read from a country, not from a city, and not from a visitor’s account. A price that a site shows only to a signed-in customer is not read. The countries a page can be read from are a fixed list, which get_limits returns. The picture is taken on a second visit to the page. A site that tests 2 prices can show that visit another price than the one in the text. Compare the picture with the cell before you rely on it. A record is stored for 48 hours after its last use and for at most 30 days, so a weekly watch finds last week’s record. Store the pictures and the bytes yourself. For the calls, see Find the one cell that changed and Keep proof of what a page showed.