Google Product API
既知の商品IDを使用して、Google Shoppingの商品ページから商品詳細を取得します。engine=google_product を設定し、product_id を渡します。必要に応じて offers、specs、reviews フラグを有効にすることでレスポンスを拡張できます。
Endpoint
Section titled “Endpoint” GET https://serp.shifter.io/v1?engine=google_product&api_key=YOUR_API_KEY
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | あなたのSERP APIキー |
engine | string | yes | google_product を指定する必要があります |
product_id | string | yes | GoogleのプロダクトID |
device | string | no | desktop、mobile、または tablet |
google_domain | string | no | 使用するGoogleドメイン |
location | string | no | ジオターゲティングの地域名 |
uule | string | no | Googleエンコード済みの位置情報文字列 |
hl | string | no | インターフェース言語コード |
gl | string | no | 国コード |
start | int | no | ページネーションのための結果オフセット |
offers | int | no | オファーを取得するには 1 または true を設定 |
specs | int | no | 商品仕様を取得するには 1 または true を設定 |
reviews | int | no | 商品レビューを取得するには 1 または true を設定 |
filter | string | no | オファーを絞り込みます。値: freeship:1、ucond:1、scoring:p、scoring:tp、scoring:cpd、scoring:mrd |
Example request
Section titled “Example request”curl "https://serp.shifter.io/v1?engine=google_product&api_key=YOUR_API_KEY&product_id=11607214845071611155"import requests
params = { "engine": "google_product", "api_key": "YOUR_API_KEY", "product_id": "11607214845071611155",}r = requests.get("https://serp.shifter.io/v1", params=params)data = r.json()import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'google_product', api_key: 'YOUR_API_KEY', product_id: '11607214845071611155',});const data = await (await fetch(url)).json();Example response
Section titled “Example response”{ "search_parameters": { "engine": "google_product", "product_id": "11607214845071611155" }, "product_results": { "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones", "prices": ["$349.00 - $399.99"], "rating": 4.7, "reviews": 2341, "extensions": ["Wireless", "Noise Cancelling"], "description": "Industry leading noise cancellation...", "media": [ { "type": "image", "link": "https://..." } ] }, "sellers_results": { "online_sellers": [ { "name": "Best Buy", "total_price": "$349.00" } ] }}