SERP API Google 查詢參數

了解 Thordata 的 SERP API - Google 搜尋的查詢參數。

搜尋詞 範例:

curl -k "https://www.google.com/search?q=pizza" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

q

搜索詞

指定搜索關鍵詞

q=pizza

本地化 指定搜尋結果的語言與習慣用法。範例:

curl -k "https://www.google.ac/search?q=pizza&gl=af&hl=ach" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

hl

語言

指定搜索結果的界面語言

hl=en,hl=zh-CN...

gl

國家

指定搜索結果按照該國家用戶的習慣展示

gl=US,gl=CN...

地理位置 指定搜尋的地理編碼位置,會變更搜尋地點。你可以在此下載所有可用值的文件。 範例:

curl -k "https://www.google.ac/search?q=pizza&uule=w+CAIQICIXS2FidWwsS2FidWwsQWZnaGFuaXN0YW4" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

uule

地理位置

指定基於坐標的精準地理位置(Base64編碼)

uule=w+CAIQICINVW5pdGVkIFN0YXRlcw

搜尋類型 用於定義搜尋類別。一般搜尋不需要 tbm 參數,其它類型則對應不同的 tbm 值。 範例:

curl -k "https://www.google.ac/search?q=pizza&tbm=isch" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

tbm

搜索類型

指定搜索類型

tbm=nws tbm=vid tbm=isch tbm=shop

分頁 用於設定結果的偏移量與返回的筆數。 範例:

curl -k "https://www.google.ac/search?q=pizza&start=10&num=100" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

start

分頁

指定搜索頁數(偏移量)

start=10(顯示第2頁)/00/10.../100

num

每頁結果數

指定搜索結果每頁結果數量

num=100(最多 100 條)1....100

安全性 用來設定是否過濾成人內容。範例:

curl -k "https://www.google.ac/search?q=pizza&safe=active" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

safe

安全

主要用於屏蔽露骨的成人內容(如色情、暴力等)

safe=active(開啟) safe=off(關閉)

解析 Thordata 自定義參數,讓你可獲得解析後的 JSON 格式結果,而非原始 HTML。範例:

curl -k "https://www.google.ac/search?q=pizza&json=1" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
參數
名稱
作用
參數值

json

解析

指定輸出結果格式

無无json值(返回HTML值) json=1(返回JSON值) json=2(返回JSON+HTML值)

Last updated

Was this helpful?