Google Product
SERP API Google 查詢參數
使用 Thordata 的 SERP API 配置 Google 產品查詢,包括本地化參數、地理定位、搜索類型、分頁以及「高級篩選」輸出選項。
product_id
,產品ID(必填)
該參數定義要獲取結果的產品,通常出現在支援產品的購物結果中(例如:https://www.google.com/shopping/product/{product_id})。
範例請求:
使用參數 product_id
的範例:4887235756540435899
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1"
本地化
google_domain
,域名(非必填)
定義用於數據爬取的搜尋引擎網域名稱(預設值:google.com)。 您可以在系統中修改此參數,或參考 Google 網域頁面以獲取完整支援的網域名稱清單。
範例請求:
使用參數 product_id: 4887235756540435899
和 google_domain: google.co.ao
的範例結果。
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "google_domain=google.co.ao" \
-d "json=1"
gl
,國家(非必填)
指定搜尋結果的目標國家/地區(預設值:us)。請使用兩位字母的國家代碼(例如:us、ru、uk)。 如需完整的支援國家代碼清單,請參考:Google 國家代碼列表。
範例請求:
使用參數 product_id: 4887235756540435899
及 gl: ru
的範例結果。
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "gl=ru" \
-d "json=1"
hl
,語言(非必填)
設定搜尋結果的介面語言(預設值:en)。請使用標準語言代碼格式(例如:en、es、zh-CN)。 如需完整的支援語言代碼清單,請參考:Google 語言代碼列表。
範例請求:
使用參數 product_id: 4887235756540435899
及 hl: es
的範例結果。
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "hl=es"
地理位置
location
,位置(非必填)
模擬從特定位置發起搜索,此參數必須與 uule 參數搭配使用。若未指定,系統可能採用代理伺服器的地理位置。
範例請求:
使用參數 product_id
:4887235756540435899,location
:India,uule
:w+CAIQICIFSW5kaWE 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "location=India" \
-d "uule=w+CAIQICIFSW5kaWE"
uule
,UULE(非必填)
使用 Base64 编码目标地理位置,此参数必须与 location
参数配合使用。
範例請求:
使用參數 product_id
:4887235756540435899,location
:India,uule
:w+CAIQICIFSW5kaWE 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "location=India" \
-d "uule=w+CAIQICIFSW5kaWE"
搜尋類型
offers
,優惠結果(非必填)
獲取優惠結果的參數設定(取代先前的 seller=online 結果)。可設定為 1
或 true
。
注意:offers
參數不可與 offer_id
參數同時使用。
範例請求:
使用參數 product_id
: 4887235756540435899, offers
: 1 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "offers=1"
specs
,取得規格結果(非必填)
用於獲取規格結果的參數設定。可設定為 1
或 true
。
注意:specs
參數不可與 offer_id
參數同時使用。
範例請求:
使用參數 product_id
: 4887235756540435899, specs
: 1 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "specs=1"
reviews
,取得評論結果(非必填)
用於獲取評論結果的參數設定。可設定為 1
或 true
。
請注意:reviews
參數不可與 offer_id
參數同時使用。
範例請求:
使用參數 product_id:
4887235756540435899, reviews
: 1 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "reviews=1"
分頁
start
,結果位移量(非必填)
設定搜尋結果分頁的起始點(例如:"start
=30" 表示跳過前30筆結果,從第31筆結果開始顯示)。
範例請求:
使用參數 product_id
: 4887235756540435899, start
: 30 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "start=30"
page
,從頁面開始(非必填)
此參數用於定義 Google 線上商家的頁面編號,每頁顯示 10 筆結果。此參數等同於 start
(偏移量)= 頁碼 * 10。
注意:僅在啟用 offers 參數時可使用此功能。
範例請求:
使用參數 product_id
: 4887235756540435899, page
: 20 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "page=20"
高級篩選
filter
,進階搜尋參數(非必填)
此參數用於設定評論與優惠結果的篩選條件、排序方式及分頁設定。
優惠篩選條件:
freeship:1
僅顯示免運費商品
ucond:1
僅顯示二手商品
scoring:p
依基礎價格排序
scoring:tp
依總價排序
scoring:cpd
依當前促銷優惠排序
scoring:mrd
依賣家評分排序
範例請求:
使用參數 product_id: 4887235756540435899, filter:ucond:1 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "filter=ucond:1" \
-d "json=1"
offer_id
,優惠ID(非必填)
此參數用於定義從線上商家獲取多個優惠的ID,該ID可在 sellers_results.online_sellers 中找到。
注意:offer_id
參數不可與 offers
、specifications
及 reviews
參數同時使用。
範例請求:
使用參數 product_id
: 4887235756540435899, offer_id:detali 的範例結果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_product" \
-d "product_id=4887235756540435899" \
-d "json=1" \
-d "offer_id=detali"
如需進一步幫助,請透過 [email protected] 聯繫我們。
Last updated
Was this helpful?