# Goole Play

**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_play" \
 -d "q=pizza" \
 -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_play" \
 -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_play" \
 -d "q=pizza" \
 -d "json=1" \
 -d "hl=es"
```

</details>

## 搜索类型

<details>

<summary><strong><code>apps_category</code> ,</strong>應用商店類別<strong>(非必填)</strong></summary>

定義應用商店類別

**範例請求：**\
使用參數的範例值： `q` : <mark style="color:blue;">pizza</mark>,**`apps_category`**:ANDROID\_WEAR

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

</details>

## 分頁

<details>

<summary><strong><code>next_page_token</code>,</strong>下一頁令牌<strong>(非必填)</strong></summary>

此參數定義下一页标记。它用于检索下一页结果。它不应与 `section_page_token`、`see_more_token`和 `chart`參數一起使用。

**範例請求：**\
使用參數的範例值： `q` : <mark style="color:blue;">pizza</mark>,`next_page_token`:GAME

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

</details>

<details>

<summary><strong><code>section_page_token</code> ,</strong>部分页面令牌<strong>(非必填)</strong></summary>

此參數用於定義檢索各分部頁面結果時使用的分頁標記。該參數是 `see_more_token` 的更安全版本，存在於所有可分頁的資料列中，不應與 `next_page_token`、`see_more_token` 及 `chart` 參數同時使用。

**範例請求：**\
使用參數的範例值： `q` : <mark style="color:blue;">pizza</mark>,**`section_page_token`**:serpapi\_pagination.next\_page\_token

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

</details>

<details>

<summary><code>chart</code> <strong>,</strong>图表<strong>(非必填)</strong></summary>

此參數用於顯示熱門圖表，最多可返回50筆結果。每個商店包含不同的圖表，需使用特定數值來檢索結果。若要取得特定圖表的值，可使用我們的 Google Play 應用商店 API JSON 輸出（例如 `chart_options[index].value 如 chart=topselling_free`）。該參數不得與 `section_page_token`、`see_more_token` 及 `next_page_toke`n 參數同時使用。

**範例請求：**\
使用參數的範例值： `q` : <mark style="color:blue;">pizza</mark>,`chart`:top\_free

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

</details>

<details>

<summary><code>see_more_token</code> <strong>,</strong>查看更多代币<strong>(非必填)</strong></summary>

該參數用於定義檢索各分部頁面結果的「查看更多」令牌。此令牌通常位於下一頁結果中，不得與 `section_page_token`、next\_page\_token 及 `chart` 參數同時使用。

**範例請求：**\
使用參數的範例值：`q` : <mark style="color:blue;">pizza</mark>,**`section_page_token`**:serpapi\_pagination.next\_page\_token

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

</details>

## 高级参数

<details>

<summary><code>store_device</code> <strong>,</strong>设备<strong>(非必填)</strong></summary>

該參數用於定義排序結果時使用的設備類型，不可與 apps\_category 或 q 參數同時使用。可用選項包括：

`phone` - 手機設備（預設值）\
`tablet` - 平板電腦設備\
`tv` - 電視設備\
`chromebook` - Chromebook 設備\
`watch` - 手錶設備\
`car` - 車載設備

**範例請求：**\
使用參數的範例值： `q` : <mark style="color:blue;">pizza</mark>,`store_device`:`phone`

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

</details>

<details>

<summary><code>age</code> <strong>,</strong>年龄<strong>(非必填)</strong></summary>

該參數用於定義年齡子類別，僅在 `apps_category=FAMILY`（兒童應用）條件下生效且必須搭配使用。可選項如下：

`AGE_RANGE1` - 5歲以下\
`AGE_RANGE2` - 6-8歲\
`AGE_RANGE3` - 9-12歲

**範例請求：**\
使用參數的範例值： `q` : <mark style="color:blue;">pizza</mark>,`age`:AGE\_RANGE1

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

</details>

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