# SERP API Google 查詢參數

了解 Thordata 的 SERP API - Google 搜尋的查詢參數。

**搜尋詞**\
範例：

```sh
curl -k "https://www.google.com/search?q=pizza" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="75">參數</th><th width="123">名稱</th><th width="286">作用</th><th>參數值</th></tr></thead><tbody><tr><td>q</td><td>搜索詞</td><td>指定搜索關鍵詞</td><td>q=pizza</td></tr></tbody></table>

**本地化**\
指定搜尋結果的語言與習慣用法。範例：

```sh
curl -k "https://www.google.ac/search?q=pizza&gl=af&hl=ach" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="75">參數</th><th width="115">名稱</th><th width="292">作用</th><th>參數值</th></tr></thead><tbody><tr><td>hl</td><td>語言</td><td>指定搜索結果的界面語言</td><td>hl=en，hl=zh-CN...</td></tr><tr><td>gl</td><td>國家</td><td>指定搜索結果按照該國家用戶的習慣展示</td><td>gl=US，gl=CN...</td></tr></tbody></table>

**地理位置**\
指定搜尋的地理編碼位置，會變更搜尋地點。你可以在此下載所有可用值的文件。\
範例：

```sh
curl -k "https://www.google.ac/search?q=pizza&uule=w+CAIQICIXS2FidWwsS2FidWwsQWZnaGFuaXN0YW4" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="79">參數</th><th width="111">名稱</th><th width="284">作用</th><th>參數值</th></tr></thead><tbody><tr><td>uule</td><td>地理位置</td><td>指定基於坐標的精準地理位置（Base64編碼）</td><td>uule=w+CAIQICINVW5pdGVkIFN0YXRlcw</td></tr></tbody></table>

**搜尋類型**\
用於定義搜尋類別。一般搜尋不需要 tbm 參數，其它類型則對應不同的 tbm 值。\
範例：

```sh
curl -k "https://www.google.ac/search?q=pizza&tbm=isch" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="87">參數</th><th width="112">名稱</th><th width="284">作用</th><th>參數值</th></tr></thead><tbody><tr><td>tbm</td><td>搜索類型</td><td>指定搜索類型</td><td>tbm=nws<br>tbm=vid<br>tbm=isch<br>tbm=shop</td></tr></tbody></table>

**分頁**\
用於設定結果的偏移量與返回的筆數。\
範例：

```sh
curl -k "https://www.google.ac/search?q=pizza&start=10&num=100" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="80">參數</th><th width="105">名稱</th><th width="299">作用</th><th>參數值</th></tr></thead><tbody><tr><td>start</td><td>分頁</td><td>指定搜索頁數（偏移量）</td><td>start=10（顯示第2頁）/00/10.../100</td></tr><tr><td>num</td><td>每頁結果數</td><td>指定搜索結果每頁結果數量</td><td>num=100（最多 100 條）1....100</td></tr></tbody></table>

**安全性**\
用來設定是否過濾成人內容。範例：

```sh
curl -k "https://www.google.ac/search?q=pizza&safe=active" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="73">參數</th><th width="81">名稱</th><th width="335">作用</th><th>參數值</th></tr></thead><tbody><tr><td>safe</td><td>安全</td><td>主要用於屏蔽露骨的成人內容（如色情、暴力等）</td><td>safe=active（開啟）<br>safe=off（關閉）</td></tr></tbody></table>

**解析**\
Thordata 自定義參數，讓你可獲得解析後的 JSON 格式結果，而非原始 HTML。範例：

```sh
curl -k "https://www.google.ac/search?q=pizza&json=1" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

<table><thead><tr><th width="72">參數</th><th width="82">名稱</th><th width="329">作用</th><th>參數值</th></tr></thead><tbody><tr><td>json</td><td>解析</td><td>指定輸出結果格式</td><td>無无json值（返回HTML值）<br>json=1（返回JSON值）<br>json=2（返回JSON+HTML值）</td></tr></tbody></table>


---

# 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/serp-api-google-cha-xun-can-shu.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.
