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

# web_search

> Search the web.

> [!NOTE]
>
> Uses credits · Your own key only

Searches the web and gives back up to 8 pages, best first, each with a few key points. Read one in full with [web\_read](/dev/docs/api-reference/tools/web-read.md). Takes 5-20 s and uses the person's Constella credits (about 75 a call).

Call it at `POST /platform/v1/me/tools/web_search`. On MCP, your AI tool calls `web_search` with the same arguments.

## Arguments

Send these inside `arguments`.

**query** `string` *required*

What to search for.

## Returns

The tool's answer comes back under `result`.

**articles** `object[]`

Each has `title`, `url`, `domain`, `image`, `publishedDate`, `author` and `keyPoints`.

**credits\_charged** `number`

Credits used.

```bash Your key theme={"system"}
curl https://api.constella.app/platform/v1/me/tools/web_search \
  -H "Authorization: Bearer $CONSTELLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arguments": {"query": "streamable http mcp spec"}}'
```

```python Python theme={"system"}
import os, requests

r = requests.post(
    "https://api.constella.app/platform/v1/me/tools/web_search",
    headers={"Authorization": f"Bearer {os.environ['CONSTELLA_API_KEY']}", "X-Constella-Client": "my-script"},
    json={"arguments": {"query": "streamable http mcp spec"}},
)
print(r.json()["result"])
```

```javascript JavaScript theme={"system"}
const res = await fetch("https://api.constella.app/platform/v1/me/tools/web_search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CONSTELLA_API_KEY}`,
    "X-Constella-Client": "my-script",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"arguments": {"query": "streamable http mcp spec"}}),
});
const { result } = await res.json();
```

```json 200 theme={"system"}
{
  "result": {
    "articles": [
      {
        "title": "Transports - Model Context Protocol",
        "url": "https://modelcontextprotocol.io/...",
        "domain": "modelcontextprotocol.io",
        "keyPoints": [
          "..."
        ]
      }
    ],
    "credits_charged": 75
  }
}
```


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