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

# Gemini API: 回答、グラウンディングの出典、商品カード

> Google Geminiに質問し、回答、グラウンディングの出典、商品、場所、動画を受け取ります。

`GEMINI` は Google Gemini に質問し、回答とその根拠にした出典を返します。

| | |
| - | - |
| taskType | `GEMINI` |
| 読むフィールド | `prompt`(なければ `query`) |
| クレジット | 1.25 |
| 国 | 任意、既定は `US`。`CN` は米国の出口から、北京の端末位置で質問します。 |
| 位置情報 | `payload.location` を受け付けます。[地域と位置情報](/ja/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": "GEMINI", "payload": { "prompt": "best CRM for a small team", "country": "US" } }'
```

## レスポンス

| フィールド | 型 | 説明 |
| - | - | - |
| `text` | string | 回答。常に存在します。 |
| `sources` | array | グラウンディングの出典: `position`、`url`、`label`、`description`、`confidence_level`(0-100)。常に存在します。 |
| `model` | string | Geminiが回答に使ったモデル(わかる場合)。 |
| `markdown` | string | Markdownの回答。`include.markdown` のときのみ。 |
| `shoppingCards` | array | 回答内に表示された商品カード: `title`、`position`、`price`(`value`、`currency`、`raw`)、`store`、`rating`、`reviews`、`thumbnail`、`productLink`。 |
| `inlineProducts` | array | 回答内でリンクされた商品名: `title`、`position`、`productLink`。 |
| `map` | array | 回答内の場所: `name`、`position`、`placeId`、`location`、`phoneNumber`、`url`、`mapsUrl`、`reviews`、`category`。 |
| `videos` | array | YouTubeカード: `title`、`url`、`medium`、`thumbnail`、`source`、`duration`。 |
| `images` | array | 回答とともに表示された画像。 |
| `weather` | object | 回答に表示されたGeminiの天気ウィジェット。 |
| `rawResponse` | array | ストリームフレーム。`include.rawResponse` のときのみ。 |

商品、場所、動画、天気のフィールドは、回答にそれらが表示されたときだけ含まれます。

例:

```json theme={"theme":"css-variables"}
{
  "text": "For a small team, HubSpot CRM and Pipedrive are strong choices ...",
  "sources": [
    { "position": 1, "url": "https://www.example.com/crm-guide", "label": "CRM guide for small teams", "confidence_level": 87 }
  ],
  "model": "...",
  "shoppingCards": [
    {
      "title": "Acme Desk Phone",
      "position": 1,
      "price": { "value": 249.99, "currency": "$", "raw": "$249.99" },
      "store": "Northwind Electronics",
      "rating": 4.7,
      "reviews": "14292",
      "thumbnail": "https://...",
      "productLink": "https://google.com/search?...&ibp=oshop..."
    }
  ]
}
```

カード名は `text` にも残り、文中の商品リンクは Google の商品ページを指します。YouTubeカードは、Gemini が表示した位置にリンク付きのサムネイルとして `text` と `markdown` に入ります。Gemini が計算のためにコードを実行した場合、回答はGeminiが示した結果で、コードとその出力は含まれません。

## includeフラグ

| フラグ | 効果 |
| - | - |
| `markdown` | `markdown` を追加します。 |
| `rawResponse` | `rawResponse` を追加します。 |
| `html` | Gemini が表示した画面である `html` を追加します。[HTMLページ](/ja/engines/html-pages.md)を参照してください。 |
| `analysis` | `analysis` を追加します。1クレジット。[回答の分析](/ja/engines/answer-analysis.md)を参照してください。 |
| `citationAnalysis` | 回答に対して[Citation Analysis](/ja/research/citation-analysis.md)を実行します。 |

`searchQueries`、`ads`、`shopping` は効果がありません。[Markdownと生のレスポンス](/ja/engines/response-options.md)を参照してください。

## 関連ページ

* [Gemini製品ページ](https://querying.ai/ja/engines/gemini)
* [エンジンの概要](/ja/engines/overview.md)


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