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

# Web Search tool

> Search the web from a natural language query.

Use Web Search when you need the assistant to run a quick web query and return results.

## Prerequisites

* An API token. See [Backoffice Developer Console](/en/developer-manual/get-started/developer-console).

## Requirements

* Tool spec: `{ "name": "web_search", "type": "web_search_v1" }`
* No `tool_context` required

## Basic request and response

This example validates a request that enables the web search tool:

```bash theme={null}
curl -X POST "https://{BASE_URL}/api/gpt/v1/messages/validate" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "max_tokens": 64,
    "messages": [
      { "role": "user", "content": "Find recent updates about the EU AI Act." }
    ],
    "tools": [
      { "name": "web_search", "type": "web_search_v1" }
    ],
    "tool_choice": { "type": "auto" }
  }'
```

Example response:

```json theme={null}
{ "valid": true, "errors": null }
```

To run the request, send the same body to `POST /messages`.

## Tips

* Use a focused query to reduce noisy results.
* Combine with a system prompt to control summarization style.

## Next steps

* Learn how messages return tool blocks: [Messages](/en/developer-manual/build-with-zylon/working-with-messages)
