Google Shopping API: how to compare product offers by keyword
Get up to 10 localized Google Shopping product offers with prices, sellers, ratings and links for a keyword, then compare them on a repricing worksheet
On this page
You have 25 SKUs to check against current Google Shopping offers before a competitor price sheet is updated. One keyword search per product returns up to 10 offers, and the seller, price, rating and link columns show which items need repricing
The worksheet below is the deliverable. No run has been executed for this guide, so the values are placeholders showing the shape rather than findings
Worksheet design and an example query
Each SKU gets one row and one call. Keep the query in the row so a returned offer can be traced back to the search that produced it
Example input, invented for this guide: query set to "Nike running shoes", country set to "us", language set to "en", limit set to 10. Swap in your own product names before running anything
| SKU | query | title | seller | priceText | listPriceText | discountPercent | rating | reviewsCount | url | Decision |
|---|---|---|---|---|---|---|---|---|---|---|
| ABC-001 | (your keyword) | (offer title) | (store) | "$99.99" or empty | "$130" or empty | "23% OFF" or empty | 4.4 or null | 128 or null | (product page) | reprice, hold or review |
The Decision column holds your rule, not the tool's. A simple version: reprice when the offer sits below your sheet price by more than your threshold, hold when the gap is inside it, and review by hand when rating is null or reviewsCount is low
Step 1: send one keyword search per SKU
anyapi.google_shopping.search is called through POST /v1/runs with toolId anyapi.google_shopping.search. query is required and takes a product name, brand or keywords
Localization is set by two codes. country takes an ISO 3166-1 alpha-2 code such as us, gb or de and defaults to us. language takes an ISO 639-1 code such as en, es or fr and defaults to en. Match both to the market your price sheet covers, because the offer set follows them
condition narrows results to NEW, USED or REFURBISHED, and its default ANY keeps any condition. sortBy defaults to relevance, and the enum also names LOWEST_PRICE, HIGHEST_PRICE and TOP_RATED
The ceiling sits here: at most 10 product offers come back per call, and limit accepts 1 to 10 with a default of 10. A keyword with a deeper offer list is cut at that point, so a generic phrase gives you a sample rather than the whole shelf. Use the specific product name
requireFields is the input to reach for when a column must not come back blank. Name output fields and the request is served only by a source that returns each named field: brand, currency, discountPercent, listPriceText or priceText. Fields you do not name are still returned when the serving source has them. Naming fields can raise your price, since a dearer source serves when the cheapest one cannot return a named field, and you are quoted and charged that source's price. A combination that no single source returns together is refused as invalid input, with no charge. A named field can still be absent on a product that genuinely lacks it
The schema lists these input properties. It does not say the request accepts nothing else
Reading the fields that drive the decision
found is true when at least one offer came back. When it is false, data is null and reason holds not_found; the contract calls that a successful call, not an error. Treat an empty row as a normal outcome for an obscure SKU
Each entry in data.items is one offer. title, url and image are populated whenever the provider has data for the entity, and title plus url are the required pair. url is the Google Shopping product page URL and retains the query, so it doubles as your link column
Price reads across two fields. price is a numeric amount and sits at 0 when the lane reports the price only as text. priceText is the displayed amount such as "$99.99" and is empty when the lane reports a numeric price instead. Read whichever one carries the value before you compare. The same split applies to listPrice and listPriceText, where 0 means not on sale or reported only as text
discountPercent is a label such as "23% OFF" and empty when the product is not on sale, which separates a temporary cut from a standing price. rating runs 0 to 5 and is null when unrated. reviewsCount is null when none reported. seller is the store name, and brand, currency and productId help you join rows back to the sheet
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to compare Google
Shopping offers for the 25 SKUs below. Check the current inputs and price
of anyapi.google_shopping.search before running anything. Send one call
per SKU with the product name as query, country us, language en, limit 10
and sortBy LOWEST_PRICE. Do not name requireFields unless a column must be
filled. Return one table with sku, query, title, seller, price or priceText,
listPriceText, discountPercent, rating, reviewsCount, url and a decision
column left empty for me. Mark a row with found false as no offers and
leave its offer columns empty. Do not invent prices or links.
ABC-001, Nike running shoes (example row, replace with your own)Estimated tool cost
Prices from the Purrkey catalog, read November 13, 2026. The tool is listed as max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." Each total below is a ceiling, not a settled charge
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One keyword check | 1 call x max price | $0.0638 per call | 1 | $0.0638 |
| Compare 25 SKUs | 25 calls x max price | $0.0638 per call | 25 | $1.595 |
Model fees for the agent are not counted. A request that names requireFields can be served by a dearer source at that source's price, so check the quote on a small run before you spend the full $1.595 ceiling
The first call
Pick one SKU, run the prompt with a single row, and check that the returned priceText and url point at the product you meant. Then run the remaining 24. The tool page is at Google Shopping search
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Google Shopping.FAQ
How do I compare product offers on Google Shopping?
Send one keyword search per SKU to anyapi.google_shopping.search with the product name as query, then read title, seller, price or priceText, rating and url from the returned offers. Apply your own repricing rule to each row afterward.
What inputs does anyapi.google_shopping.search take?
query is required. country, language, condition, limit, sortBy and requireFields are optional, and country and language default to us and en.
How many offers does one search return?
At most 10. limit accepts 1 to 10 and defaults to 10, so a keyword with more matching offers is cut at that ceiling.
What does found false mean?
found is false when nothing matched, data is null and reason holds not_found. The call is still a successful call, not an error.
Why is price 0 in a result?
price sits at 0 when the lane reports the amount only as text, and priceText is empty when the lane reports a numeric price instead. Read whichever field carries the value.
How much does it cost to compare 25 SKUs?
At the listed price of $0.0638 per call, 25 calls cost at most $1.595, and a single keyword check is at most $0.0638. Model fees for the agent are not counted.
Can I sort Google Shopping offers by price?
sortBy defaults to relevance, and the enum also names LOWEST_PRICE, HIGHEST_PRICE and TOP_RATED.
Next step
Try this with Google Shopping
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.