# Google News

**SERP  API 谷歌 News查询参数**

使用 Thordata的 SERP API 配置谷歌News查询，包括本地化参数、以及“高级参数”输出选项。

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

</details>

## 高级参数

<details>

<summary><code>topic_token</code> <strong>，主题令牌（非必填）</strong></summary>

定义 Google 新闻主题识别码。它用于访问特定主题的新闻结果（例如，`'World', 'Business', 'Technology'`）。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`topic_token`:Technology的示例

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

</details>

<details>

<summary><code>publication_token</code><strong>，发布令牌（非必填）</strong></summary>

定义 Google 新闻出版物令牌。它用于访问来自特定出版商（例如，`'CNN', 'BBC', 'The Guardian'`）的新闻结果。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`publication_token`:BBC的示例

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

</details>

<details>

<summary><code>section_token</code><strong>，部分标记（非必填）</strong></summary>

定义 Google 新闻版块令牌。它用于访问特定主题的子部分。（例如，`“Business -> Economy”`）

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`section_token`:Business的示例

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

</details>

<details>

<summary><code>story_token</code> <strong>，故事代币（非必填）</strong></summary>

定义 Google 新闻报道识别码。它用于访问对特定故事的全面报道的新闻结果。

**示例请求：**

查询 `q` : <mark style="color:blue;">pizza</mark>,`story_token`:story的示例

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

</details>

<details>

<summary><code>so</code><strong>，排序依据（非必填）</strong></summary>

定义排序方法，结果可以按相关性或日期排序。默认情况下，结果按相关性排序。

**示例请求：**

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

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