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

# Engines

> Every taskType — which payload field it reads, what it returns, and which include flags actually do anything.

`taskType` selects the engine. The envelope around the result is identical for all of
them; what varies is the `response` object inside it.

<Note>
  **Self-serve plans cover six engines**: `CHATGPT`, `GEMINI`, `PERPLEXITY`, `GOOGLE`,
  `AIMODE` and the `NAVER_*` family. Those run signed out, so their capacity is a
  function of exit IPs and scales with the plan you buy.

  `CLAUDE`, `GROK`, `COPILOT`, `DEEPSEEK` and `AMAZON` are documented here and remain
  callable, but they run on pools of logged-in accounts — throughput depends on how many
  of those survive, which no plan can promise. Talk to us before building on them.
</Note>

## Which payload field an engine reads

Validation accepts either `prompt` or `query`, but each engine only reads the one it
expects. Send the wrong one and the task queues, then fails.

<CardGroup cols={3}>
  <Card title="Reads prompt" icon="message-square">
    `CHATGPT` `PERPLEXITY` `GEMINI` `COPILOT` `GROK` `CLAUDE` `DEEPSEEK`
  </Card>

  <Card title="Reads query" icon="search">
    `GOOGLE` `AIMODE` `NAVER_AI_BRIEF` `NAVER_AI_MODE`

    Falls back to `prompt` if `query` is absent.
  </Card>

  <Card title="Reads either" icon="shopping-cart">
    `AMAZON` prefers `prompt`, falls back to `query`.
  </Card>
</CardGroup>

## The `include` flags mostly do nothing

`payload.include` is part of the Cloro contract, but in this implementation most engines
produce a **fixed-shape response** and ignore it entirely. Only ChatGPT's anonymous path
honours the full set.

| Engine                                                      | Honoured flags                                                   | Raw arrives as   |
| ----------------------------------------------------------- | ---------------------------------------------------------------- | ---------------- |
| `CHATGPT`                                                   | `markdown` `html` `rawResponse` `searchQueries` `ads` `shopping` | `rawResponse`    |
| `PERPLEXITY`                                                | `markdown` `rawResponse` `searchQueries`                         | `rawResponse`    |
| `GEMINI` `COPILOT` `GROK`                                   | `markdown` `rawResponse`                                         | `rawResponse`    |
| `CLAUDE` `DEEPSEEK`                                         | `rawResponse`                                                    | `rawResponse`    |
| `GOOGLE` `AIMODE` `NAVER_AI_BRIEF` `NAVER_AI_MODE` `AMAZON` | `rawResponse`                                                    | **`rawContent`** |

<Note>
  `include.rawResponse` returns parsed stream events on the engines that stream JSON,
  and the untouched response body — as **`rawContent`**, not `rawResponse` — on the ones
  we fetch as a document. Either way it can be hundreds of KB, so it is off by default.

  Claude, DeepSeek, Naver and Amazon accepted this flag and silently ignored it until
  2026-07-26. If you tried it before then and got nothing back, try again.
</Note>

`markdown` is not a flag on every engine that returns it: Claude and Naver ship
`markdown` unconditionally, because for them it is the answer's real shape rather than a
copy of `text`.

<Warning>
  Setting an unhonoured flag is silently ignored — no error, no field. Notably `html` is
  only ever produced by ChatGPT-anon, even though several engines accept the flag. And
  several engines (`CHATGPT` account, `GROK`, `CLAUDE`, `DEEPSEEK`) return `searchQueries`
  **unconditionally**, whether or not you asked for it.
</Warning>

<Note>
  `CHATGPT` runs in one of two modes chosen by server configuration, not by your request.
  The account-pool mode is the default and returns a fixed shape; the anonymous mode
  returns the richest response in the API. You cannot select between them per task.
</Note>

## Response shapes

<AccordionGroup>
  <Accordion title="PERPLEXITY">
    Reads `prompt`. Always returns `text`, `sources[]`, `timing`.

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

    Optional extras when Perplexity surfaces them: `videos`, `images`, `hotels`, `places`,
    `shopping_cards`.
  </Accordion>

  <Accordion title="GEMINI">
    Reads `prompt`. Always returns `text`, `sources[]`, `timing`.

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "confidence_level": "..." }],
      "timing": { "...": "..." },
      "markdown": "...",
      "rawResponse": ["..."],
      "model": "..."
    }
    ```
  </Accordion>

  <Accordion title="GOOGLE — AI Overview inside a SERP envelope">
    Reads `query`. This is **not** a bare AI Overview object — it is a search-results envelope
    carrying the AI Overview as one nullable member.

    ```json theme={null}
    {
      "aioverview": { "text": "...", "sources": [{ "position": 1, "url": "https://..." }] },
      "organicResults": [{ "...": "..." }],
      "peopleAlsoAsk": [{ "...": "..." }],
      "relatedSearches": [{ "...": "..." }],
      "knowledgeGraph": { "...": "..." },
      "ads": [{ "...": "..." }],
      "serp": { "topStories": [], "videoResults": [], "localResults": [] },
      "debug": { "reason": "...", "attempts": 1, "ms": 4200 }
    }
    ```

    <Warning>
      `aioverview: null` is the documented signal that **Google showed no AI Overview** for
      that query. It is not an error, and the SERP fields around it are still populated.
    </Warning>

    Top-level `text` and `sources` are **deprecated aliases** that duplicate `aioverview.text`
    and `aioverview.sources`. They exist so consumers of the older bare-AIO shape keep working.
    Read `aioverview.*` in new code.

    SERP panels are **omitted** when absent rather than emitted as `null` or `[]` — treat every
    one of them as optional.
  </Accordion>

  <Accordion title="AIMODE — Google AI Mode">
    Reads `query`. Fixed shape, no markdown or timing.

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "..." }],
      "debug": { "reason": "...", "attempts": 1, "sorry": false, "reused": true, "ms": 5100 }
    }
    ```
  </Accordion>

  <Accordion title="CHATGPT">
    Reads `prompt`. The shape depends on the server's configured mode.

    **Account mode (default)** — fixed shape. `markdown` duplicates `text`; `sources` carry only
    position and url.

    ```json theme={null}
    {
      "text": "...",
      "markdown": "...",
      "model": "...",
      "searchQueries": ["..."],
      "sources": [{ "position": 1, "url": "https://..." }],
      "searchEnabled": true,
      "durationMs": 8400
    }
    ```

    **Anonymous mode** — the richest response in the API, and the only one where every `include`
    flag works. All flags default to on.

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

    Anonymous mode also supports multi-turn conversations — see [Multi-turn](#multi-turn-chatgpt).
  </Accordion>

  <Accordion title="GROK">
    Reads `prompt`. Two paths, chosen by whether an account is available.

    **Account path** — rich `sources`, `searchQueries` always present, `markdown` only if requested.

    ```json theme={null}
    {
      "text": "...",
      "model": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "siteName": "...", "favicon": "..." }],
      "searchQueries": ["..."],
      "durationMs": 9100,
      "markdown": "..."
    }
    ```

    **Anonymous path** — adds `timing`, honours `markdown` and `rawResponse`.

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "..." }],
      "timing": { "...": "..." },
      "model": "...",
      "searchQueries": ["..."],
      "markdown": "...",
      "rawResponse": ["..."]
    }
    ```
  </Accordion>

  <Accordion title="COPILOT">
    Reads `prompt`. `model` is always the literal string `"smart"`.

    ```json theme={null}
    {
      "text": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "...", "description": "..." }],
      "model": "smart",
      "timing": { "...": "..." },
      "markdown": "...",
      "rawResponse": ["..."]
    }
    ```
  </Accordion>

  <Accordion title="CLAUDE">
    Reads `prompt`. Fixed shape. `markdown` duplicates `text`, and each source's `label`
    duplicates its `url` — Claude does not expose link titles.

    ```json theme={null}
    {
      "text": "...",
      "markdown": "...",
      "model": "...",
      "searchQueries": ["..."],
      "sources": [{ "position": 1, "url": "https://...", "label": "https://..." }],
      "durationMs": 11200
    }
    ```

    Region-gated: submissions are rejected with `REGION_UNAVAILABLE` when no account can serve
    `payload.country`.
  </Accordion>

  <Accordion title="DEEPSEEK">
    Reads `prompt`. Fixed shape. `markdown` duplicates `text`; sources carry only position and url.

    ```json theme={null}
    {
      "text": "...",
      "markdown": "...",
      "model": "...",
      "searchQueries": ["..."],
      "sources": [{ "position": 1, "url": "https://..." }],
      "durationMs": 14000
    }
    ```
  </Accordion>

  <Accordion title="AMAZON">
    Prefers `prompt`, falls back to `query`. The only engine that returns a structured product
    list.

    ```json theme={null}
    {
      "text": "...",
      "markdown": "...",
      "sources": [{ "position": 1, "url": "https://...", "label": "..." }],
      "products": [
        {
          "position": 1,
          "asin": "B0...",
          "title": "...",
          "price": "...",
          "rating": 4.5,
          "reviewCount": 1203,
          "url": "https://...",
          "thumbnail": "https://...",
          "isPrime": true,
          "isSponsored": false,
          "brand": "..."
        }
      ],
      "durationMs": 12300
    }
    ```
  </Accordion>

  <Accordion title="NAVER_AI_BRIEF and NAVER_AI_MODE">
    Both read `query` and share one response shape.

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

    `NAVER_AI_BRIEF` is the conditional AI summary box on the Naver SERP — it may not appear
    for a given query. `NAVER_AI_MODE` is the always-on conversational AI tab and is the
    primary Naver surface; its `text` is markdown-formatted.

    <Note>
      `NAVER` is a deprecated alias for `NAVER_AI_BRIEF`. Use the explicit name.
    </Note>
  </Accordion>
</AccordionGroup>

## Multi-turn (ChatGPT)

Anonymous-mode ChatGPT can hold a conversation. Omit both fields for the default
single-shot behaviour.

<Steps>
  <Step title="Start a thread">
    Send `newConversation: true`. The response carries a `conversationId`.

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

  <Step title="Continue it">
    Send that `conversationId` back on the next turn.

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

<Warning>
  Conversations are bound to the device that created them and expire after roughly two
  hours. A stale `conversationId` cannot be resumed.
</Warning>
