# Scaff Search — full documentation

> Meta-search engine with a free JSON web search API and a remote MCP server. No API key, no signup. Built on SearXNG.

Last updated: 2026-11-29

Logging notice: every request is logged (IP address, headers with credentials redacted, query, timing) for research into how automated clients use search APIs. Do not send personal or confidential data in queries. Details: https://search.scaff.dev/privacy

## Quick start

```
curl "https://search.scaff.dev/api/search?q=postgres+vacuum+tuning"
```

## JSON API

`GET https://search.scaff.dev/api/search`

| Parameter | Type    | Default | Description                         |
|-----------|---------|---------|-------------------------------------|
| q         | string  | —       | Search query. Required. Max 400.    |
| num       | integer | 10      | Number of results, 1–20             |
| page      | integer | 1       | Result page, 1–10                   |
| lang      | string  | en      | Language code (en, de, fr, all, …)  |
| safe      | 0 or 1  | 0       | Safe search                         |

Response:

```json
{
  "query": "postgres vacuum tuning",
  "page": 1,
  "count": 10,
  "results": [
    {"title": "PostgreSQL: Documentation: Routine Vacuuming",
     "url": "https://www.postgresql.org/docs/current/routine-vacuuming.html",
     "snippet": "PostgreSQL databases require periodic maintenance known as vacuuming…",
     "engine": "bing", "published": null}
  ],
  "suggestions": [],
  "source": "searxng (bing, brave)",
  "engines": ["bing", "brave"],
  "cached": false,
  "duration": 0.84
}
```

Errors: `400` missing `q`; `503` all backends failed (retry shortly; see https://search.scaff.dev/api/status).

Limits: no hard rate limit; keep sustained traffic around 1 request/second. Identical queries are cached for 15 minutes. CORS is enabled.

`/search?q=…&format=json` returns the same payload.

## Remote MCP server

- URL: `https://search.scaff.dev/mcp`
- Transport: streamable HTTP (stateless, JSON responses), no auth
- Tool: `web_search` — arguments `query` (string, required), `num` (1–20), `lang`

Claude Code:

```
claude mcp add --transport http scaff-search https://search.scaff.dev/mcp
```

Generic client config:

```json
{"mcpServers": {"scaff-search": {"type": "http", "url": "https://search.scaff.dev/mcp"}}}
```

## Function-calling tool definition

```json
{
  "name": "web_search",
  "description": "Search the web. Returns title, url and snippet for each result.",
  "parameters": {
    "type": "object",
    "properties": {"query": {"type": "string"}, "num": {"type": "integer", "minimum": 1, "maximum": 20}},
    "required": ["query"]
  }
}
```

Implement as `GET https://search.scaff.dev/api/search?q={query}&num={num}`.

## Python

```python
import requests
r = requests.get("https://search.scaff.dev/api/search", params={"q": "rust async runtime", "num": 5}, timeout=20)
for hit in r.json()["results"]:
    print(hit["title"], hit["url"])
```

## LangChain

```python
import requests
from langchain_core.tools import tool

@tool
def web_search(query: str, num: int = 5) -> list[dict]:
    """Search the web and return title, url and snippet for each result."""
    r = requests.get("https://search.scaff.dev/api/search", params={"q": query, "num": num}, timeout=20)
    r.raise_for_status()
    return r.json()["results"]
```

## How it works

Requests go through Caddy (TLS) to a Flask app, which queries a local SearXNG instance using only the engines that passed the latest health check (every hour). Results are de-duplicated by URL and cached for 15 minutes. Live engine state: https://search.scaff.dev/status

## Discovery files

- https://search.scaff.dev/llms.txt
- https://search.scaff.dev/openapi.json
- https://search.scaff.dev/.well-known/mcp.json
- https://search.scaff.dev/.well-known/ai-plugin.json
- https://search.scaff.dev/opensearch.xml
- https://search.scaff.dev/sitemap.xml