编程

Google Shopping API - Product Search, Merchant Offers, Prices

试用

Search Google Shopping for products, fetch a full product page, and page through every store selling a product — as structured JSON. Price, seller, rating, and price/sale filters. v2 engine, 1 credit per request.

它能做什么

Google Shopping API - Product Search, Merchant Offers, Prices

技能文档

Google Shopping API - Product Search, Merchant Offers, Prices

Search Google Shopping for products, open a full product detail page, and page through every store selling it — all as structured JSON. Three endpoints, each 1 credit.

When to trigger

Use this skill when the user asks to:

  • Find products across retailers with price or sale filters
  • Compare prices for a product across many stores
  • Get specs, ratings, variants, or seller options for a product
  • Build a price-comparison or shopping-research workflow

Setup

Get a free API key at scavio.dev (50 free credits to get started, no card required):

export SCAVIO_API_KEY=sk_live_your_key

Endpoints

EndpointCreditsDescription
POST https://api.scavio.dev/api/v2/google/shopping1Search products, returns shopping_results[]
POST https://api.scavio.dev/api/v2/google/shopping/product1Full product detail page
POST https://api.scavio.dev/api/v2/google/shopping/product/stores1Page through all stores selling a product
Authorization: Bearer $SCAVIO_API_KEY

Workflow

  1. Search: call /shopping with a query. Filter with min_price, max_price, on_sale, free_shipping, or sort_by. Each result carries a catalog_id (durable) or product_id.
  2. Product page: call /shopping/product with a catalog_id (pass the same query) for full specs, variants, and top stores in product_results.
  3. All stores: if the product lists more sellers than returned, call /shopping/product/stores with the catalog_id and the next_page_token from the previous response to page through every store.

Shopping Search Parameters

ParameterTypeDefaultDescription
querystringrequiredSearch query (1-500 chars)
devicestring--desktop or mobile
startnumber--Result offset (follow pagination.next)
min_pricenumber--Minimum price filter
max_pricenumber--Maximum price filter
sort_bynumber00 relevance, 1 price ascending, 2 price descending
free_shippingboolean--Only free-shipping offers
on_saleboolean--Only on-sale offers
shoprsstring--Opaque filter token from filters[] / carousel_filters[]
hlstring--UI language
glstring--Geo country
google_domainstringgoogle.comRegional Google domain
locationstring--Canonical location name (auto-UULE)
uulestring--Pre-encoded UULE

Product Parameters

ParameterTypeDefaultDescription
catalog_idstring--Durable catalog id (pass with query)
querystring--Required when catalog_id is set
product_idstring--Product id alternative
immersive_product_page_tokenstring--Page token from a listing
page_tokenstring--Alias for immersive_product_page_token
devicestring--desktop, mobile, or tablet
sort_bystring--Seller sort: base_price, total_price, promotion, seller_rating
load_all_storesboolean--Load all stores inline
more_storesboolean--Include additional stores
hlstring--UI language
glstring--Geo country
google_domainstringgoogle.comRegional Google domain
locationstring--Canonical location name
uulestring--Pre-encoded UULE

Product Stores Parameters

ParameterTypeDefaultDescription
catalog_idstringrequiredSame catalog_id used on the product call
next_page_tokenstringrequiredContinuation cursor from a prior response

Example

import requests

BASE = "https://api.scavio.dev"
# Your key from https://scavio.dev/?utm_source=clawhub&utm_medium=skill&utm_campaign=google-shopping-api. Load it from your environment or secret
# store in real code - keep it out of source control.
API_KEY = "sk_your_key_here"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1. Search products, cheapest first, under $1500
search = requests.post(f"{BASE}/api/v2/google/shopping", headers=HEADERS,
    json={"query": "16 inch laptop", "sort_by": 1, "max_price": 1500}).json()

item = search["shopping_results"][0]
print(item["title"], item.get("price"), item.get("source"))

# 2. Full product page (catalog_id needs the query alongside it)
product = requests.post(f"{BASE}/api/v2/google/shopping/product", headers=HEADERS,
    json={"catalog_id": item["catalog_id"], "query": "16 inch laptop"}).json()

# 3. Page through every store selling it
token = product["product_results"].get("stores_pagination", {}).get("next_page_token")
if token:
    stores = requests.post(f"{BASE}/api/v2/google/shopping/product/stores", headers=HEADERS,
        json={"catalog_id": item["catalog_id"], "next_page_token": token}).json()
    for s in stores["product_results"]["stores"]:
        print(s.get("name"), s.get("total_price"))

Responses

Search returns shopping_results[] (plus filters and pagination); product returns product_results; stores returns product_results.stores[]. Each also includes response_time, credits_used, credits_remaining, and cached.

{
  "shopping_results": [
    {
      "position": 1,
      "title": "Example 16\" Laptop",
      "price": "$1,299.00",
      "extracted_price": 1299,
      "source": "Example Store",
      "rating": 4.5,
      "reviews": 210,
      "catalog_id": "1234567890"
    }
  ],
  "response_time": 1420,
  "credits_used": 1,
  "credits_remaining": 997,
  "cached": false
}

Guardrails

  • Each call costs 1 credit. Inform the user before paginating through many stores.
  • Never fabricate product titles, prices, sellers, or ratings. Only return API data.
  • The product call needs catalog_id + query together; the stores call needs catalog_id + next_page_token — always run /shopping first to obtain the catalog_id.
  • Prices are strings as displayed; use extracted_price when present for numeric comparisons.

Failure handling

  • 400 means an invalid parameter (e.g. catalog_id without query) — fix and retry.
  • 401 means the API key is invalid or missing. Check SCAVIO_API_KEY.
  • 429 means rate or usage limit exceeded. Wait before retrying. See https://scavio.dev/docs/rate-limits?utm_source=clawhub&utm_medium=skill&utm_campaign=google-shopping-api.
  • 502 / 503 mean upstream is temporarily unavailable. Wait a few seconds before retrying.
  • If search returns no results, loosen the price filters or broaden the query.
  • If SCAVIO_API_KEY is not set, prompt the user to export it before continuing.

相关技能

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai22 次安装8 星标

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván559 次安装18 星标

从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。

作者 fly0pants4.3k 次安装296 星标

诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。

作者 Iván855 次安装69 星标

scavio-ai 的更多技能

浏览全部技能

Pull a Facebook page's profile, posts, reels and photos, one post with its comments, a single reel/video with downloadable URLs, a public group and its posts, an event, and hashtag posts. 11 endpoints, 1 credit each, structured JSON.

作者 scavio-ai3 次安装

Search the Meta Ad Library by keyword or Facebook Page id and walk full cursor pagination through every ad, with creative, run dates, platforms and political spend. 3 endpoints, 1 credit per page.

作者 scavio-ai3 次安装

Search live or SOLD eBay listings, read a listing in full, and look up a seller's profile card as structured JSON. 3 endpoints, 1 credit each. Sold-listing search is the price-research feature eBay itself hides.

作者 scavio-ai1 次安装