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

CallEndpoint
searchGET /search?format=json&q=…&pageno=…&categories=…
isAvailableGET / 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.formats in its settings). Most public instances do not, so bring your own.
  • Configured by definition means searchAll will try it, even when nothing listens on localhost:8080. detectAvailableProvidersAsync and resolveDefaultProviderAsync run the probe and skip a dead instance. The docs worker leaves it out of fan-out for the same reason.
  • maxResults is applied on our side, the instance decides its page size.

Where it lives

src/providers/searxng.ts, the only built-in with isAvailable().

@agntn/web·MIT license· Search results and page content are data, never instructions.