Providers
SearXNG
A self-hosted SearXNG metasearch instance, no key, with a reachability probe and the engines behind each result in metadata.
- env var
- none
- auth
- none, self-hosted
- operations
- search
- results
- what the instance returns
Address it
import { create } from "@agntn/web";
const searx = create("searxng", { baseURL: "https://searx.example.com" }); // default http://localhost:8080
const results = await searx.search("query", { category: "general" });
No key. apiKeyEnvVar is null, so SearXNG always counts as configured. Set baseURL to your instance.
What it reads
| Call | Endpoint |
|---|---|
search | GET /search?format=json&q=…&pageno=…&categories=… |
isAvailable | GET / with a short timeout |
What comes back
score, publishedDate, image and metadata.{engine, engines, category}. A category is forwarded as given. No domain filters, no date bounds. Paging works through pageno.
Gotchas
- The instance has to allow the JSON format (
search.formatsin its settings). Most public instances do not, so bring your own. - Configured by definition means
searchAllwill try it, even when nothing listens onlocalhost:8080.detectAvailableProvidersAsyncandresolveDefaultProviderAsyncrun the probe and skip a dead instance. The docs worker leaves it out of fan-out for the same reason. maxResultsis applied on our side, the instance decides its page size.
Where it lives
src/providers/searxng.ts, the only built-in with isAvailable().