HTTP-backed ExAthena.Search implementation. Backend-agnostic: the actual
provider is chosen by config and is the only provider-specific code here.
config :ex_athena, :search,
adapter: ExAthena.Search.Http,
backend: :duckduckgo, # :duckduckgo | :tavily | :brave | :searxng
api_key: System.get_env("EX_ATHENA_SEARCH_API_KEY"),
endpoint: System.get_env("EX_ATHENA_SEARCH_ENDPOINT")| backend | auth | extra config | notes |
|---|---|---|---|
:duckduckgo | none | — | default; parses the HTML SERP — best-effort, rate-limited, no official API |
:tavily | api_key (paid) | — | clean LLM-oriented snippets |
:brave | api_key (free tier) | — | privacy-focused |
:searxng | none | endpoint required | self-hosted; queries the JSON API |
The :searxng backend maps the tool's topic/recency onto SearXNG's
categories/time_range, returns score and published when present, and
takes optional instance tuning under a nested :searxng key:
config :ex_athena, :search,
backend: :searxng,
endpoint: "http://localhost:8888",
searxng: [language: "en", safesearch: 1, engines: "google,duckduckgo"]Tests inject a plug (or any Req option) via config :ex_athena, :search, req_options: [...] so no network is hit.