# Goole Finance

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

透過Thordata的SERP API配置谷歌財經查詢，支援本地化參數與進階參數輸出選項的定制功能。

<details>

<summary><strong><code>q</code> ，搜尋查詢必填)</strong></summary>

此參數定義了爬取時的搜尋結果，預設值為 pizza。您可以輸入任何想查詢的關鍵字，也可以使用任何語言。

**範例請求：**\
使用參數`q=pizza` 的範例值

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

</details>

## 本土化

<details>

<summary><strong><code>hl</code> ，</strong>語言<strong>（非必填）</strong></summary>

该參數定義了爬取時搜尋結果所使用的語言，預設值為 en。為兩位英文字母語言代碼（如：en, ru, es）。

**完整语言代码支持列表**\
请参阅 [Google官方语言代码表](https://developers.google.com/custom-search/docs/xml_results_appendices#interfaceLanguages)

**範例請求：**\
使用參數询`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_finance" \
 -d "q=pizza" \
 -d "json=1" \
 -d "hl=es"
```

</details>

## 高級參數

<details>

<summary><strong><code>window</code> ,</strong>時間範圍<strong>(非必填)</strong></summary>

參數用來設定圖形的時間範圍。可設定為：

`1D` - 1 天（預設）

`5D` - 5 天

`1M` - 1 個月

`6M` - 6 個月

`YTD` - 年初至今

`1Y` - 1 年

`5Y` - 5 年

`MAX` - 最大值

**範例請求**

使用參數的範例值： `q=GOOGL:NASDAQ`,`window`:6M

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

</details>

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