Skip to content
Search API · Use case

Compare prices across merchants with a Google Shopping API

A Google Shopping API gives price comparison its data without a scraper per retailer: one query returns the listings Google Shopping shows for a product, each with the merchant, a numeric price and the rating. Ecommerce teams watch competitors, marketplaces benchmark their sellers and deal sites look for the lowest offer. The Search API returns those listings as parsed JSON, one country at a time.

The problem

Competitor prices live on dozens of retailer sites with different markup

Knowing where you stand on price means checking the same product on every merchant that sells it. Each retailer renders prices its own way, loads some of them with JavaScript, formats them with local separators and currency signs, and changes its templates without warning. One scraper per site is a maintenance job that never ends.

Scraping a shopping results page looks like a shortcut, but the page is built for people: prices are strings such as “$1,699.00”, merchants are text next to a logo and ratings are stars. Turning that into numbers you can compare is another parser, and it breaks just as often as the retailer ones.

type: shopping returns every listing with title, url, publisher for the merchant, and price as a currency symbol plus an amount that is already a number. rating arrives as score, scale and review count when Google shows one. location geo-targets the listings by country, so you compare prices in the market you actually sell in.

How it works

How to track competitor prices with the Google Shopping API

Query the product, turn the listings into rows, then compare them with your own price. The shopping guide lists every field.

1 · Query the product in one market
import createClient from 'microlink.io'

const microlink = createClient({
  apiKey: process.env.MICROLINK_API_KEY
})

const { results } = await microlink.search('sony wh-1000xm5', {
  type: 'shopping',
  location: 'gb'
})

const offers = results.map(({ title, publisher, price, rating, url }) => ({
  title,
  merchant: publisher,
  amount: price.amount,
  symbol: price.symbol,
  rating: rating?.score,
  url
}))

price.amount is a number and price.symbol the currency sign, so the offers are ready to sort. rating is optional, which is why score is read with ?.

2 · Find the floor and your gap to it
const sorted = offers.slice().sort((a, b) => a.amount - b.amount)

const lowest = sorted[0]
const median = sorted[Math.floor(sorted.length / 2)].amount
const gap = ourPrice - lowest.amount

No currency parsing: sort and aggregate amount directly. gap is how far the cheapest merchant sits below ourPrice, your own listing price.

3 · Repeat per market
import createClient from 'microlink.io'

const microlink = createClient({
  apiKey: process.env.MICROLINK_API_KEY
})

const markets = ['us', 'gb', 'de']

const byMarket = await Promise.all(
  markets.map(async location => {
    const { results } = await microlink.search('sony wh-1000xm5', {
      type: 'shopping',
      location
    })
    return { location, results }
  })
)

Each market is one request. Keep amounts grouped by location: symbol is the sign shown on the listing, not an ISO currency code, so never average amounts across markets.

Parameters used
  • type 'shopping' returns title, url, publisher, price, and optional image, rating and id.
  • location Two-letter country code that geo-targets the listings, such as gb or de.
  • limit Maximum number of listings per page.
  • page Later pages for broad queries, one request each. next() does the same from a result.

Shopping results show what Google Shopping lists, not what every retailer prints on its own product page. When you need the price from one specific page, including shops Google does not list, extract it from that page with the Microlink SDK.

Why it works

Why a shopping search API beats one scraper per retailer

Price monitoring usually breaks at the parsing step. Starting from parsed listings removes the part that breaks most.

01 · Parsed, not scraped
amount is a number you can sort.
Every listing carries price.amount as a number and price.symbol as the currency sign, so filtering under a threshold or computing an average is one line of JavaScript. No regular expressions for thousands separators.

The product intelligence pattern runs thresholds and averages on the same fields.

02 · Every merchant at once
One query covers the retailers Google lists.
publisher names the merchant on each listing, so a single request shows who sells the product and at what price. A new competitor needs no new code: if Google Shopping lists them, they appear in the results.

Need pictures rather than prices? Search Google Images with full-size URLs and get the dimensions of every result.

03 · Per country
location picks the market.
Pass a two-letter country code and the listings are geo-targeted to that market. Running the same product across several codes gives you a regional price map with one request per country.

When not to: Google Shopping does not list every retailer, and a listing is not a promise of stock or of the checkout total. For a price you match by contract, read it from the merchant’s own page. For local store details such as hours and phone, use the maps surface.

FAQ

How do I get Google Shopping prices through an API?

Call microlink.search with the product name and type: 'shopping'. Each result has title, url, publisher (the merchant), price with a numeric amount and a currency symbol, and an optional rating and image.

Can I track competitor prices over time with the Shopping API?

Yes, by running the same queries on your own schedule and storing each amount with a timestamp. The API returns the current listings; it does not keep price history or send alerts, so the time series lives in your database.

Does the Google Shopping price include the currency?

price.symbol carries the currency sign shown on the listing, such as $ or €, and price.amount the number. Query one market at a time with location and compare amounts within a market, not across currencies.

How many requests does product price monitoring use?

One per search call. Tracking 200 products in three countries once a day is 600 requests a day, about 18,000 a month, which fits a Pro plan of 46,000 requests from €39/month. Search has no free tier: it is paid from the first request.

Is the price comparison API affiliated with Google?

No. Microlink Search is an independent product that queries public Google surfaces, Google Shopping included. It is not affiliated with or endorsed by Google, and Google is a trademark of Google LLC.
Related use cases

Solve the next problem with the same API

Image search with full-size URLs and dimensions

Search images by keyword and get the full-resolution URL, width and height, thumbnail, source page and credit for every result.

Local business leads from Google Maps

Turn a category and a city into a lead list with phone, website, hours, rating and Place ID, then pull emails from each website.

Google rank tracking by country

Compute where a domain ranks for each keyword in each country from ordered results, and keep the history in your own database.

Brand and media monitoring from Google News

Query Google News by brand, country and time window and get headline, publisher and ISO 8601 date for every article.

Custom fields alongside metadata

Get prices, ratings, headings or any CSS selector, typed and returned next to the normalized metadata.

Screenshot a site from another country

Pin the request to a country with a two-letter code and capture the prices and copy a local visitor sees.

Ready to compare every merchant?

Parsed prices from Google Shopping, per country, as JSON. Get a Pro key and run your first price comparison today.