> ## 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.

# AI 搜索引擎：回答、引用与响应字段

> 每个 taskType 读取哪个 payload 字段、返回什么，以及哪些 include 标志真正生效。

`taskType` 选择引擎。包裹结果的信封对所有引擎都相同，不同的是其中的 `response` 对象。

<Note>
  **共提供九个回答界面**：`CHATGPT`、`GEMINI`、`PERPLEXITY`、`BING_COPILOT`、`GOOGLE`、`AIMODE`、
  `BING_SEARCH`、`NAVER_AI_BRIEF` 和 `NAVER_AI_TAB`。`GOOGLE_SERP` 返回不含 AI 概览的 Google 搜索结果，
  `NAVER_SERP` 返回 Naver 的网页结果，`REDDIT` 返回 Reddit 帖子和评论。
</Note>

## 引擎读取哪个 payload 字段

校验只要求 `prompt` 或 `query` 之一，且每个引擎都会回退读取另一个，因此用“错误”键发送的请求依然会执行。
下面两张卡片列出各引擎**优先**读取的字段，也就是 API 参考所记录、控制台 Playground 为该引擎发送的字段。

<CardGroup cols={2}>
  <Card title="读取 prompt" icon="message-square">
    `CHATGPT` `PERPLEXITY` `GEMINI` `BING_COPILOT`

    缺少 `prompt` 时回退到 `query`。
  </Card>

  <Card title="读取 query" icon="search">
    `GOOGLE` `AIMODE` `GOOGLE_SERP` `NAVER_AI_BRIEF` `NAVER_AI_TAB` `NAVER_SERP` `BING_SEARCH` `REDDIT`

    缺少 `query` 时回退到 `prompt`。
  </Card>
</CardGroup>

## 响应选项

所有回答引擎默认包含原始响应。将 `payload.include.rawResponse` 设为 `false` 即可省略。其他选项因引擎而异：

| 引擎 | 生效的标志 | 原始数据所在字段 |
| - | - | - |
| `CHATGPT` | `markdown` `html` `rawResponse` `searchQueries` `ads` `shopping` | `rawResponse` |
| `PERPLEXITY` | `markdown` `rawResponse` `searchQueries` | `rawResponse` |
| `GEMINI` | `markdown` `rawResponse` | `rawResponse` |
| `BING_COPILOT` | `markdown` `rawResponse` | `rawResponse` |
| `BING_SEARCH` | `markdown` `rawResponse` | **`rawContent`**（结果页 HTML） |
| `GOOGLE_SERP` | `rawResponse`（默认关闭） | **`rawContent`**（结果页 HTML） |
| `GOOGLE` `AIMODE` `NAVER_AI_BRIEF` `NAVER_AI_TAB` | `rawResponse` | **`rawContent`** |
| `NAVER_SERP` `REDDIT` | 无 | 无原始负载 |

<Note>
  `rawResponse` 包含解析后的流事件。Google AI 概览、AI 模式和 Bing 搜索以 `rawContent` 返回完整渲染后的页面 HTML；
  Naver 以 `rawContent` 字符串返回原始事件流。这些字段可能很大。如果只需要结构化结果，请设置
  `include.rawResponse: false`。`GOOGLE_SERP` 是例外：只有设置 `include.rawResponse: true` 时才返回页面 HTML。
</Note>

并非每个返回 `markdown` 的引擎都把它当作标志：Naver 始终返回 `markdown`，因为对它来说这是回答的真实形态，
而不是 `text` 的副本。

<Warning>
  不生效的标志会被静默忽略，不报错，也没有对应字段。尤其是 `html`，虽然多个引擎接受该标志，但只有 `CHATGPT` 会真正生成。
</Warning>

## 响应结构

<AccordionGroup>
  <Accordion title="PERPLEXITY">
    读取 `prompt`。始终返回 `text` 和 `sources[]`。

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "description": "..." }],
      "markdown": "...",
      "rawResponse": ["..."],
      "related_queries": ["..."],
      "search_model_queries": ["..."]
    }
    ```

    当 Perplexity 展示时才会出现的附加字段：`videos`、`images`、`hotels`、`places`、`shopping_cards`。
  </Accordion>

  <Accordion title="GEMINI">
    读取 `prompt`。始终返回 `text` 和 `sources[]`。

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "confidence_level": "..." }],
      "markdown": "...",
      "rawResponse": ["..."],
      "model": "...",
      "shoppingCards": [{ "title": "...", "position": 1, "price": { "value": 249.99, "currency": "$", "raw": "$249.99" }, "store": "...",
                         "rating": 4.7, "reviews": "14292", "thumbnail": "https://...", "productLink": "https://google.com/search?...&ibp=oshop..." }],
      "inlineProducts": [{ "title": "...", "position": 1, "productLink": "https://google.com/search?...&ibp=oshop..." }]
    }
    ```

    当回答展示商品时，`shoppingCards`（Gemini 在回答中绘制的商品卡片）和 `inlineProducts`（句子中带链接的商品名称）会以与 GOOGLE 概览相同的字段返回。卡片名称也保留在 `text` 中，句中的商品链接指向 Google 商品页面。
  </Accordion>

  <Accordion title="GOOGLE：SERP 信封中的 AI 概览">
    读取 `query`。这**不是**单独的 AI 概览对象，而是把 AI 概览作为一个可空成员的搜索结果信封。

    ```json theme={null}
    {
      "aioverview": {
        "text": "...",
        "sources": [{ "position": 1, "url": "https://..." }],
        "shoppingCards": [{ "title": "...", "position": 1, "price": { "value": 299.99, "currency": "$", "raw": "$299.99" },
                            "oldPrice": { "value": 399.99, "currency": "$", "raw": "$399.99" }, "store": "...",
                            "rating": 4.5, "reviews": "2.3K", "thumbnail": "https://...", "productLink": "https://www.google.com/search?ibp=oshop..." }],
        "inlineProducts": [{ "title": "...", "position": 1, "productLink": "https://www.google.com/search?ibp=oshop..." }]
      },
      "organicResults": [{ "...": "..." }],
      "peopleAlsoAsk": [{ "...": "..." }],
      "relatedSearches": [{ "...": "..." }],
      "knowledgeGraph": { "...": "..." },
      "ads": [{ "...": "..." }],
      "serp": { "topStories": [], "videoResults": [], "localResults": [] }
    }
    ```

    <Warning>
      `aioverview: null` 是明确的信号，表示 **Google 没有为该查询展示 AI 概览**。它不是错误，周围的 SERP 字段仍会填充。
    </Warning>

    顶层 `text` 和 `sources` 是复制 `aioverview.text` 与 `aioverview.sources` 的**已弃用别名**，保留它们是为了让旧的
    单独 AIO 结构的使用者继续工作。新代码请读取 `aioverview.*`。

    SERP 面板不存在时会被**省略**，而不是输出 `null` 或 `[]`，请把每个面板都当作可选字段。

    `aioverview.shoppingCards` 和 `aioverview.inlineProducts` 仅在概览展示商品时出现。卡片是 Google 在回答旁绘制的商品卡片，内联商品是句子中带链接的商品名称。卡片标题也会保留在 `aioverview.text` 中。`price.currency` 是页面显示的符号（`$`、`₩`、`円`），`reviews` 保留 Google 的缩写（`2.3K`），`productLink` 是 Google 商品页面。
  </Accordion>

  <Accordion title="AIMODE：Google AI 模式">
    读取 `query`。固定结构，没有 markdown。

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "..." }],
      "shoppingCards": [{ "...": "..." }],
      "inlineProducts": [{ "...": "..." }]
    }
    ```

    `shoppingCards` 和 `inlineProducts` 仅在回答展示商品时出现，字段与 GOOGLE 概览相同。
  </Accordion>

  <Accordion title="GOOGLE_SERP：不含 AI 概览的 Google 搜索结果">
    读取 `query`。以与 `GOOGLE` 相同的信封返回一个 google.com 结果页，但不含 AI 概览：没有 `aioverview`、`text` 或
    `sources`。它不等待概览，因此比 `GOOGLE` 更快，费用为 1 额度。设置 `payload.page`（1-10）获取更深的页面。

    ```json theme={null}
    {
      "organicResults": [
        { "position": 11, "title": "...", "link": "https://...", "displayedLink": "...", "snippet": "...", "page": 2 }
      ],
      "peopleAlsoAsk": [{ "...": "..." }],
      "relatedSearches": [{ "...": "..." }],
      "ads": [{ "...": "..." }],
      "page": 2
    }
    ```

    `organicResults` 始终存在。`position` 跨页累计，因此第 2 页的第一个结果是 11，每行都带有它所在的 `page`。
    `organicResults` 为空表示 Google 本身没有为该查询返回结果。其他面板在页面中没有时会被省略。设置
    `include.rawResponse: true` 还可以收到结果页 HTML，字段为 `rawContent`。
  </Accordion>

  <Accordion title="NAVER_SERP：Naver 搜索结果">
    读取 `query`。返回 Naver 网页文档（웹문서 标签页）结果的一页，每页 15 篇，费用 1 额度。设置 `payload.page`（1-10）
    获取更深的页面。`country` 默认为 `KR`。

    ```json theme={null}
    {
      "organicResults": [
        { "position": 16, "title": "...", "link": "https://...", "displayedLink": "example.com›path",
          "snippet": "...", "page": 2 }
      ]
    }
    ```

    `position` 跨页累计，因此第 2 页的第一篇文档是 16。已完成任务中的 `organicResults` 为空，表示 Naver 本身没有返回文档。
    若 Naver 将结果隐藏在年龄验证之后，响应中还会带有一个 `type` 为 `age_verification_required` 的 `notice`。

    如需读取某个 Naver 页面而非搜索，请发送 `"action": "page"` 和一个 naver.com `url`（博客、Cafe、新闻、百科、
    知识问答或任何其他 naver.com 页面）。响应为 `{ type, url, title, text, images, truncated }`，若页面提供，还会加上
    `author`、`publishedAt` 或 `cafeName`。`text` 截断于 `maxChars`（1,000-50,000，默认 20,000）。只接受 https 的
    naver.com URL（否则返回 422），跳转离开 naver.com 会使任务失败，仅会员可读的 Cafe 文章也是如此。

    此引擎不返回原始负载，因此 `include` 标志无效。
  </Accordion>

  <Accordion title="REDDIT：Reddit 帖子、评论和信息流">
    读取 `query`，以 1 额度搜索 Reddit 帖子。添加 `subreddit`（不含 `r/` 的名称）可只搜索一个子版块。

    ```json theme={null}
    {
      "results": [
        { "postId": "1uzk9m4", "title": "...", "url": "https://www.reddit.com/r/.../comments/1uzk9m4/...",
          "subreddit": "AskRunningShoeGeeks", "preview": "..." }
      ]
    }
    ```

    用帖子 `url`（`https://www.reddit.com/r/{subreddit}/comments/{postId}/...`）代替 `query`，即可读取该帖子及其第一页
    评论，约 20-25 条。`commentSort`（默认 `top`，也可为 `new`、`controversial`、`old`、`qa`）决定这一页的排序，
    `commentMaxDepth` 会去掉更深的回复（`0` 表示只保留顶层评论）。

    ```json theme={null}
    {
      "post": { "postId": "1uer62n", "title": "...", "body": "...", "author": "...", "subreddit": "...",
                "score": 12, "upvoteRatio": 0.9, "commentCount": 48, "createdAt": "2026-06-24T21:51:21.586000+0000",
                "archived": false, "url": "https://www.reddit.com/r/..." },
      "comments": {
        "availableCount": 24, "returnedCount": 24,
        "items": [{ "commentId": "otlz8m5", "author": "...", "body": "...", "score": 5, "depth": 0,
                    "isSubmitter": false, "createdAt": "...", "url": "https://www.reddit.com/r/..." }]
      }
    }
    ```

    `post.commentCount` 是帖子的全部评论数；`comments` 是实际读取的那一页。`archived` 根据帖子发布时长推算（Reddit
    约 180 天后锁定评论）。`"action": "feed"` 列出 `subreddit` 的最新帖子（不指定则为 r/popular），
    `"action": "user_posts"` 配合 `username` 列出该用户发布的内容；两者都像搜索一样返回 `results`，最多 `limit` 条（默认 25）。

    已完成任务中的 `results` 为空，表示 Reddit 没有找到任何内容。此引擎不返回原始负载，因此 `include` 标志无效。
  </Accordion>

  <Accordion title="CHATGPT">
    读取 `prompt`。这是本 API 中最丰富的响应，也是唯一所有 `include` 标志都生效的引擎。所有标志默认开启。

    ```json theme={null}
    {
      "text": "...",
      "model": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "footnote": "...", "datePublished": "..." }],
      "markdown": "...",
      "html": "...",
      "rawResponse": ["..."],
      "searchQueries": ["..."],
      "shoppingCards": [{ "...": "..." }],
      "inlineProducts": [{ "...": "..." }],
      "ads": [{ "...": "..." }],
      "entities": { "...": "..." },
      "citationPills": [{ "...": "..." }]
    }
    ```

    ChatGPT 还支持多轮对话，参见下方的多轮对话一节。
  </Accordion>

  <Accordion title="BING_COPILOT：Bing Copilot">
    读取 `prompt`。返回 copilot.com 上 Copilot 聊天的回答，网页搜索始终开启。不涉及账户或登录。`COPILOT` 仍被接受，
    并按 `BING_COPILOT` 运行。

    ```json theme={null}
    {
      "text": "Solar panels cut electricity bills ...",
      "sources": [{ "position": 1, "url": "https://...", "label": "..." }],
      "shoppingCards": [{ "type": "shoppingProducts", "layout": "inline", "products": [{ "position": 1, "name": "...", "url": "https://...", "price": { "amount": 69, "currencySymbol": "$" } }] }],
      "map": [{ "position": 1, "name": "...", "placeId": "...", "location": { "address": "...", "latitude": 40.75, "longitude": -73.98 }, "layerLabel": "..." }],
      "searchQueries": ["..."],
      "markdown": "...",
      "rawResponse": [{ "event": "appendText", "text": "..." }]
    }
    ```

    `sources` 是 Copilot 引用的页面；购物类问题常常没有引用，而是返回商品卡片，因此 `sources: []` 也是正常回答。
    `shoppingCards`、`map` 和 `searchQueries` 始终存在，Copilot 未生成时为空。商品位置在所有卡片中连续编号。
    `include.markdown` 为 `true` 时返回 `markdown`。
  </Accordion>

  <Accordion title="BING_SEARCH：带 AI 摘要的 Bing 搜索结果">
    读取 `query`。以与 `GOOGLE` 相同的信封返回 bing.com 结果页：自然结果、广告和相关搜索，以及 Bing 在其上方展示的
    AI 摘要（`aioverview`）。不涉及账户或登录。`BING` 和 `BING_COPILOT_SEARCH` 仍被接受，并按 `BING_SEARCH` 运行。

    ```json theme={null}
    {
      "surface": "bing_search",
      "organicResults": [
        { "position": 1, "title": "...", "link": "https://...", "displayedLink": "...", "snippet": "...", "date": "Aug 3, 2026", "page": 1 }
      ],
      "ads": [{ "position": 1, "title": "...", "link": "https://...", "displayedLink": "...", "description": "...", "blockPosition": "top" }],
      "relatedSearches": [{ "query": "...", "link": "https://www.bing.com/search?q=..." }],
      "aioverview": {
        "text": "Heat pumps move heat instead of generating it [1]. ...",
        "sources": [{ "position": 1, "url": "https://...", "label": "..." }],
        "citationPills": [
          { "citationPillId": 1, "position": 1, "url": "https://...", "label": "...", "domain": "example.com" }
        ],
        "markdown": "..."
      },
      "rawContent": "<!DOCTYPE html>..."
    }
    ```

    <Warning>
      `aioverview: null` 表示 **Bing 没有为该查询展示 AI 摘要**。它不是错误，周围的结果字段仍会填充。
    </Warning>

    在 `aioverview.text` 中，`[n]` 指向 `sources[n-1]`。每个 `citationPills[]` 条目是某个内联引用背后的一个来源；
    一起被引用的来源共享同一个 `citationPillId`。摘要中没有内联引用时省略该字段。`markdown` 保留标题、列表和表格，
    在 `include.markdown` 为 `true` 时返回。

    Bing 展示摘要时会把大部分自然结果移到下一页，因此有摘要时预计有两到三条 `organicResults`，没有时约九条。
    `ads` 和 `relatedSearches` 在页面没有时省略。`rawContent` 是完整结果页，设置 `include.rawResponse: false` 可省略。
    顶层 `text` 和 `sources` 是 `aioverview.text` 与 `aioverview.sources` 的已弃用副本（无摘要时为空）。

    Bing 并非为每个查询都生成摘要。搜索型问题（“热泵在寒冷天气里如何工作”）获得摘要的频率远高于指令型问题
    （“解释两个好处……”），英语以外语言的覆盖有限。
  </Accordion>

  <Accordion title="NAVER_AI_BRIEF 与 NAVER_AI_TAB">
    两者都读取 `query`，共享同一响应结构。

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "description": "..." }]
    }
    ```

    `NAVER_AI_BRIEF` 是 Naver SERP 上有条件出现的 AI 摘要框，某些查询可能不会出现。`NAVER_AI_TAB` 是始终可用的
    对话式 AI 标签页，也是 Naver 的主要界面；其 `text` 为 markdown 格式。

    `NAVER_AI_BRIEF` 还会在 `organicResults` 下返回位于摘要框下方的网页文档，这与 `GOOGLE` 在 AI 概览旁返回的字段相同：

    ```json theme={null}
    {
      "organicResults": [
        { "position": 1, "title": "...", "link": "https://...", "displayedLink": "example.com",
          "snippet": "...", "date": "2026.7.30.", "page": 1 }
      ]
    }
    ```

    摘要和文档来自两个不同的 Naver 端点，因此 `NAVER_AI_BRIEF` 与 `NAVER_AI_TAB` 一样收费 2 额度。如果文档获取失败，
    该字段会缺失而不是为空。

    <Note>
      `NAVER` 是 `NAVER_AI_BRIEF` 的已弃用别名。请使用明确的名称。
    </Note>
  </Accordion>
</AccordionGroup>

## 多轮对话（ChatGPT）

ChatGPT 可以保持对话。两个字段都省略时为默认的单轮行为。

<Steps>
  <Step title="开启对话">
    发送 `newConversation: true`。响应中会带有 `conversationId`。

    ```json theme={null}
    { "taskType": "CHATGPT", "payload": { "prompt": "...", "newConversation": true } }
    ```
  </Step>

  <Step title="继续对话">
    在下一轮把该 `conversationId` 发回。

    ```json theme={null}
    { "taskType": "CHATGPT", "payload": { "prompt": "...", "conversationId": "..." } }
    ```
  </Step>
</Steps>

<Warning>
  对话绑定到创建它的设备，大约两小时后过期。过期的 `conversationId` 无法继续。
</Warning>

## 引擎指南

* [ChatGPT](https://querying.ai/zh/engines/chatgpt)
* [Gemini](https://querying.ai/zh/engines/gemini)
* [Perplexity](https://querying.ai/zh/engines/perplexity)
* [Bing Copilot](https://querying.ai/zh/engines/bing-copilot)
* [Google AI 概览](https://querying.ai/zh/engines/google-ai-overviews)
* [Google AI 模式](https://querying.ai/zh/engines/google-ai-mode)
* [Naver AI 简报](https://querying.ai/zh/engines/naver-ai-brief)
* [Naver AI 标签页](https://querying.ai/zh/engines/naver-ai-tab)
