API Hop 文件
Google Shopping 介面參考
搜尋 Google Shopping 商品,查詢篩選條件、商品詳情與商家報價。
並行上限
AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。
GET /v1/google-shopping/search GET /v1/google-shopping/light GET /v1/google-shopping/filters GET /v1/google-shopping/product GET /v1/google-shopping/immersive-product 搜尋 Google Shopping 商品,查詢篩選條件、商品詳情與商家報價。
驗證與計費
預設每次成功請求 $0.0003(300 credits)。 使用 API Hop API Key;可用性取決於已啟用閘道與金鑰權限。成功請求價格以目前目錄與帳戶為準,帳戶專屬價格優先。成功的空結果也會計費,失敗會釋放預留額度。逾時為 60 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。
Authorization: Bearer YOUR_API_KEYGoogle Shopping: 搜尋商品
GET https://api.apihop.ai/v1/google-shopping/search
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: optional | coffee grinder |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
page | integer | 頁碼(從 1 開始); page: optional; min: 1; max: 1000 | 1 |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
location | string | 搜尋起點; location: optional | - |
latitude | number | 緯度; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | 經度; longitude: optional; min: -180; max: 180 | -180 |
safe | string | 平台原生篩選條件 (safe); safe: optional; active, off | active |
uule | string | 平台原生篩選條件 (uule); uule: optional; UTF-8 bytes: 4096 | - |
google_domain | string | 平台區域網域 (google_domain); google_domain: optional | - |
start | integer | 結果偏移量; start: optional; min: 0; max: 1000 | 0 |
shoprs | string | 平台原生篩選條件 (shoprs); shoprs: optional; UTF-8 bytes: 16384 | - |
min_price | number | 最低價格 (min_price); min_price: optional; min: 0; max: 1000000000 | 0 |
max_price | number | 最高價格 (max_price); max_price: optional; min: 0; max: 1000000000 | 0 |
sort_by | string | 排序; sort_by: optional; 1, 2 | 1 |
free_shipping | boolean | 免運費篩選 (free_shipping); free_shipping: optional | true |
on_sale | boolean | 促銷商品篩選 (on_sale); on_sale: optional | true |
small_business | boolean | 小型商家篩選 (small_business); small_business: optional | true |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON 回應,不自動分頁或重試。規則中的 AND 表示同時提供,OR 表示任一,XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudeNOT (page AND start)min_price <= max_pricequery OR shoprs: requireduule => NOT location AND NOT latitude AND NOT longitude
範例
curl --get "https://api.apihop.ai/v1/google-shopping/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee grinder"Google Shopping: 輕量商品搜尋
GET https://api.apihop.ai/v1/google-shopping/light
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: optional | coffee grinder |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
page | integer | 頁碼(從 1 開始); page: optional; min: 1; max: 1000 | 1 |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
location | string | 搜尋起點; location: optional | - |
latitude | number | 緯度; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | 經度; longitude: optional; min: -180; max: 180 | -180 |
safe | string | 平台原生篩選條件 (safe); safe: optional; active, off | active |
uule | string | 平台原生篩選條件 (uule); uule: optional; UTF-8 bytes: 4096 | - |
google_domain | string | 平台區域網域 (google_domain); google_domain: optional | - |
start | integer | 結果偏移量; start: optional; min: 0; max: 1000 | 0 |
shoprs | string | 平台原生篩選條件 (shoprs); shoprs: optional; UTF-8 bytes: 16384 | - |
min_price | number | 最低價格 (min_price); min_price: optional; min: 0; max: 1000000000 | 0 |
max_price | number | 最高價格 (max_price); max_price: optional; min: 0; max: 1000000000 | 0 |
sort_by | string | 排序; sort_by: optional; 1, 2 | 1 |
free_shipping | boolean | 免運費篩選 (free_shipping); free_shipping: optional | true |
on_sale | boolean | 促銷商品篩選 (on_sale); on_sale: optional | true |
small_business | boolean | 小型商家篩選 (small_business); small_business: optional | true |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON 回應,不自動分頁或重試。規則中的 AND 表示同時提供,OR 表示任一,XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudeNOT (page AND start)min_price <= max_pricequery OR shoprs: requireduule => NOT location AND NOT latitude AND NOT longitude
範例
curl --get "https://api.apihop.ai/v1/google-shopping/light" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee grinder"Google Shopping: 查詢商品篩選條件
GET https://api.apihop.ai/v1/google-shopping/filters
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED | coffee grinder |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
location | string | 搜尋起點; location: optional | - |
latitude | number | 緯度; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | 經度; longitude: optional; min: -180; max: 180 | -180 |
uule | string | 平台原生篩選條件 (uule); uule: optional; UTF-8 bytes: 4096 | - |
google_domain | string | 平台區域網域 (google_domain); google_domain: optional | - |
shoprs | string | 平台原生篩選條件 (shoprs); shoprs: optional; UTF-8 bytes: 16384 | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON 回應,不自動分頁或重試。規則中的 AND 表示同時提供,OR 表示任一,XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudeuule => NOT location AND NOT latitude AND NOT longitude
範例
curl --get "https://api.apihop.ai/v1/google-shopping/filters" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee grinder"Google Shopping: 查詢商品詳情
GET https://api.apihop.ai/v1/google-shopping/product
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
id | string | 從搜尋結果複製的商品或賣家識別碼 (id); id: optional | 17755277695162489284 |
query | string | 搜尋詞; query: optional | sony wh-1000xm5 |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
page_token | string | 從最新回應複製的商品選擇權杖 (page_token); page_token: optional; UTF-8 bytes: 16384 | - |
offer_view | boolean | 其他商家報價選項 (offer_view); offer_view: optional | true |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON 回應,不自動分頁或重試。規則中的 AND 表示同時提供,OR 表示任一,XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/id XOR page_token: required; page_token => NOT query AND NOT country AND NOT language AND NOT offer_viewid: /^[0-9]{1,30}$/Tokens: copy the exact token from a fresh response; do not invent or reuse expired tokens
範例
curl --get "https://api.apihop.ai/v1/google-shopping/product" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=17755277695162489284" \
--data-urlencode "query=sony wh-1000xm5"Google Shopping: 查詢沉浸式商品詳情
GET https://api.apihop.ai/v1/google-shopping/immersive-product
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
page_token | string | 從最新回應複製的商品選擇權杖 (page_token); page_token: REQUIRED; UTF-8 bytes: 16384 | gprod1.eyJ2IjoxLCJpZCI6IjE3NzU1Mjc3Njk1MTYyNDg5Mjg0IiwicSI6InNvbnkgd2gtMTAwMHhtNSIsImdsIjoidXMiLCJobCI6ImVuIn0 |
more_stores | boolean | 展開商店報價 (more_stores); more_stores: optional | true |
next_page_token | string | 下一頁權杖; next_page_token: optional; UTF-8 bytes: 24576 | - |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON 回應,不自動分頁或重試。規則中的 AND 表示同時提供,OR 表示任一,XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/page_token: copy immersive_product_page_token from a fresh search result; next_page_token requires more_stores = trueTokens: copy the exact token from a fresh response; do not invent or reuse expired tokens
範例
curl --get "https://api.apihop.ai/v1/google-shopping/immersive-product" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "page_token=gprod1.eyJ2IjoxLCJpZCI6IjE3NzU1Mjc3Njk1MTYyNDg5Mjg0IiwicSI6InNvbnkgd2gtMTAwMHhtNSIsImdsIjoidXMiLCJobCI6ImVuIn0"回應與錯誤
保留原生 JSON 與數字精確度。以下是空成功結果範例。HTTP 400 輸入無效;401 需驗證;402 餘額不足;403 無權限或未開放;405 方法不支援;429 限流;5xx 服務錯誤。請保留 X-Request-Id。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}