API Hop 文件
Bing Shopping 介面參考
搜尋 Bing Shopping 商品並查詢商品詳情。
並行上限
AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。
GET /v1/bing-shopping/search 預設並行上限: 2
GET /v1/bing-shopping/product 預設並行上限: 2
搜尋 Bing Shopping 商品並查詢商品詳情。
驗證與計費
預設每次成功請求 $0.0003(300 credits)。 使用 API Hop API Key;可用性取決於已啟用閘道與金鑰權限。成功請求價格以目前目錄與帳戶為準,帳戶專屬價格優先。成功的空結果也會計費,失敗會釋放預留額度。逾時為 60 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。
http
Authorization: Bearer YOUR_API_KEYBing Shopping: 搜尋商品
GET https://api.apihop.ai/v1/bing-shopping/search
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED | coffee |
page | integer | 頁碼(從 1 開始); page: optional; min: 1; max: 100 | 1 |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
mkt | string | 平台原生篩選條件 (mkt); mkt: optional; ^[A-Za-z]{2,3}-[A-Za-z]{2}$ | - |
efirst | integer | 平台原生篩選條件 (efirst); efirst: optional; min: 1; max: 10000 | 1 |
filters | string | 平台原生篩選條件 (filters); filters: optional; UTF-8 bytes: 4096 | - |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 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})?$/NOT (mkt AND country)
範例
bash
curl --get "https://api.apihop.ai/v1/bing-shopping/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Bing Shopping: 查詢商品詳情
GET https://api.apihop.ai/v1/bing-shopping/product
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
id | string | 從搜尋結果複製的商品或賣家識別碼 (id); id: REQUIRED | 17464159263 |
query | string | 搜尋詞; query: optional | - |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
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})?$/id: /^[0-9]{1,30}$/
範例
bash
curl --get "https://api.apihop.ai/v1/bing-shopping/product" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=17464159263"回應與錯誤
保留原生 JSON 與數字精確度。以下是空成功結果範例。HTTP 400 輸入無效;401 需驗證;402 餘額不足;403 無權限或未開放;405 方法不支援;429 限流;5xx 服務錯誤。請保留 X-Request-Id。
json
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}