> ## 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：回答、Markdown 与来源

> 向 Google AI 模式提问，以文本和 Markdown 获取回答，以及来源、商品和引用标签。

`AIMODE` 向 Google AI 模式提问，返回始终带 Markdown 的回答及其背后的来源。

| | |
| - | - |
| taskType | `AIMODE` |
| 别名 | `GOOGLE_AIMODE` |
| 读取 | `query`（回退到 `prompt`） |
| 积分 | 1.25 |
| 国家 | 可选，默认 `US`。`CN` 直接按 Google 中国市场提问，不像 AI 概览那样换成美国市场。 |
| 位置 | 接受 `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": "AIMODE", "payload": { "query": "best CRM for a small team", "country": "US" } }'
```

## 响应

与 [Google AI 概览](/zh/engines/google-ai-overviews.md)不同，AI 模式直接返回回答，而不是结果页信封。

| 字段 | 类型 | 说明 |
| - | - | - |
| `text` | string | 回答。始终存在。 |
| `markdown` | string | Markdown 格式的回答。无需任何标志即返回。 |
| `sources` | array | `position`、`url`、`label`、`description`。 |
| `shoppingCards`、`inlineProducts` | array | 回答中的商品，字段与 AI 概览相同。 |
| `citationPills` | array | 每个引用标签背后的来源，字段与 AI 概览相同。 |
| `videos` | array | 回答展示的视频。 |
| `rawContent` | string | 渲染后的页面 HTML。仅在设置 `include.rawResponse` 时返回。 |

商品、引用标签和视频字段仅在回答展示它们时出现。

例如：

```json theme={"theme":"css-variables"}
{
  "text": "For a small team, start with HubSpot CRM or Pipedrive ...",
  "markdown": "For a small team, start with **HubSpot CRM** or **Pipedrive** ...",
  "sources": [{ "position": 1, "url": "https://www.example.com/crm-guide", "label": "CRM guide for small teams" }]
}
```

Google 加载了页面，但在两个全新会话中都没有返回回答时，任务会以 `ENGINE_NO_RESULT` 失败，而不是继续等待。

## Include 标志

| 标志 | 效果 |
| - | - |
| `rawResponse` | 添加 `rawContent`。 |
| `html` | 添加 `html`，即 Google 显示的页面。见 [HTML 页面](/zh/engines/html-pages.md)。 |
| `analysis` | 添加 `analysis`，1 积分。见[回答分析](/zh/engines/answer-analysis.md)。 |
| `citationAnalysis` | 对回答运行[Citation Analysis](/zh/research/citation-analysis.md)。 |

`markdown` 无需标志。`searchQueries`、`ads` 和 `shopping` 不起作用。见 [Markdown 与原始响应](/zh/engines/response-options.md)。

## 相关内容

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


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