Apinoa Docs

Search

在 Google Shopping 搜索商品,每件商品附带价格、商家和评分。

查看原始 .mdx
GET | POST /v1/google-shopping/search

参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。

请求

curl "https://gateway.apinoa.com/v1/google-shopping/search?query=running+shoes&region=US" \
  -H "x-api-key: $APINOA_API_KEY"

参数

参数类型必填说明
cursorstringNext page: pass the previous result's cursor alone.
facetsstring | object listOne value from a result's facets (include=facets), e.g. facets=Brand:<value>. Google applies one at a time.
includestring listfacets — the filter rail Google shows beside the results, on the same page (no extra request).
priceMaxnumber ≥ 0Highest price, in the market's currency (decimal major units).
priceMinnumber ≥ 0Lowest price, in the market's currency (decimal major units).
querystringKeywords to search for.
regionenumThe market, ISO 3166-1 alpha-2: US (default), GB, CA, AU. Sets the shops, prices and currency. US GB CA AU

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

在 data 中返回 SearchResult。 真实响应的节选:数组只保留前几项,长文本已截断。

{
  "success": true,
  "data": {
    "marketplace": "google-shopping",
    "query": "running shoes",
    "page": {"index": 1, "size": 54},
    "items": [
      {
        "marketplace": "google-shopping",
        "id": "14699928440903523478",
        "url": "https://www.google.com/search?ibp=oshop&q=Hoka+Men%27s+Clifton+11&prds=catalogid%3A5939486839279040471%2Cgpcid%3A14699928440903523478%2CheadlineOfferDocid%3A905…",
        "title": "Hoka Men's Clifton 11",
        "price": {"currency": "USD", "amount": 154.95},
        "brand": "Hoka One One",
        "seller": {"name": "Zappos.com", "logoUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU…"},
        "rating": {"average": 4.484, "count": 412},
        "delivery": {"estimate": "Free delivery by Mon", "free": true},
        "returnsPolicy": "Free 365-day returns",
        "badges": [],
        "promotions": [],
        "attributes": [],
        "groupId": "14699928440903523478",
        "imageUrl": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcRqYH_zOknkUmPHPQooSsPMYiYGJMv-jev2oHa3IYWYR3S1ZdTQiAb3gLS_dNid6BzrdE1cSbjGZFbQVF2Nkj2ST_R5sfE4Tw",
        "ext": {
          "summary": "Hoka Men's Clifton 11. Current Price: $154.95. Zappos.com & more. Free delivery by Mon. Free 365-day returns. Rated 4.5 out of 5. 412 reviews.",
          "moreStores": true,
          "shelf": "Beginner Running Shoes",
          "catalogId": "5939486839279040471",
          "productId": "13107188378090301883",
          "offerId": "9057001329748764354",
          "imageId": "8494207511608046187"
        },
        "offers": [
          {
            "seller": {
              "name": "Peter Glenn Ski & Sports",
              "logoUrl": "https://encrypted-tbn2.gstatic.com/favicon-tbn?q=tbn%3AANd9GcTgj6MTV2jVPsWTKNdSwoPkVupNia0bUqnfBm8PYegVt-ywkuVH1n9-VCekAnK6c1rBK6Eho-3SEcUhcTEOMxTwKsE_qF3XMchpt…"
            },
            "price": {"currency": "USD", "amount": 155},
            "delivery": {"estimate": "Free delivery by Tue", "free": true},
            "ext": {"offerId": "18164253511807076099", "shelf": "All products"}
          }
        ]
      },
      {
        "marketplace": "google-shopping",
        "id": "1522057692120988320",
        "url": "https://www.google.com/search?ibp=oshop&q=New+Balance+Women%27s+Fresh+Foam+X+Kaiha+Road+V2+Running+Shoes&prds=catalogid%3A2224207068186773069%2Cgpcid%3A15220576…",
        "title": "New Balance Women's Fresh Foam X Kaiha Road V2 Running Shoes",
        "price": {"currency": "USD", "amount": 104.99},
        "brand": "New Balance",
        "seller": {"name": "New Balance", "logoUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU…"},
        "rating": {"average": 5, "count": 166},
        "returnsPolicy": "45-day returns",
        "badges": [],
        "promotions": [],
        "attributes": [],
        "groupId": "1522057692120988320",
        "imageUrl": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcSSyE2K1PfUS8yxgpTwvT2vlaiCaO84uGQNRSOkkjF_LCLn3s7bRKN1RMRFX2rwek5QYVUaeWIIL4W6zE7k1A266nu7dx6K",
        "ext": {
          "summary": "New Balance Women's Fresh Foam X Kaiha Road V2 Running Shoes. Current Price: $104.99. New Balance & more. 45-day returns. Rated 5.0 out of 5. 166 reviews.",
          "moreStores": true,
          "shelf": "Beginner Running Shoes",
          "catalogId": "2224207068186773069",
          "productId": "16229217600571913203",
          "offerId": "8468470629989173210",
          "imageId": "1190089453230405951"
        }
      }
    ],
    "cursor": "tRlUbjVXzLQ2mckO_0hUg_oRXAX71LylzGzTA4ov5NQm-NnRYdL9Cydv_yTsWQvUY7ouiehwkp5AzTrHVcRpPcxjhMZBDfWSR6cMUeo1EiZf7Lnj_fUyC3sfVIdge_nN-YWBk_4YkMM"
  }
}

错误

状态代码含义
400INVALID_CURSOR该 cursor 不是本操作返回的。请不带它重新开始。
400INVALID_PARAMS参数缺失、未知、超出范围,或该引擎不接受。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
429MARKETPLACE_SATURATED并发调用过多。请等待 Retry-After 秒后重试。
502UPSTREAM_ERROR引擎返回了无法使用的内容。请退避后重试。
503SERVICE_UNAVAILABLE临时故障。请退避后重试。

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 $0.0012。标价;单日调用超过 1,000 次后单价下调。

说明

  • include=facets 会附上 Google 在结果旁显示的筛选栏,不额外收费。把其中一个值作为 facets 传入即可筛选。
  • priceMin 和 priceMax 以该市场货币的主单位(可带小数)表示。

本页内容