# Google Maps

**SERP API Google 查詢參數**

使用 Thordata 的 SERP API 配置 Google 搜索查詢，包括本地化參數、地理定位、搜索類型、分頁以及「高級參數」輸出選項。

<details>

<summary><strong><code>q</code> ，</strong>搜尋查詢<strong>(必填)</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_maps" \
 -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_maps" \
 -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_maps" \
 -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_maps" \
 -d "q=pizza" \
 -d "json=1" \
 -d "hl=es"
```

</details>

## 分頁

<details>

<summary><strong><code>start</code> ，結果偏移量（非必填）</strong></summary>

此參數定義結果偏移量。它會跳過指定數量的結果。它用於分頁。 （例如，0（預設值）表示第一頁結果，10 表示第二頁結果，20 表示第三頁結果，以此類推。）

**示例請求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`start`:<mark style="color:blue;">30</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_maps" \
 -d "q=pizza" \
 -d "json=1" \
 -d "start=30"
```

</details>

## 地理位置

<details>

<summary><code>ll</code> <strong>,</strong>GPS 座標<strong>（非必填）</strong></summary>

GPS 參數用於定義搜索來源位置的座標，其值必須符合以下格式：\
`@` + 緯度 + `,` + 經度 + `,` + 縮放級別\
例如：\
`@40.7455096,-74.0083012,14z`

**請求範例：**\
查詢參數 `q`（關鍵字）：`pizza`，並搭配 `ll`（定位參數）：\
`@40.7455096,-74.0083012,14z`

```
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_maps" \
 -d "q=pizza" \
 -d "json=1" \
 -d "ll=@40.7455096,-74.0083012,14z"
```

</details>

## 搜尋類型

<details>

<summary><code>type</code> <strong>,</strong>搜尋類型<strong>（非必填）</strong></summary>

搜尋參數定義了要執行的搜尋類型，它可以設定為：\
`search` - 當 q 參數設定時，返回結果列表，\
`place` - 當 data 參數設定時，返回特定地點的結果\
使用 place\_id 或 data\_cid 時不需要參數。

**範例請求：**

`q` : pizza,`type`:search 的範例結果

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

</details>

## 高級參數

<details>

<summary><code>data</code> <strong>,</strong>數據<strong>（非必填）</strong></summary>

參數可用於篩選搜尋結果。您可以訪問 Google 地圖網站，設定所需的篩選條件，然後直接從其 URL 中複製數據值到 SerpApi 的 URL。

**範例請求：**

`q` : pizza,`data`:20250815 的範例結果

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

</details>

<details>

<summary><code>place_id</code> <strong>,</strong>地點 ID<strong>（非必填）</strong></summary>

參數定義了 Google 地圖中地點的唯一參照。`Place ID` 適用於大多數地點，包括商家、地標、公園和交叉路口。您可以使用我們的 Google Maps API 來查詢 `place_id`。

**範例請求：**

**`q`** : pizza,`place_id`:541541233999 的範例結果

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

</details>

<details>

<summary><code>data_cid</code> <strong>,</strong>Google CID<strong>（非必填）</strong></summary>

參數定義了 Google 地圖中地點的 CID（客戶識別碼）。此參數可在 Google Maps API 本地結果、Google Search API 和 Google Local API 本地結果中找到，名稱為 place\_id。您也可以使用 Google 的 CID 轉換工具來取得它。

**範例請求：**

`q` : pizza,`data_cid`:001 的範例結果

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

</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-hk/pa-qu/serp-api/cha-xun-can-shu/gu-ge/google-maps.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.
