{"openapi":"3.1.0","info":{"title":"search-proxy","description":"Self-hosted SearXNG search, page extraction and Anthropic-compatible web search results.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{}},"paths":{"/v1/search":{"post":{"summary":"Search the web via the self-hosted SearXNG backend","tags":["search"],"description":"Runs one or more queries in parallel, de-duplicates and merges the results, and returns a ranked list. Identical requests are served from an in-memory TTL cache.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"queries":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","minLength":1,"maxLength":500}},"max_results":{"type":"integer","minimum":1,"maximum":1000},"page":{"type":"integer","minimum":1,"maximum":10},"language":{"type":"string","maxLength":32},"categories":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":64}},"engines":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":64}},"time_range":{"type":"string","enum":["day","week","month","year"]},"safesearch":{"type":"integer","enum":[0,1,2]},"include_domains":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":255}},"exclude_domains":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":255}}},"anyOf":[{"required":["query"]},{"required":["queries"]}]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"queries":{"type":"array","items":{"type":"string"}},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"},"snippet":{"type":"string"},"score":{"type":"number"},"engines":{"type":"array","items":{"type":"string"}},"published_at":{"type":"string"}}}},"total":{"type":"integer"},"took_ms":{"type":"integer"},"cached":{"type":"boolean"},"partial":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"query":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/search":{"get":{"summary":"Search the web (GET convenience endpoint)","tags":["search"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":500},"in":"query","name":"q","required":true},{"schema":{"type":"string","maxLength":3000},"in":"query","name":"queries","required":false,"description":"Comma-separated list of additional queries"},{"schema":{"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"max_results","required":false},{"schema":{"type":"integer","minimum":1,"maximum":10},"in":"query","name":"page","required":false},{"schema":{"type":"string","maxLength":32},"in":"query","name":"language","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"categories","required":false,"description":"Comma-separated categories"},{"schema":{"type":"string","maxLength":512},"in":"query","name":"engines","required":false,"description":"Comma-separated engines"},{"schema":{"type":"string","enum":["day","week","month","year"]},"in":"query","name":"time_range","required":false},{"schema":{"type":"integer","enum":[0,1,2]},"in":"query","name":"safesearch","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"include_domains","required":false,"description":"Comma-separated domains"},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"exclude_domains","required":false,"description":"Comma-separated domains"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"queries":{"type":"array","items":{"type":"string"}},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"},"snippet":{"type":"string"},"score":{"type":"number"},"engines":{"type":"array","items":{"type":"string"}},"published_at":{"type":"string"}}}},"total":{"type":"integer"},"took_ms":{"type":"integer"},"cached":{"type":"boolean"},"partial":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"query":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/v1/fetch":{"post":{"summary":"Fetch a page and extract readable text","tags":["fetch"],"description":"Fetches an http(s) URL with SSRF protection (DNS resolution is validated and pinned at connect time), follows redirects, caps the response size, and extracts the main text content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"maxLength":4096},"max_chars":{"type":"integer","minimum":200,"maximum":10000000}}}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}}},"/v1/web_search":{"post":{"summary":"Anthropic-compatible web_search_tool_result","tags":["anthropic"],"description":"Returns search results in the shape of an Anthropic `web_search_tool_result` content block, so a client-side tool runner can answer `web_search` tool calls with results from this service.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","minLength":1,"maxLength":500},"max_results":{"type":"integer","minimum":1,"maximum":100},"tool_use_id":{"type":"string","maxLength":200}}}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}}},"/healthz":{"get":{"summary":"Liveness probe","tags":["health"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"},"uptime_s":{"type":"number"}}}}}}}}},"/readyz":{"get":{"summary":"Readiness probe (checks the SearXNG backend)","tags":["health"],"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://look.o42.su","description":"Public endpoint"}],"tags":[{"name":"search","description":"Web search"},{"name":"fetch","description":"Page fetching"},{"name":"anthropic","description":"Anthropic web search tool compatibility"},{"name":"health","description":"Health checks"}]}