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

# Bing 搜索结果与 AI 摘要 API（BING_SEARCH）

> 获取 bing.com 的自然结果、广告和相关搜索，以及 Bing 在其上方展示的 AI 摘要。

`BING_SEARCH` 加载某个查询的 bing.com 结果页，返回其中的自然结果、广告和相关搜索，以及 Bing 在其上方展示的 AI 摘要（`aioverview`）。不涉及账户或登录。

| | |
| - | - |
| `taskType` | `BING_SEARCH`（别名 `BING`、`BING_COPILOT_SEARCH`） |
| 输入 | `query` 或 `prompt`（必填），最多 4,000 个字符；`country`、`include` |
| 积分 | 每个任务 1 积分 |
| 国家 | 默认 `US`。可使用任意 ISO 3166-1 alpha-2 代码。 |
| 位置 | 不支持（`422 LOCATION_UNSUPPORTED`）。 |

## 请求

```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": "BING_SEARCH", "payload": { "query": "how does a heat pump work in cold weather", "country": "US", "include": { "markdown": true } } }'
```

任务异步执行。按[异步任务](/zh/concepts/async-tasks.md)中的说明读取结果。

## 参数

| 字段 | 必填 | 说明 |
| - | - | - |
| `query` | 是，或 `prompt` | 搜索查询，最多 4,000 个字符。 |
| `prompt` | 是，或 `query` | 可代替 `query`。请求同时包含两者时，`BING_SEARCH` 读取 `prompt`。 |
| `country` | 否 | 要搜索的市场，默认 `US`。 |
| `include.markdown` | 否 | 设为 `true` 时附带 `aioverview.markdown`，即保留标题、列表和表格的摘要。 |
| `include.rawResponse` | 否 | 设为 `true` 时以 `rawContent` 附带完整结果页 HTML。 |

## 响应

例如：

```json theme={"theme":"css-variables"}
{
  "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": "..."
  },
  "text": "Heat pumps move heat instead of generating it [1]. ...",
  "sources": [{ "position": 1, "url": "https://...", "label": "..." }]
}
```

| 字段 | 说明 |
| - | - |
| `surface` | 始终为 `bing_search`。 |
| `organicResults` | 页面上的自然结果。 |
| `ads` | 广告，页面没有时省略。 |
| `relatedSearches` | 相关搜索，页面没有时省略。 |
| `aioverview` | Bing 的 AI 摘要；Bing 未展示时为 `null`。 |
| `aioverview.text` | 摘要正文。`[n]` 指向 `aioverview.sources[n-1]`。 |
| `aioverview.sources` | 摘要引用的页面。 |
| `aioverview.citationPills` | 每个内联引用背后的每个来源各一项；一起被引用的来源共享同一个 `citationPillId`。摘要中没有内联引用时省略。 |
| `aioverview.markdown` | 需设置 `include.markdown: true`。 |
| `rawContent` | 结果页 HTML，需设置 `include.rawResponse: true`。 |
| `text`、`sources` | `aioverview.text` 与 `aioverview.sources` 的已弃用副本，无摘要时为空。新代码请读取 `aioverview`。 |

> [!WARNING]
>
> `aioverview: null` 表示 Bing 没有为该查询展示 AI 摘要。它不是错误，周围的结果仍会返回。

## 限制与错误

* `query`（或 `prompt`）超过 4,000 个字符时返回 `422 VALIDATION_ERROR`。
* Bing 并非为每个查询都生成摘要；搜索型问题比指令型问题更常获得摘要。展示摘要时，Bing 会把部分自然结果移到下一页，因此这类页面上的 `organicResults` 更少。
* 其他请求错误见[错误](/zh/concepts/errors.md)。

## 相关内容

* [Bing Copilot](/zh/engines/bing-copilot.md)：Microsoft 的聊天回答
* [Markdown 与原始响应](/zh/engines/response-options.md)


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