[GH-ISSUE #98] feat: add SearXNG as a search provider #46

Closed
opened 2026-10-18 14:02:21 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @0be30301 on GitHub (Jul 6, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/98

Adds SearXNG as a web search provider alongside Exa, Brave, Firecrawl, Perplexity, Tavily, Chat Completions, and DuckDuckGo.

Branch: https://github.com/open-webui/computer/compare/main...0be30301💻feature/web_searxng?expand=1

Changes

Image

Output - query capital of France:

**Infobox — List of capitals of France**
  Sources: [Wikipedia](https://en.wikipedia.org/wiki/List_of_capitals_of_France), [Wikidata](http://www.wikidata.org/entity/Q2743079)

**Infobox — France | capital city**
  Input interpretation: France | capital city
  Result: Paris, Île-de-France, France
  Populations: city population | 2.146 million people (country rank: 1st) (2020 estimate)
metro area population | 11.82 million people (Paris metro area) (2007 estimate)
  Location: Île-de-France, France
  Administrative regions: region | Ile-de-France
country | France
  Current local time: 4:07 pm CEST | Sunday, July 5, 2026
  Sources: [Wolfram|Alpha](https://www.wolframalpha.com/input/?i=capital+of+France)

**Paris - Wikipedia**
https://en.wikipedia.org/wiki/Paris
Paris[a] is the capital and largest city of France, with an estimated city population of 2.04 million in an area of 105.4 km 2 (40.7 sq mi), and a metropolitan population of 13.2 million as of January 2026. [4] Located on the river Seine in the centre of the Île-de-France region, it is the largest metropolitan area and fourth-most populous city in the European Union (EU). Nicknamed the "City ...

**List of capitals of France - Wikipedia**
https://en.wikipedia.org/wiki/List_of_capitals_of_France
Learn about the historical and current capitals of France, from Tournai to Paris. See the chronology of changes, the reasons for relocations, and the provisional seats of the government.

**Wolfram|Alpha (France | capital city)**
https://www.wolframalpha.com/input/?i=capital+of+France
Result: Paris, Île-de-France, France

cptr/utils/web/searxng.py — New module. Queries the SearXNG JSON API (/search?format=json) using the same pattern as duckduckgo.py (httpx, try/except, "Mozilla/5.0 (compatible; cptr/1.0)" user-agent). Surfaces four response layers:

  • answers → rendered as blockquote (> ...)
  • infoboxes → rendered as label/value attribute blocks
  • results → rendered as **Title**\nURL\nSnippet (sorted by score descending)
  • suggestions → appended as comma-separated list

No API key. base_url is required (no default — SearXNG is always self-hosted).

cptr/utils/web/search.py — Imported the module, added SEARXNG_BASE_URL config/env var, added dispatch branch for both explicit ("searxng") and auto mode (priority 6, before DuckDuckGo).

cptr/frontend/src/lib/components/Admin/Web.svelte — Added searxngBaseUrl state, config load/save, dropdown option, and a URL text input with hint.

cptr/frontend/src/lib/i18n/locales/en.json — Added 3 keys for the UI strings.

Config

Field Key
Env var SEARXNG_BASE_URL
DB config web.searxng_base_url
Default (none — required)

Auto-mode priority

  1. Exa → 2. Perplexity → 3. Tavily → 4. Brave → 5. Firecrawl → 6. SearXNG → 7. DuckDuckGo
Originally created by @0be30301 on GitHub (Jul 6, 2026). Original GitHub issue: https://github.com/open-webui/computer/issues/98 Adds SearXNG as a web search provider alongside Exa, Brave, Firecrawl, Perplexity, Tavily, Chat Completions, and DuckDuckGo. Branch: https://github.com/open-webui/computer/compare/main...0be30301:computer:feature/web_searxng?expand=1 ### Changes <img width="804" height="594" alt="Image" src="https://github.com/user-attachments/assets/539a49fc-f5d9-4f07-8088-0f2440216a4c" /> #### Output - query capital of France: ``` **Infobox — List of capitals of France** Sources: [Wikipedia](https://en.wikipedia.org/wiki/List_of_capitals_of_France), [Wikidata](http://www.wikidata.org/entity/Q2743079) **Infobox — France | capital city** Input interpretation: France | capital city Result: Paris, Île-de-France, France Populations: city population | 2.146 million people (country rank: 1st) (2020 estimate) metro area population | 11.82 million people (Paris metro area) (2007 estimate) Location: Île-de-France, France Administrative regions: region | Ile-de-France country | France Current local time: 4:07 pm CEST | Sunday, July 5, 2026 Sources: [Wolfram|Alpha](https://www.wolframalpha.com/input/?i=capital+of+France) **Paris - Wikipedia** https://en.wikipedia.org/wiki/Paris Paris[a] is the capital and largest city of France, with an estimated city population of 2.04 million in an area of 105.4 km 2 (40.7 sq mi), and a metropolitan population of 13.2 million as of January 2026. [4] Located on the river Seine in the centre of the Île-de-France region, it is the largest metropolitan area and fourth-most populous city in the European Union (EU). Nicknamed the "City ... **List of capitals of France - Wikipedia** https://en.wikipedia.org/wiki/List_of_capitals_of_France Learn about the historical and current capitals of France, from Tournai to Paris. See the chronology of changes, the reasons for relocations, and the provisional seats of the government. **Wolfram|Alpha (France | capital city)** https://www.wolframalpha.com/input/?i=capital+of+France Result: Paris, Île-de-France, France ``` **`cptr/utils/web/searxng.py`** — New module. Queries the SearXNG JSON API (`/search?format=json`) using the same pattern as `duckduckgo.py` (`httpx`, `try/except`, `"Mozilla/5.0 (compatible; cptr/1.0)"` user-agent). Surfaces four response layers: - `answers` → rendered as blockquote (`> ...`) - `infoboxes` → rendered as label/value attribute blocks - `results` → rendered as `**Title**\nURL\nSnippet` (sorted by score descending) - `suggestions` → appended as comma-separated list No API key. `base_url` is required (no default — SearXNG is always self-hosted). **`cptr/utils/web/search.py`** — Imported the module, added `SEARXNG_BASE_URL` config/env var, added dispatch branch for both explicit (`"searxng"`) and auto mode (priority 6, before DuckDuckGo). **`cptr/frontend/src/lib/components/Admin/Web.svelte`** — Added `searxngBaseUrl` state, config load/save, dropdown option, and a URL text input with hint. **`cptr/frontend/src/lib/i18n/locales/en.json`** — Added 3 keys for the UI strings. ### Config | Field | Key | |---|---| | Env var | `SEARXNG_BASE_URL` | | DB config | `web.searxng_base_url` | | Default | (none — required) | ### Auto-mode priority 1. Exa → 2. Perplexity → 3. Tavily → 4. Brave → 5. Firecrawl → **6. SearXNG** → 7. DuckDuckGo
Author
Owner

@owui-terminator[bot] commented on GitHub (Jul 6, 2026):

🔍 Related Issues Found

I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:

  1. 🟣 #67 feat: configurable perplexity base URL for web search - litellm is perplexity search API compatible
    Related because it adds another configurable web search provider and introduces a provider-specific base URL setting in the same search-provider configuration area. The new SearXNG feature similarly adds a new provider, a required base URL, and auto-mode integration.
    by Classic298

  2. 🟣 #32 feat: perplexity_search aka litellm as web search provider
    Related because it is an earlier web search provider addition in the same subsystem, showing the same pattern of extending the provider list and search dispatch logic. It is not SearXNG-specific, but it is directly adjacent to this feature.
    by Classic298


💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.

This comment was generated automatically. React with 👍 if helpful, 👎 if not.

<!-- gh-comment-id:4891793591 --> @owui-terminator[bot] commented on GitHub (Jul 6, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#67](https://github.com/open-webui/computer/issues/67) **feat: configurable perplexity base URL for web search - litellm is perplexity search API compatible** *Related because it adds another configurable web search provider and introduces a provider-specific base URL setting in the same search-provider configuration area. The new SearXNG feature similarly adds a new provider, a required base URL, and auto-mode integration.* *by Classic298* 2. 🟣 [#32](https://github.com/open-webui/computer/issues/32) **feat: perplexity_search aka litellm as web search provider** *Related because it is an earlier web search provider addition in the same subsystem, showing the same pattern of extending the provider list and search dispatch logic. It is not SearXNG-specific, but it is directly adjacent to this feature.* *by Classic298* --- 💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead. *This comment was generated automatically.* React with 👍 if helpful, 👎 if not.
Author
Owner

@tjbck commented on GitHub (Jul 6, 2026):

Should be addressed!

<!-- gh-comment-id:4898016169 --> @tjbck commented on GitHub (Jul 6, 2026): Should be addressed!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/computer#46
No description provided.