> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google AI 概览 API：概览文本、来源与 SERP

> 搜索 Google，获取 AI 概览及其来源、商品和引用标签，以及它所在的结果页面。

`GOOGLE` 搜索 google.com，返回 AI 概览以及它所在的搜索结果页面。

| | |
| - | - |
| taskType | `GOOGLE` |
| 别名 | `GOOGLE_AIO` |
| 读取 | `query`（回退到 `prompt`） |
| 积分 | 1.25 |
| 国家 | 可选，默认 `US`。`CN` 从位于北京的设备查询 Google 美国市场。 |
| 位置 | 接受 `payload.location`。见[地区与位置](/zh/engines/capacity.md)。 |

## 请求

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "GOOGLE", "payload": { "query": "best CRM for a small team", "country": "US" } }'
```

## 响应

响应是一个搜索结果信封，AI 概览是其中一个可为空的成员 `aioverview`。

> [!WARNING]
>
> `aioverview: null` 表示 **Google 没有为该查询展示 AI 概览**。它不是错误：任务会完成，周围的结果字段仍会填充。

| 字段 | 类型 | 说明 |
| - | - | - |
| `aioverview` | object 或 `null` | AI 概览。字段见下文。 |
| `organicResults` | array | 自然搜索结果。 |
| `peopleAlsoAsk` | array | “相关问题”面板。 |
| `relatedSearches` | array | 相关搜索。 |
| `knowledgeGraph` | object | 知识面板。 |
| `ads` | array | 顶部和底部广告。 |
| `map` | array | 本地结果：`name`、`position`、`placeId`、`location`、`mapsUrl`、`reviews`、`category`、`price`、`snippet`、`image`。 |
| `serp` | object | 其他面板：`topStories`、`videoResults`、`localMap`、`discussionsAndForums`。 |
| `rawContent` | string | 渲染后的结果页 HTML。仅在设置 `include.rawResponse` 时返回。 |
| `text`、`sources` | | `aioverview.text` 和 `aioverview.sources` 的已弃用副本。新代码请读取 `aioverview.*`。 |

页面中没有的结果面板会被**省略**，不会输出 `null` 或 `[]`。请把每个面板都当作可选字段。

### `aioverview`

| 字段 | 类型 | 说明 |
| - | - | - |
| `text` | string | 概览文本。商品卡片标题保留在其中。 |
| `sources` | array | `position`、`url`、`label` 和 `description`。 |
| `markdown` | string | Markdown 格式的概览。仅在设置 `include.markdown` 或 `include.aioverview.markdown` 时返回。 |
| `shoppingCards` | array | 回答旁的商品卡片：`title`、`position`、`price`、`oldPrice`、`store`、`rating`、`reviews`、`thumbnail`、`productLink`。 |
| `inlineProducts` | array | 回答中带链接的商品名称：`title`、`position`、`productLink`。 |
| `citationPills` | array | 每个引用标签背后的每个来源各一项。 |
| `videos` | array | 概览展示的视频：`title`、`link`、`platform`、`channel`、`duration`。 |
| `sponsored` | array | 概览中的赞助内容：`label`、`title`、`advertiser`。 |

商品、引用标签、视频和赞助字段仅在概览展示它们时出现。`price.currency` 是页面显示的符号（`$`、`€`），`reviews` 保留 Google 的缩写（`2.3K`），`productLink` 是 Google 商品页面。

在 `citationPills` 中，同一标签的来源共享按回答顺序编号的 `citationPillId`，`position` 指向对应的 `aioverview.sources` 条目。仅由标签引用的页面也列在 `aioverview.sources` 中，位于概览列出的页面之后；Google 未显示标题时，其 `label` 为空字符串。每项包含 `label`、`url`、`domain`，Google 显示时还有 `site`、`description` 和 `thumbnail`。响应带有 `markdown` 时，`markdownOffset` 给出标签在其中的位置；`sponsored` 条目以同样方式带有 `labelOffset`、`markdownOffset` 和 `noteOffset`。

例如：

```json theme={"theme":"css-variables"}
{
  "aioverview": {
    "text": "Popular CRMs for small teams include HubSpot CRM and Pipedrive ...",
    "sources": [{ "position": 1, "url": "https://www.example.com/crm-guide" }],
    "citationPills": [
      { "label": "CRM guide for small teams", "citationPillId": 1, "url": "https://www.example.com/crm-guide", "domain": "example.com", "position": 1 }
    ]
  },
  "organicResults": [
    { "position": 1, "title": "The best CRM for small teams", "link": "https://www.example.com/crm-guide", "snippet": "..." }
  ],
  "relatedSearches": [{ "query": "free crm for small team" }],
  "text": "Popular CRMs for small teams include HubSpot CRM and Pipedrive ...",
  "sources": [{ "position": 1, "url": "https://www.example.com/crm-guide" }]
}
```

## Include 标志

| 标志 | 效果 |
| - | - |
| `markdown` | 添加 `aioverview.markdown`。`include.aioverview.markdown` 效果相同。 |
| `rawResponse` | 添加 `rawContent`，即渲染后的结果页。 |
| `html` | 添加 `html`，即可分享文件形式的结果页。见 [HTML 页面](/zh/engines/html-pages.md)。 |
| `analysis` | 添加 `analysis`，1 积分。见[回答分析](/zh/engines/answer-analysis.md)。 |
| `citationAnalysis` | 对概览运行[Citation Analysis](/zh/research/citation-analysis.md)。 |

`searchQueries`、`ads` 和 `shopping` 不起作用。见 [Markdown 与原始响应](/zh/engines/response-options.md)。如需不含概览、更快且只需 1 积分的自然结果，请使用 [Google 搜索](/zh/engines/google-serp.md)。

## 中国

Google 不向中国市场展示 AI 概览。因此 `CN` 任务会像中国大陆用户访问 Google 那样，从位于北京的设备查询 Google 美国市场（`gl=us`）。带有自己 `payload.location` 的任务则使用该位置。

## 相关内容

* [Google AI 概览产品页](https://querying.ai/zh/engines/google-ai-overviews)
* [Google AI 模式](/zh/engines/google-ai-mode.md)
* [引擎概览](/zh/engines/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.