[GH-ISSUE #16766] feat: Ability to change the search language when using SearXNG for WebSearch #56703

Closed
opened 2026-05-05 19:56:36 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @marc1107 on GitHub (Aug 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16766

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

When using SearXNG as the web search engine, the language is always set to en-US. This is caused by the default value language = kwargs.get("language", "en-US") in the file backend/open_webui/retrieval/web/searxng.py. Although the SearXNG URL in Open WebUI can be customized with a language parameter (e.g., language=de-DE), this parameter is not passed to the search_searxng() function.

The function call in backend/open_webui/routers/retrieval.py (lines 1689-1694) does not pass kwargs, so the default language is used every time. This leads to poor search results for users who write in a different language, as the search is performed in en-US.

Desired Solution you'd like

I'd like to have one of the following two solutions implemented:

  1. Option to manually set the language: Provide a setting in the Open WebUI interface to choose the desired language for the web search or simply just pass the language being set in the SearXNG URL.
  2. Remove the hardcoded default language: Do not pass any language parameter to SearXNG. This would allow SearXNG to automatically determine the correct language based on the server location, which would provide more relevant results.

Alternatives Considered

I've considered manually changing the SearXNG URL in Open WebUI, but the language parameter is not passed to the search function, making this approach ineffective.

Additional Context

Our users primarily write in German. With the language hardcoded to en-US, the search results often include links to platforms like TikTok, Instagram, and Facebook. Our server blocks these sites due to our trust policy, which causes the scraper to time out, slows down the search process, and ultimately provides no useful results. A solution would significantly improve the quality and speed of web searches for our users.

Until then we are forced to used cloud providers like SearchAPI, which will result in more costs for websearch.

Originally created by @marc1107 on GitHub (Aug 21, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16766 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description When using SearXNG as the web search engine, the language is always set to en-US. This is caused by the default value language = kwargs.get("language", "en-US") in the file backend/open_webui/retrieval/web/searxng.py. Although the SearXNG URL in Open WebUI can be customized with a language parameter (e.g., language=de-DE), this parameter is not passed to the search_searxng() function. The function call in backend/open_webui/routers/retrieval.py (lines 1689-1694) does not pass kwargs, so the default language is used every time. This leads to poor search results for users who write in a different language, as the search is performed in en-US. ### Desired Solution you'd like I'd like to have one of the following two solutions implemented: 1. Option to manually set the language: Provide a setting in the Open WebUI interface to choose the desired language for the web search or simply just pass the language being set in the SearXNG URL. 2. Remove the hardcoded default language: Do not pass any language parameter to SearXNG. This would allow SearXNG to automatically determine the correct language based on the server location, which would provide more relevant results. ### Alternatives Considered I've considered manually changing the SearXNG URL in Open WebUI, but the language parameter is not passed to the search function, making this approach ineffective. ### Additional Context Our users primarily write in German. With the language hardcoded to en-US, the search results often include links to platforms like TikTok, Instagram, and Facebook. Our server blocks these sites due to our trust policy, which causes the scraper to time out, slows down the search process, and ultimately provides no useful results. A solution would significantly improve the quality and speed of web searches for our users. Until then we are forced to used cloud providers like SearchAPI, which will result in more costs for websearch.
Author
Owner

@chdid commented on GitHub (Aug 21, 2025):

#16476

Same idea !

<!-- gh-comment-id:3211371578 --> @chdid commented on GitHub (Aug 21, 2025): #16476 Same idea !
Author
Owner

@silentoplayz commented on GitHub (Jan 23, 2026):

This feature request is fulfilled by https://github.com/open-webui/open-webui/pull/19909.

<!-- gh-comment-id:3790017284 --> @silentoplayz commented on GitHub (Jan 23, 2026): This feature request is fulfilled by https://github.com/open-webui/open-webui/pull/19909.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56703