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?