Home › Blog › Price scraper in Google Sheets

Price scraper in Google Sheets: build a Black Friday price tracker

By the ScrapeSheet team · Published October 22, 2026 · Updated November 3, 2026 · 7 min read

Blank triangular price tag on a string against a plain turquoise background

In short: A price scraper in Google Sheets needs three parts: IMPORTXML to read the price from static product pages (or a browser extension for JavaScript pages), a History tab of dated snapshots, and formulas for % change and the 30-day low. Then check every Black Friday or Cyber Monday "was" price against your own history.

Black Friday 2026 falls on November 27, and Cyber Monday on November 30. A deal only means something if you know what the product cost before, and stores change prices often in the weeks before the sale. A small tracker in Google Sheets gives you that history. Start it by November 5 and you will have more than three weeks of prices by Black Friday.

Step 1: Pick your pages and set up the tabs

You need a Google account, a new spreadsheet, and a short watchlist: the product name and the URL of each public product page. Choose sites whose terms allow automated reading of their pages: your own store, a supplier's catalog, or competitor shops that permit it. Check each site's terms of use and its robots.txt file first.

Stay on public pages. Only track pages anyone can see without an account. Never log in for a script, solve CAPTCHAs, or work around blocks or rate limits. Many large marketplaces forbid automated data collection in their terms, so leave them out. This is general information, not legal advice; for more, read is web scraping legal?

Formulas show only the current price; the History tab keeps the old ones.

  1. Rename the first tab Tracker. In row 1, type these headers from A to H: Date, Product, Price, URL, Raw price, Last logged, Change, 30-day low.
  2. In A2, enter =TODAY(). Type a product name in B2 and paste its page address in D2. Add one row per product, and fill the =TODAY() formula down column A to every product row.
  3. Add a second tab named History with three headers: Date, Product, Price. Leave the rest empty.
  4. Use exactly the same product names in both tabs. The formulas match rows by name.
Close-up of a white laptop keyboard with a green shopping cart icon on the Enter key

Step 2: Pull the price with IMPORTXML

IMPORTXML reads a page through Google's servers and returns the elements that match an XPath query. Many product pages mark the price with structured data, so try this in E2 first:

=INDEX(IMPORTXML(D2, "//*[@itemprop='price']/@content"), 1)

If that returns #N/A, find the price element yourself:

  1. Open the product page, right-click the price, and choose Inspect.
  2. Right-click the highlighted node and choose Copy > Copy XPath.
  3. Paste it as the second argument of IMPORTXML, and change any double quotes inside it to single quotes.

The raw result is often text such as $1,299.00. Turn it into a number in C2:

=IFERROR(VALUE(REGEXREPLACE(TO_TEXT(E2), "[^0-9.]", "")), "")

This keeps only digits and the decimal point, so $1,299.00 becomes 1299. It assumes prices with a decimal point and a US-locale spreadsheet. If the page shows the sale price and the old price in one element, point the XPath at the sale price only. Google lists a one-hour recalculation interval for IMPORTXML, so the price refreshes on its own.

If the formula returns nothing for every XPath you try, the page probably draws its prices with JavaScript after it loads. Google fetches the raw HTML, so the price is not there for the formula to see. Our guide to scraping data into Google Sheets covers the other common errors.

Page typeMethodUpdates
Static HTMLIMPORTXMLAbout hourly
JavaScript-renderedBrowser extensionWhen you run it
Three or four itemsCopy by handWhen you check

Step 3: Save a dated snapshot to the History tab

Do this once a day, or a few times a week:

  1. On the Tracker tab, select A2:C down to your last product.
  2. Copy it, then click the first empty cell in column A of the History tab.
  3. Choose Edit > Paste special > Values only (Ctrl+Shift+V). The date becomes fixed, and so does each price.
  4. Format History column C as a number with two decimals.

Step 4: Add % change and lowest-price formulas

Back on the Tracker tab, add three formulas in row 2 and fill them down.

Last logged price

In F2, find the most recent price in History before today:

=IFERROR(INDEX(SORT(FILTER(History!A$2:C, History!B$2:B=B2, History!A$2:A<A2), 1, FALSE), 1, 3), "")

% change

In G2, compare today's price with that value, and format the column as a percentage:

=IFERROR(IF(OR(C2="", F2=""), "", (C2-F2)/F2), "")

A kettle that was logged at $54 and now costs $44 shows -18.52%.

Lowest price in the last 30 days

In H2:

=IF(COUNTIFS(History!B$2:B, B2, History!A$2:A, ">="&(A2-30))=0, "", MINIFS(History!C$2:C, History!B$2:B, B2, History!A$2:A, ">="&(A2-30)))

The COUNTIFS check stops the cell from showing 0 when a product has no history yet. The 30-day low is the number to watch. Until you have 30 days of snapshots, it is simply the lowest price you have logged.

Highlight drops with conditional formatting

  1. Select C2:C on the Tracker tab and open Format > Conditional formatting.
  2. Under Format rules, choose Custom formula is and enter =AND(ISNUMBER($C2), ISNUMBER($F2), $C2<$F2). Pick a green fill. This marks any drop since the last snapshot.
  3. Click Add another rule, enter =AND(ISNUMBER($C2), ISNUMBER($H2), $C2<=$H2), and choose bold text. This marks a price at or below its 30-day low.

Step 5: Check Black Friday and Cyber Monday deals against your history

Many deals show a crossed-out "was" price. Compare it with the prices you actually logged.

Flag a "was" price you never logged

  1. On the Tracker tab, add four headers from I to L: Was price, Highest logged, Was check, Pre-sale low.
  2. When a deal goes live, type the store's crossed-out price in column I as a plain number, such as 69.
  3. In J2, find the highest price you logged for the product:
    =IF(COUNTIFS(History!B$2:B, B2)=0, "", MAXIFS(History!C$2:C, History!B$2:B, B2))
  4. In K2, check whether that "was" price ever appeared in your snapshots, then fill J and K down:
    =IF(OR(I2="", J2=""), "", IF(COUNTIFS(History!B$2:B, B2, History!C$2:C, I2)>0, "Seen", IF(I2>J2, "Above your highest", "Never seen")))

Say you logged a kettle at $54, $52, and $49, and the Black Friday page says "was $69, now $44." Column K shows Above your highest. That does not prove the store did anything wrong: it may have charged $69 before you started, or between snapshots. It does tell you to judge the deal against $49, your own low.

The rules on "was" prices vary by region. In the EU, as a general rule, a store that announces a price reduction must show its prior price, defined as the lowest price it applied during a period of at least 30 days before the reduction (Article 6a of Directive 98/6/EC). Member States may set exceptions, for example for perishable goods. In the US, the FTC's Guides Against Deceptive Pricing say a former price is a legitimate basis for a comparison when it is the actual, bona fide price at which the item was offered to the public on a regular basis for a reasonably substantial period of time.

After Cyber Monday: a post-sale checklist

  1. Keep pasting snapshots through Cyber Monday and for about a week after, so you can see whether prices go back up.
  2. In L2, get the lowest price you logged before Black Friday, and fill it down:
    =IF(COUNTIFS(History!B$2:B, B2, History!A$2:A, "<"&DATE(2026,11,27))=0, "", MINIFS(History!C$2:C, History!B$2:B, B2, History!A$2:A, "<"&DATE(2026,11,27)))
  3. Compare each sale price with column L. A sale price at or above that number is no lower than a price you already logged before the sale.
  4. Duplicate the History tab and rename the copy History 2026, so next year starts with a baseline.

How to do it with ScrapeSheet

If IMPORTXML works on your pages, you do not need an extension. One helps when prices are drawn with JavaScript, or when you want a whole category page at once. ScrapeSheet reads the page as your browser shows it. Our price monitoring page shows the full workflow.

  1. Install ScrapeSheet from the Chrome Web Store and pin it.
  2. Open the product or category page you want to track.
  3. Click the ScrapeSheet icon to open the panel, then click Extract. It detects the tables and lists on the page on its own.
  4. Copy the result to the clipboard and paste it into a spare tab, or export a CSV file.
  5. Paste the names and prices into History as values, with the date in column A. Clean currency symbols with the REGEXREPLACE formula from Step 2.

The free plan exports up to 20 rows per export and one page per run. ScrapeSheet Pro (€12.99 per month) removes the row limit and follows pagination and infinite scroll; see how to scrape multiple pages. Its price monitoring mode spots the cheapest option in the list on screen; the free plan lets you try each mode, and Pro unlocks them all. The extension runs when you click it; it does not check prices on a schedule.

More step-by-step guides are on the ScrapeSheet blog.

FAQ

What is the simplest price scraper for Sheets?
For static product pages, the simplest price scraper in Sheets is the built-in IMPORTXML function: one formula per product, no add-on needed. It only shows the current price, so paste dated snapshots into a History tab to keep old prices. For pages that load prices with JavaScript, use a browser extension that reads the rendered page.

Can Google Sheets track prices automatically?
Partly. IMPORTXML refreshes the current price on its own, and Google lists a one-hour recalculation interval for it. It does not keep old values, so you need to paste dated snapshots into a History tab to build a price history.

Why does IMPORTXML return #N/A for a price?
Usually the XPath does not match, or the page draws its prices with JavaScript after loading. Google fetches the raw HTML, so script-added prices are invisible to the formula. Try another XPath, or extract the rendered page with a browser extension.

Is there a free price tracking tool for a spreadsheet?
Google Sheets itself is free, and IMPORTXML plus the formulas in this guide cover static product pages. ScrapeSheet has a free plan that exports up to 20 rows per export from one page per run, which is enough for a short watchlist.

How do I know if a Black Friday discount is real?
Compare the sale price with the lowest price you logged before the sale, and check whether the crossed-out "was" price ever appeared in your snapshots. A "was" price you never saw is a reason to judge the deal against your own low instead. In the EU, stores that announce a reduction must, as a general rule, show the lowest price they applied in at least the previous 30 days.

Sources

General information, not legal advice. Always check the website's terms and the data-protection rules that apply to you.

Keep reading

← Back to the blog · ScrapeSheet home