# Google Images

**SERP  API 谷歌 Images 查询参数**

使用 Thordata的 SERP API 配置谷歌图片查询，包括本地化参数、地理位置、时间段、分页、以及“高级筛选”输出选项。

<details>

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

定义用于数据抓取的搜索查询（默认值：`q=pizza`）。支持任何语言的任意关键词。

**示例请求：**

使用`q`：<mark style="color:blue;">pizza</mark>参数的示例

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

</details>

## 本土化

<details>

<summary><strong><code>google_domain</code>，域名(非必填)</strong></summary>

定义用于数据抓取的搜索引擎域名（默认值：google.com）。

您可在系统中修改此参数或参考[Google域名页面](https://domains.squarespace.com/)获取完整支持的域名列表。

**示例请求：**

查询  `q` ：<mark style="color:blue;">pizza</mark> ，`url` ：<mark style="color:blue;">google.co.ao</mark>的示例结果

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

</details>

<details>

<summary><strong><code>gl</code> ，国家(非必填)</strong></summary>

指定搜索结果的定位国家/地区（默认值：`us`）。采用两位字母国家代码（如：`us`-美国，`ru`-俄罗斯，`uk`-英国）。

完整国家代码支持列表请参阅：[Google官方国家代码表](https://developers.google.com/adwords/api/docs/appendix/geotargeting)

**示例请求：**

查询 `q` ：<mark style="color:blue;">pizza</mark>,`gl`<mark style="color:blue;">：ru</mark>的示例结果

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

</details>

<details>

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

设置搜索结果的界面语言（默认值：`en`）。采用标准语言代码格式（如：`en`-英文，`es`-西班牙文，`zh-CN`-简体中文）。

完整语言代码支持列表请参阅：[Google官方语言代码表](https://developers.google.com/google-ads/api/docs/start)

**示例请求：**

查询`q` ：<mark style="color:blue;">pizza</mark>,`hl`： <mark style="color:blue;">es</mark>的示例结果

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

</details>

<details>

<summary><strong><code>cr</code>，设置多个国家/地区(非必填)</strong></summary>

限制结果至特定国家，使用 `|` 作为分隔符（例如：`countryFR|countryDE`）。可与 `gl` 参数配合使用以确保界面/内容语言一致。

`gl` 和 `cr` 参数可组合使用，但实际效果以 `cr` 参数为优先。

**示例请求：**

查询`q` : <mark style="color:blue;">pizza</mark>,`cr`: <mark style="color:blue;">countryAI|countryAQ</mark>的示例结果

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

</details>

## 地理位置

<details>

<summary><strong><code>location</code>，地理位置(非必填)</strong></summary>

模拟从精确位置发起搜索，必须与 **`uule`** 参数搭配使用。若未指定，则可能采用代理服务器的地理位置。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`location`:<mark style="color:blue;">India</mark>,`uule`:<mark style="color:blue;">w+CAIQICIFSW5kaWE</mark>的示例结果

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_images" \
 -d "q=pizza" \
 -d "json=1" \
 -d "location=India" \
 -d "uule=w+CAIQICIFSW5kaWE"
```

</details>

<details>

<summary><strong><code>uule</code> ，</strong>编码位置<strong>(非必填)j</strong></summary>

使用 Base64 编码目标地理位置，需与 **`location`** 参数配合使用。

**示例请求：**

查询  `q` : <mark style="color:blue;">pizza</mark>,`location`:<mark style="color:blue;">India</mark>,`uule`:<mark style="color:blue;">w+CAIQICIFSW5kaWE</mark>的示例

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_images" \
 -d "q=pizza" \
 -d "json=1" \
 -d "location=India" \
 -d "uule=w+CAIQICIFSW5kaWE"
```

</details>

## 时间段

<details>

<summary><strong><code>period_unit</code> ，时间段（非必填）</strong></summary>

定义搜索最近图像的时间段单位，例如，从过去的分钟、小时、日期等。

`s` - 秒

`n` - 分钟

`h` - 小时

`d` - 天

`w` - 周

`m` - 月

`y` - 年

此参数不能与`start_date/end_date`参数一起使用。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`period_unit`:<mark style="color:blue;">h</mark>的示例

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

</details>

<details>

<summary><strong><code>period_value</code>，时间段值（非必填）</strong></summary>

定义一个可选的时间段值，该值可与 `period_unit` 一起使用，以描述 15 秒 、42 小时 、178 天等时间段。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`period_value`:<mark style="color:$primary;">178 day</mark>的示例

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

</details>

<details>

<summary><strong><code>start_date</code> ，开始日期（非必填）</strong></summary>

定义要将图像搜索限制到的时间段的开始日期 格式：YYYYMMDD 例如：20250801

此参数不能与`period_unit/period_value`参数一起使用。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`start_date`:<mark style="color:$primary;">20250801</mark>的示例

<pre class="language-sh"><code class="lang-sh"><strong>curl -X POST https://scraperapi.thordata.com/request \
</strong> -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_images" \
 -d "q=pizza" \
 -d "json=1" \
 -d "start_date=20250801"
</code></pre>

</details>

<details>

<summary><strong><code>end_date</code> ，结束日期（非必填）</strong></summary>

定义要将图像搜索限制到的时间段的结束日期 格式：YYYYMMDD 例如：20250801

此参数不能与`period_unit/period_value`参数一起使用。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`end_date`:20250801的示例

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

</details>

## 高级参数

<details>

<summary><strong><code>chips</code>，图像搜索筛选器 （替代）（非必填）</strong></summary>

参数用于筛选图像搜索。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`ludocid`:<mark style="color:blue;">size</mark>的示例

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

</details>

<details>

<summary><strong><code>tbs</code> ，高级搜索条件（非必填）</strong></summary>

时间/类型筛选（支持复杂条件），比如`tbs=qdr:d qdr:d=24`小时内的内容；再比如`tbs=sur:f`,表示结果仅展示图片

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`tbs`:<mark style="color:blue;">sur:f</mark>的示例

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

</details>

<details>

<summary><strong><code>imgar</code>，纵横比过滤（非必填）</strong></summary>

参数定义图像的设置纵横比。

选项：

`s` - 方形

`t` - 高

`w` - 宽

`xw` - 全景

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,**`imgar`**:<mark style="color:blue;">s</mark>的示例

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

</details>

<details>

<summary><strong><code>imgsz</code> ，图像大小筛选（非必填）</strong></summary>

参数定义图像的大小。\
选项：\
`l` - 大\
`m`- 中\
`i`- 图标\
`qsvga`- 大于 400×300\
`vga`- 大于 640×480\
`svga`- 大于 800×600\
`xga`- 大于 1024×768\
`2mp`- 大于 2 MP - 大于 4 MP\
`4mp`- 大于 6 MP\
`6mp`- 大于\
`8mp`8 MP - 大于 10 MP\
`10mp`- 大于 12\
`12mp`MP - 大于\
`15mp`15 MP -\
`20mp`大于 20 MP\
`40mp`- 大于 40 MP\
`70mp`- 大于 70 MP

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,**`imgsz`**:<mark style="color:$primary;">qsvga</mark>的示例

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

</details>

<details>

<summary><strong><code>image_color</code> ，图像颜色过滤（非必填）</strong></summary>

定义图像的类型。

选项：\
`bw` - 黑白\
`trans`- 透明\
`red`- 红色\
`orange`- 橙色\
`yellow`- 黄色\
`green`- 绿色\
`teal`-青色\
`blue`- 蓝色\
`purple`- 紫色\
`pink`- 粉色\
`white`- 白色\
`gray`- 灰色\
`black`- 黑色\
`brown`- 棕色

**示例请求：**

查询  `q` : <mark style="color:blue;">pizza</mark>,**`image_color`**:<mark style="color:$success;">animated</mark>的示例

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

</details>

<details>

<summary><strong><code>image_type</code>，图像类型筛选（非必填）</strong></summary>

参数定义图像类型。\
选项：\
`face` - 人脸\
`photo`- 照片\
`clipart`- 剪贴画\
`lineart`- 线条画\
`animated`- 动画

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`image_type`:face的示例

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

</details>

<details>

<summary><strong><code>licenses</code> ，使用权限筛选（非必填）</strong></summary>

参数定义图像的许可范围。\
选项：\
`f` - 免费使用或共享\
`fc`- 免费使用或共享，甚至用于商业用途\
`fm`- 免费使用、共享或修改\
`fmc`- 免费使用、共享或修改，甚至用于商业用途\
`cl`- 知识共享许可\
`ol`- 商业及其他许可

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`licenses`:<mark style="color:blue;">f</mark>的示例

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

</details>

<details>

<summary><strong><code>safe</code> ，</strong>成人内容过滤<strong>（非必填）</strong></summary>

该参数定义了搜索结果是否屏蔽成人内容。您可设置为 `active` 或者 `off` ，通常情况下，Google会对露骨内容进行模糊处理。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`safe`:<mark style="color:blue;">active</mark>的示例

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

</details>

<details>

<summary><strong><code>nfpr</code> ，排除自动更正结果（非必填）</strong></summary>

定义是否禁用自动纠正拼写，比如：`nfpr=1` ，搜索“googl”不自动纠正为“google”

**示例请求：**

查询  `q` : <mark style="color:blue;">pizza</mark>,`nfpr`:<mark style="color:blue;">1</mark>的示例

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

</details>

<details>

<summary><strong><code>filter</code> ，结果筛选（非必填）</strong></summary>

定义去重结果: `1` (启用), `0` (禁用).

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`filter`:1的示例

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

</details>

## 分页

<details>

<summary><code>ijn</code><strong>，页码（非必填）</strong></summary>

每页包含 100 张图片。此参数相当于`start (offset) = ijn * 100`。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`start`:<mark style="color:blue;">100</mark>的示例

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

</details>

如果您需要更多帮助，请通过邮箱<support@thordata.com>联系我们。


---

# 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-images.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.
