SheetMagicSheetMagic

Beat Competitor Prices With Google Shopping in Google Sheets

See every merchant's Google Shopping price for your products in one Google Sheet with =GSHOPPING(). Sort lowest first and the price to beat is at the top. 3 scraping credits per search.

Phil Nguyen · 5 min read

=GSHOPPING(query, country, sortBy, minPrice, maxPrice) searches Google Shopping and writes the offers it finds, with title, price, merchant, rating, reviews, delivery and old price, into a results tab in your sheet. Sort lowest price first and the price you need to beat for each product is at the top, without searching Google Shopping product by product.

Picture a Shopify seller who checks 30 products on Google Shopping every Monday and copies each merchant and price into a sheet. At about 3 minutes per product, that is 90 minutes a week. One formula per product, dragged down a column, does the lookups, and each search is 3 scraping credits, so 30 products is about 90 credits.

How do I pull Google Shopping prices into Google Sheets?

Type the formula in a cell:

=GSHOPPING(query, country, sortBy, minPrice, maxPrice)
  • query: what a shopper would search, for example "wireless gaming mouse".
  • country: a two-letter country code such as "us" or "gb". It defaults to us.
  • sortBy: 0 for relevance (the default), 1 for price low to high, 2 for price high to low.
  • minPrice and maxPrice: optional whole-number price filters.

For a price check, sort lowest first and set a floor that drops accessories and spare parts:

=GSHOPPING("wireless gaming mouse", "us", 1, 25, 150)

The cell shows ⏳ Scraping... straight away, and the offers arrive a little later.

What do the results look like?

The offers land in a new tab called Google Shopping Results. The first column, Source, holds the cell reference of the formula that fetched each row. The main columns are:

Position, Title, Price, Currency, OldPrice, Merchant, Rating, Reviews, Delivery

followed by ImageURL, Condition, ProductID, MultipleSources, Extensions, SearchInformation and Pagination. Price is the number on its own, so you can sort and do maths on it, and Currency holds the symbol ($, €, £ or ¥) when the price shows one.

Here is the shape of the output, with made-up values for illustration:

SourcePositionTitlePriceCurrencyOldPriceMerchantRating
B21Example wireless mouse, black29.99$39.99Example Store4.5
B22Example wireless mouse31.5$Another Shop4.2

What can you do with the Google Shopping results?

  1. Set a price you can defend. With sortBy set to 1, the cheapest comparable offer is near the top. Price just under it, or decide on purpose to sit above it, instead of guessing. That decision used to wait for the 90-minute Monday check.
  2. Spot a competitor's sale early. A value in OldPrice means the merchant is showing a reduced price. Filter OldPrice to non-blank and you see who is discounting this week, so you can respond before you quietly lose orders to them.
  3. Find your real rivals. Count rows per merchant with =COUNTIF(G:G, G2) (column G is Merchant). The merchants that show up across most of your products are the ones to watch, which saves you tracking stores that rarely compete with you.
  4. Keep a weekly price tracker. Re-run the formulas each week and compare the new prices with last week's. Seeing who moved their price takes a minute instead of a morning.

How do I scale it to many products?

Put product search terms in column A, starting at A2. In B2 type =GSHOPPING(A2, "us", 1) and drag it down to B31. Formulas dragged down one column share one Google Shopping Results tab, and the Source column says which row each offer came from.

To pull the lowest price back next to each product, add this in C2 and drag it down (column D of the results tab is Price):

=MINIFS('Google Shopping Results'!D:D, 'Google Shopping Results'!A:A, "B"&ROW())

How much does it cost?

Each GSHOPPING search is 3 scraping credits, charged per request, not per row. The charge is worked out from the cost scrape.do reports for that request. GSHOPPING uses scraping credits only, no AI tokens.

In the example, 30 products is 30 x 3 = 90 credits a week. The Free plan includes 100 scraping credits, enough for 33 searches. The Solo plan includes 10,000 scraping credits a month. If a search finds nothing, the cell says no results were found and you are not charged. For how credits and tokens differ, see AI tokens vs scraping credits.

What are the pitfalls?

  • minPrice above maxPrice. GSHOPPING returns an error in the cell, for example "#ERROR: minPrice (200) is greater than maxPrice (100)", instead of running an unfiltered search.
  • Waiting on the cell. ⏳ Scraping... is normal while the search runs. The offers then appear in the results tab, never below the formula.
  • Expecting the formula to refresh itself. With Keep Formula on (the default) the formula cell is kept as text so it does not run again and charge again. Delete the leading apostrophe when you want a fresh run. Each run is charged.
  • A vague query. "Mouse" mixes in mouse pads and cables. Name the product the way a buyer would, and use minPrice to drop accessories.

For Amazon listings, see Amazon product research in Google Sheets. For every scraper in one place, see the web scraping guide.

Text and scraping formulas run on the free allowance. Install from the Google Workspace Marketplace, no card, no expiry.

Install free for Google Sheets

About the author

Phil NguyenPhil builds SheetMagic, the Google Sheets add-on that brings AI and web scraping into the spreadsheet, used by 6,300+ people. He writes these guides from the formulas he runs on his own sheets.