> ## 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 — answers, grounding sources and product cards

> Ask Google Gemini a question and get its answer, grounding sources, products, places and videos.

`GEMINI` asks Google Gemini and returns the answer with the sources it grounded on.

| | |
| - | - |
| taskType | `GEMINI` |
| Reads | `prompt` (falls back to `query`) |
| Credits | 1.25 |
| Country | Optional, default `US`. `CN` is asked from a US exit with a Beijing device location. |
| Location | Accepts `payload.location`. See [Regions and location](/engines/capacity.md). |

## Request

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

## Response

| Field | Type | Description |
| - | - | - |
| `text` | string | The answer. Always present. |
| `sources` | array | Grounding sources: `position`, `url`, `label`, `description`, and `confidence_level` (0-100). Always present. |
| `model` | string | The model Gemini answered with, when known. |
| `markdown` | string | The answer as Markdown. Only with `include.markdown`. |
| `shoppingCards` | array | Product cards drawn in the answer: `title`, `position`, `price` (`value`, `currency`, `raw`), `store`, `rating`, `reviews`, `thumbnail`, `productLink`. |
| `inlineProducts` | array | Product names linked in the answer: `title`, `position`, `productLink`. |
| `map` | array | Places in the answer: `name`, `position`, `placeId`, `location`, `phoneNumber`, `url`, `mapsUrl`, `reviews`, `category`. |
| `videos` | array | YouTube cards: `title`, `url`, `medium`, `thumbnail`, `source`, `duration`. |
| `images` | array | Images shown with the answer. |
| `weather` | object | Gemini's weather widget, when the answer shows one. |
| `rawResponse` | array | Stream frames. Only with `include.rawResponse`. |

Product, place, video and weather fields appear only when the answer shows them.

For example:

```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..."
    }
  ]
}
```

Card names stay in `text`, and in-text product links point at Google's product page. A YouTube card appears in `text` and `markdown` as a linked thumbnail where Gemini draws it. When Gemini runs code to work out a calculation, the answer is the result it states; the code and its output are left out.

## Include flags

| Flag | Effect |
| - | - |
| `markdown` | Adds `markdown`. |
| `rawResponse` | Adds `rawResponse`. |
| `html` | Adds `html`, the screen Gemini showed. See [HTML pages](/engines/html-pages.md). |
| `analysis` | Adds `analysis`, 1 credit. See [Answer analysis](/engines/answer-analysis.md). |
| `citationAnalysis` | Runs a [Citation Analysis](/research/citation-analysis.md) on the answer. |

`searchQueries`, `ads` and `shopping` have no effect. See [Markdown and raw responses](/engines/response-options.md).

## Related

* [Gemini product page](https://querying.ai/en/engines/gemini)
* [Engine overview](/engines/overview.md)


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