> ## 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 } } }'
```

タスクは非同期で実行されます。結果は[非同期タスク](/ja/concepts/async-tasks.md)の説明に従って読んでください。

## パラメータ

| フィールド | 必須 | 説明 |
| - | - | - |
| `query` | はい(または `prompt`) | 検索クエリ、4,000文字まで。 |
| `prompt` | はい(または `query`) | `query` の代わりに受け付けます。両方を含むリクエストでは、`BING_SEARCH` は `prompt` を読みます。 |
| `country` | いいえ | 検索する市場。既定値は `US`。 |
| `include.markdown` | いいえ | `true` で、見出し、リスト、表を保った要約 `aioverview.markdown` を追加します。 |
| `include.rawResponse` | いいえ | `true` で結果ページ全体のHTMLを `rawContent` として追加します。 |

## レスポンス

例:

```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` | インライン引用の背後にあるソース1つにつき1エントリ。一緒に引用されたソースは同じ `citationPillId` を共有します。要約にインライン引用がなければ省略されます。 |
| `aioverview.markdown` | `include.markdown: true` のとき。 |
| `rawContent` | 結果ページのHTML。`include.rawResponse: true` のとき。 |
| `text`、`sources` | `aioverview.text` と `aioverview.sources` の非推奨のコピーで、要約がなければ空です。新しいコードでは `aioverview` を読んでください。 |

> [!WARNING]
>
> `aioverview: null` は、そのクエリで Bing がAI要約を表示しなかったことを意味します。エラーではなく、周囲の結果はそのまま返されます。

## 制限とエラー

* 4,000文字を超える `query`(または `prompt`)は `422 VALIDATION_ERROR` を返します。
* Bing はすべてのクエリに要約を書くわけではなく、検索型の質問は指示型より要約を得やすくなります。要約を表示すると、Bing は自然検索結果の一部を次のページへ移すため、そのページの `organicResults` は短くなります。
* その他のリクエストエラーは[エラー](/ja/concepts/errors.md)に記載しています。

## 関連

* [Bing Copilot](/ja/engines/bing-copilot.md): Microsoft のチャット回答
* [Markdownと生レスポンス](/ja/engines/response-options.md)


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