Google Lens
Google SERP API 查询参数配置
使用 Thordata 的 SERP API 可配置以下 Google lens查询参数,包括本地化设置、搜索类型及高级参数输出选项:
url ,图片URL(必填)
参数定义用于执行 Google Lens 搜索的图片 URL。 https://i.imgur.com/HBrB8p0.png
示例请求:
使用参数 url 的示例:https://i.imgur.com/HBrB8p0.png
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_lens" \
-d "url=https://i.imgur.com/HBrB8p0.png" \
-d "json=1"本地化
country ,国家(非必填)
指定搜索结果的目标国家/地区(默认值:us)。请使用两位字母的国家代码(例如:us、ru、uk)。 完整支持的国家代码列表,请参阅:Google 国家代码列表。
示例请求:
针对参数 q: pizza、country: ru 的示例结果
curl -X POST https://scraperapi.thordata.com/request \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer token" \
-d "engine=google_lens" \
-d "url=https://i.imgur.com/HBrB8p0.png" \
-d "gl=ru" \
-d "json=1"hl ,语言(非必填)
设置搜索结果的界面语言(默认值:en)。请采用标准语言代码格式(例如:en、es、zh-CN)。
完整支持的语言代码列表,请参阅:Google 语言代码列表。
示例请求:
针对参数 url: https://i.imgur.com/HBrB8p0.png、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_lens" \
-d "url=https://i.imgur.com/HBrB8p0.png" \
-d "json=1" \
-d "hl=es"搜索类型
type ,搜索类型(非必填)
此参数用于定义要执行的搜索类型,默认搜索类型为 all(全部)。
可用选项:
all- 全部products- 商品exact_matches- 完全匹配visual_matches- 视觉匹配
示例请求:
针对参数 url: https://i.imgur.com/HBrB8p0.png、type: products 的示例结果
高级参数
q ,搜索查询(非必填)
该参数用于定义 Google Lens 搜索所使用的查询词,仅在类型设置为 all(全部)、products(商品)或 visual_matches(视觉匹配)时生效。
示例请求:
针对参数 url: https://i.imgur.com/HBrB8p0.png、q: acting 的示例结果
safe ,成人内容过滤(非必填)
成人内容筛选设置:
safe=active– 严格过滤(默认值)safe=off– 不进行筛选
示例请求:
针对参数 url: https://i.imgur.com/HBrB8p0.png、safe: active 的示例结果
如果您需要更多帮助,请通过邮箱[email protected]联系我们。
Last updated
Was this helpful?