> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trynito.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Search

> Nito searches the web and grounds the prompt before the model answers.

## Turn It On

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "model": "moonshotai/kimi-k3",
  "messages": [{ "role": "user", "content": "What are the headline features of the latest release?" }],
  "web_search": true
}
```

`"tools": [{ "type": "web_search" }]` is equivalent; sending both is rejected. `true` requires a search for the turn. The object form `{"mode": "auto"}` lets the gateway skip retrieval when the conversation already answers the question, and `"off"` disables it. Suffix form for clients that can only set `model`: `?web_search=on|auto|off`. See [Model ID Convention](/models/model-id-convention).

With `auto`, the gateway skips prompts that do not benefit (text transforms, creative writing, stable general knowledge). An explicit browse, fact-check, or lookup instruction forces retrieval; an explicit no-search instruction wins. A skipped search counts nothing.

## Privacy

Search runs as Nito's own step before the model call and the tool is stripped before the provider is called, so the model call keeps its privacy level. The query is generated from your prompt, redacted of secrets, email addresses, phone and card numbers, network addresses, and long numeric IDs, then sent to a search provider. The redaction is pattern-based and best-effort. Leave search off for prompts that must not reach a search provider. Encrypted requests reject hosted search. See [Encrypted](/api/api-reference/chat-and-text/encrypted) and [Data Retention and Visibility](/privacy/data-retention-and-visibility).

## Domain Controls

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "tools": [{
    "type": "web_search",
    "parameters": { "allowed_domains": ["docs.example.org"], "blocked_domains": ["example.net"] }
  }]
}
```

Conflicting allow and block lists fail closed.

## Response

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "...",
  "object": "chat.completion",
  "model": "moonshotai/kimi-k3",
  "choices": [ { "index": 0, "message": { "role": "assistant", "content": "..." }, "finish_reason": "stop" } ],
  "web_search": { "sources": [ { "title": "...", "url": "https://...", "domain": "..." } ], "retrieval_mode": "llm_context" },
  "usage": {
    "prompt_tokens": 412,
    "completion_tokens": 180,
    "total_tokens": 592,
    "server_tool_use": { "web_search_requests": 1, "web_search_results": 5 }
  }
}
```

`web_search` carries source metadata (`title`, `url`, `domain`, `date`, `snippet`), `retrieval_mode`, and the request count. Generated queries and planner decisions are never exposed. Nito does not persist web-tool parameters, injected context, or retrieved pages.

## Model Support

`supports_web_search` on the catalog entry; `GET /v1/models?supports=web_search`. Elsewhere the request is rejected.

## Related

<CardGroup cols={3}>
  <Card title="Server-Side Tools" icon="toolbox" href="/api/features/server-side-tools">
    Overview.
  </Card>

  <Card title="Web Fetch" icon="link" href="/api/features/server-side-tools/web-fetch">
    Read a URL instead.
  </Card>

  <Card title="Web Search Reference" icon="book" href="/api/api-reference/server-tools/web-search">
    Reference.
  </Card>
</CardGroup>

## Retrieve without a model

Use [`POST /api/v1/web/search`](/api/api-reference/server-tools/web-search#standalone-search) with an API key to return retrieved content directly. This standalone call takes only `query` and is billed separately from inference. The chat options above remain available when a model should use the results itself.


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