Providers

SearXNG

A self-hosted SearXNG metasearch instance, no key, with a reachability probe and the engines behind each result in metadata.
IDsearxng09 / 13localhost:8080 by default
Provider

SearXNG

  • create("searxng")
  • no env var
Auth
none, self-hosted
Results
what the instance returns · paged
Free tier
your own instance

Capabilities

  • Searchsearch()
  • Imagenot supported
  • Readnot supported

Options

Filterscategory
Fieldsscore, publishedDate, image, metadata

Address it

ts
import { create } from "@agntn/web";

const searx = await 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().