# Google Hotels

**SERP API 谷歌查詢參數**

使用 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_hotels" \
 -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_hotels" \
 -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_hotels" \
 -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_hotels" \
 -d "q=pizza" \
 -d "json=1" \
 -d "hl=es"
```

</details>

## 高級參數

<details>

<summary><code>check_in_date</code><strong>,</strong>入住日期<strong>（非必填）</strong></summary>

參數定義入住日期。格式為`YYYY-MM-DD`。例如`2025-08-22`

**示例請求：**

查询`q` ：<mark style="color:blue;">pizza</mark>,`check_in_date`:<mark style="color:blue;">2025-08-22</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_hotels" \
 -d "q=Bali Resorts" \
 -d "json=1" \
 -d "check_in_date=2025-08-22"
```

</details>

<details>

<summary><code>check_out_date</code> <strong>,</strong>退房日期<strong>（非必填）</strong></summary>

參數定義退房日期。格式為`YYYY-MM-DD`。例如2025-08-15`2025-08-23`

**示例請求：**

查询`q` ：<mark style="color:blue;">pizza</mark>,`check_out_date`:<mark style="color:blue;">2025-08-23</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_hotels" \
 -d "q=Bali Resorts" \
 -d "json=1" \
 -d "check_in_date=2025-08-22" \
 -d "check_out_date=2025-08-23"
```

</details>

<details>

<summary><code>adults</code> <strong>,</strong>人數<strong>（非必填）</strong></summary>

參數定義成人數。預設為`2`.

**示例請求：**

查询`q` ：<mark style="color:blue;">pizza</mark>,`adults`:<mark style="color:blue;">2</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_hotels" \
 -d "q=Bali Resorts" \
 -d "json=1" \
 -d "adults=2"
```

</details>

如需進一步幫助，請透過 **<support@thordata.com>** 聯繫我們。
