Web Search
Last updated Reviewed against Prism v0.3.26
Which search providers does Prism support?
| Provider | API key | Notes |
|---|---|---|
| SearXNG (managed) | Not needed | Bundled local metasearch instance. Free, unlimited, no sign-up. |
| Exa | EXA_API_KEY | Neural and keyword search tuned for AI agents. |
| Tavily | TAVILY_API_KEY | Search API built for LLM use cases. |
| Brave | BRAVE_SEARCH_API_KEY | Independent web index. |
| Serper | SERPER_API_KEY | Google-compatible search results. |
| Custom REST | Your own | Any HTTP endpoint described declaratively in config, no code required. |
Whichever you choose, Prism applies the same limits and supports a fallback chain, so a provider that fails or returns nothing is skipped automatically.
How search interception works
You do not have to change your agent. When an agent calls a web search tool, Prism recognises it, runs the search itself through the active provider, and streams the result back inline as a server tool use plus a search result block.
| Client tool call | What Prism does |
|---|---|
| Anthropic web_search | Rewritten into a local search and returned as a search result block. |
| Anthropic web_fetch | Fetched locally and returned as tool output. |
| OpenAI Responses web_search | Served locally instead of upstream. |
| OpenAI Responses x_search | Served locally instead of upstream. |
api: "responses". Those tool calls pass through to the upstream untouched.Start the managed SearXNG instance
Open the SearXNG tab
Click Start
127.0.0.1:8888.Wait for the first-run bootstrap
Toggle auto-start
python-build-standalone interpreter so search works without a system Python at all.The SearXNG endpoint
http://127.0.0.1:8888/search?q=<query>&format=json
# Example: query SearXNG directly
curl "http://127.0.0.1:8888/search?q=glm+5.1+release+notes&format=json"
# Returns JSON with a results array:
# { "results": [ { "url": "...", "title": "...", "content": "..." } ] }Any agent or script that can issue an HTTP GET can use this endpoint. There are no headers and no authentication, because it only listens on loopback.
Configure a search provider
In the Admin UI's Search tab, choose the active provider, add its API key, order the fallback chain, and test a query without leaving the page. Everything it edits lives under the search key in config.json.
{
"search": {
"active": "searxng",
"fallback": ["exa", "tavily"],
"max_per_turn": 5,
"timeout_ms": 8000,
"default_num_results": 5,
"providers": {
"searxng": { "enabled": true, "base_url": "http://127.0.0.1:8888" },
"exa": { "enabled": true, "api_key": "your-exa-key" }
}
}
}| Key | Default | Meaning |
|---|---|---|
| active | searxng | The provider used first for every intercepted search. |
| fallback | [] | Ordered provider ids to try when the active one fails or returns nothing. |
| max_per_turn | 5 | Maximum searches served within one agent turn. |
| timeout_ms | 8000 | Per-request timeout. |
| default_num_results | 5 | Results per query, capped at 10. |
| providers | {} | Per-provider enabled flag, API key and base URL. |
EXA_API_KEY, TAVILY_API_KEY, BRAVE_SEARCH_API_KEY or SERPER_API_KEY.Add a custom REST search provider
Any search API can be described declaratively, with no code. Prism substitutes template placeholders into the URL, parameters and body, then reads results out of the response using a JSON path and a field map.
{
"search": {
"custom_providers": [
{
"id": "linkup",
"name": "Linkup",
"endpoint": "https://api.linkup.so/v1/search",
"method": "POST",
"authHeader": "Authorization",
"apiKey": "Bearer your-key",
"resultsJSONPath": "results",
"fieldMap": {
"title": "name",
"url": "url",
"content": "content"
},
"enabled": true
}
]
}
}| Field | Purpose |
|---|---|
| endpoint | The HTTP URL to call. |
| method | GET or POST. Defaults to POST. |
| authHeader / apiKey / keyEnv | Header name and value for authentication, or the environment variable holding the key. |
| queryParam / params / body | Where the query and options go. Supports the {{query}}, {{numResults}}, {{allowedDomains}} and {{blockedDomains}} placeholders. |
| resultsJSONPath | Dotted path to the array of results in the response. |
| fieldMap | Maps Prism's title, url and content fields onto your API's field names. |
File locations
| Platform | SearXNG data |
|---|---|
| Windows | %APPDATA%\prism\searxng\ |
| macOS | ~/Library/Application Support/prism/searxng/ |
| Linux | $XDG_CONFIG_HOME/prism/searxng/ (default ~/.config/prism/searxng/) |
searxng folder resets the metasearch engine to a clean state. Prism re-bootstraps it on the next start.Related
MCP Gateway
Expose search and other tools to agents over MCP.
Config Reference
The full search config section and env vars.
Streaming
How search results stream back mid-response.
Admin Web UI
The SearXNG and Search tabs.
Guide: choosing a search provider
SearXNG, Exa, Tavily, Brave and Serper compared, with a fallback chain.