# Google Lens

## Google SERP API 查询参数配置

使用 Thordata 的 SERP API 可配置以下 Google lens查询参数，包括本地化设置、搜索类型及高级参数输出选项：

<details>

<summary><code>url</code> <strong>,</strong>图片URL<strong>(必填)</strong></summary>

参数定义用于执行 Google Lens 搜索的图片 URL。\
<https://i.imgur.com/HBrB8p0.png>

示例请求：\
使用参数 `url` 的示例：<https://i.imgur.com/HBrB8p0.png>

```sh
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"
```

</details>

## 本地化

<details>

<summary><code>country</code> <strong>,</strong>国家<strong>(非必填)</strong></summary>

指定搜索结果的目标国家/地区（默认值：us）。请使用两位字母的国家代码（例如：us、ru、uk）。\
完整支持的国家代码列表，请参阅：[Google 国家代码列表](https://developers.google.com/custom-search/docs/xml_results#countryCodes)。

**示例请求：**

针对参数 `q: pizza`、`country: ru` 的示例结果

```sh
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"
```

</details>

<details>

<summary><strong><code>hl</code> ,</strong>语言<strong>(非必填)</strong></summary>

设置搜索结果的界面语言（默认值：en）。请采用标准语言代码格式（例如：`en`、`es`、`zh-CN`）。\
完整支持的语言代码列表，请参阅：[Google 语言代码列表](https://developers.google.com/custom-search/docs/xml_results#languageCollections)。

**示例请求：**

针对参数 `url: https://i.imgur.com/HBrB8p0.png`、`hl: es` 的示例结果

```sh
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"
```

</details>

## 搜索类型

<details>

<summary><code>type</code> <strong>,</strong>搜索类型<strong>(非必填)</strong></summary>

此参数用于定义要执行的搜索类型，默认搜索类型为 `all`（全部）。

**可用选项：**

* `all` - 全部
* `products` - 商品
* `exact_matches` - 完全匹配
* `visual_matches` - 视觉匹配

**示例请求：**

针对参数 `url: https://i.imgur.com/HBrB8p0.png`、`type: products` 的示例结果

```sh
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 "type=products"
```

</details>

## 高级参数

<details>

<summary><code>q</code> <strong>,</strong>搜索查询<strong>(非必填)</strong></summary>

该参数用于定义 Google Lens 搜索所使用的查询词，仅在类型设置为 `all`（全部）、`products`（商品）或 `visual_matches`（视觉匹配）时生效。

**示例请求：**

针对参数 `url: https://i.imgur.com/HBrB8p0.png`、`q: acting` 的示例结果

```sh
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 "q=acting" \
 -d "type=all"
```

</details>

<details>

<summary><strong><code>safe</code> ,</strong>成人内容过滤<strong>(非必填)</strong></summary>

**成人内容筛选设置：**

* `safe=active` – 严格过滤（默认值）
* `safe=off` – 不进行筛选

**示例请求：**

针对参数 `url: https://i.imgur.com/HBrB8p0.png`、`safe: active` 的示例结果

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google" \
 -d "q=pizza" \
 -d "json=1" \
 -d "safe=active"
```

</details>

如果您需要更多帮助，请通过邮&#x7BB1;**<support@thordata.com>**&#x8054;系我们。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.thordata.com/doc/zh/pa-qu/serp-api/cha-xun-can-shu/gu-ge/google-lens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
