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

# Search the web

> Get ranked search results without creating a browser session.

`POST /v1/search` uses a shared browser pool. Set `TILION_API_KEY` and send a query.

```python Python theme={"dark"}
import os
import requests

response = requests.post(
    "https://back.tilion.dev/v1/search",
    headers={"Authorization": f"Bearer {os.environ['TILION_API_KEY']}"},
    json={"query": "chrome devtools protocol", "count": 3}, timeout=70,
)
response.raise_for_status()
result = response.json()
if result.get("status") != "ok":
    raise RuntimeError(result)
for item in result["results"]:
    print(item["title"], item["url"])
```

```javascript Node.js theme={"dark"}
const response = await fetch("https://back.tilion.dev/v1/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TILION_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query: "chrome devtools protocol", count: 3 }),
  signal: AbortSignal.timeout(70_000),
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
if (result.status !== "ok") throw new Error(JSON.stringify(result));
for (const item of result.results) console.log(item.title, item.url);
```

```bash curl theme={"dark"}
curl --fail-with-body https://back.tilion.dev/v1/search \
  -H "Authorization: Bearer $TILION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "chrome devtools protocol", "count": 3}'
```

Each result includes a title, URL, snippet, and rank. The top-level `engine` field identifies the search engine that returned the results. `engines_tried` records fallback attempts.

## Read a result

Pass a result's `url` to [`fetch`](https://docs.tilion.dev/guides/read-page) for page text or [`extract`](https://docs.tilion.dev/guides/extract-markdown) for Markdown. Those calls use a session that you create and close yourself.

The [search reference](https://docs.tilion.dev/reading/search.md) covers pagination, engine selection, caching, and asynchronous requests.


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