Google Product API
既知の商品IDを使用して、Google Shoppingの商品ページから商品詳細を取得します。engine=google_product を設定し、product_id を渡します。必要に応じて offers、specs、reviews フラグを有効にすることでレスポンスを拡張できます。
エンドポイント
Section titled “エンドポイント” GET https://serp.shifter.io/v1?engine=google_product&api_key=YOUR_API_KEY
パラメーター
Section titled “パラメーター”| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
api_key | string | はい | あなたのSERP APIキー |
engine | string | はい | google_product を指定する必要があります |
product_id | string | はい | GoogleのプロダクトID |
device | string | いいえ | desktop、mobile、または tablet |
google_domain | string | いいえ | 使用するGoogleドメイン |
location | string | いいえ | ジオターゲティングの地域名 |
uule | string | いいえ | Googleエンコード済みの位置情報文字列 |
hl | string | いいえ | インターフェース言語コード |
gl | string | いいえ | 国コード |
start | int | いいえ | ページネーションのための結果オフセット |
offers | int | いいえ | オファーを取得するには 1 または true を設定 |
specs | int | いいえ | 商品仕様を取得するには 1 または true を設定 |
reviews | int | いいえ | 商品レビューを取得するには 1 または true を設定 |
filter | string | いいえ | オファーを絞り込みます。値: freeship:1、ucond:1、scoring:p、scoring:tp、scoring:cpd、scoring:mrd |
リクエスト例
Section titled “リクエスト例”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();レスポンス例
Section titled “レスポンス例”{ "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" } ] }}