Originally created by @rogen84 on GitHub (Feb 28, 2025).
Bug Report
Description
When Open-WebUI is configured to use SearXNG as the search engine, all web search requests fail. The backend logs show a 400 BAD REQUEST error from SearXNG due to an empty q parameter in the request URL.
Steps to Reproduce
Configure Open-WebUI to use SearXNG (URL: http://searxng:8080/search?q=<query>).
Send a query requiring web search (e.g., "latest news").
Observe backend logs for the error:
HTTPError: 400 Client Error: BAD REQUEST for url: http://searxng:8080/search?q=&format=json&pageno=1...
Expected Behavior
Open-WebUI should pass the user’s search query (e.g., "latest news") to SearXNG via the q parameter, generating a valid URL like http://searxng:8080/search?q=latest+news.
Actual Behavior
The q parameter in the SearXNG request URL is always empty (q=), resulting in a 400 error. Key log snippet:
Originally created by @rogen84 on GitHub (Feb 28, 2025).
# Bug Report
### **Description**
When Open-WebUI is configured to use SearXNG as the search engine, all web search requests fail. The backend logs show a `400 BAD REQUEST` error from SearXNG due to an empty `q` parameter in the request URL.
---
### **Steps to Reproduce**
1. Configure Open-WebUI to use SearXNG (URL: `http://searxng:8080/search?q=<query>`).
2. Send a query requiring web search (e.g., "latest news").
3. Observe backend logs for the error:
```bash
HTTPError: 400 Client Error: BAD REQUEST for url: http://searxng:8080/search?q=&format=json&pageno=1...
```
---
### **Expected Behavior**
Open-WebUI should pass the user’s search query (e.g., `"latest news"`) to SearXNG via the `q` parameter, generating a valid URL like `http://searxng:8080/search?q=latest+news`.
---
### **Actual Behavior**
The `q` parameter in the SearXNG request URL is always empty (`q=`), resulting in a `400` error. Key log snippet:
```python
File "/app/backend/open_webui/retrieval/web/searxng.py", line 79
response.raise_for_status()
requests.exceptions.HTTPError: 400 Client Error...
```
---
### **Impact**
- **All web search functionality** via SearXNG is completely broken.
- Users cannot retrieve real-time web results through Open-WebUI.
---
### **Environment**
- **Open-WebUI Version**: v0.5.18 (Docker)
- **SearXNG Configuration**:
- URL: `http://searxng:8080`
- Verified working independently (e.g., `http://searxng:8080/search?q=test` returns valid results).
---
### **Additional Context**
- **Full Error Log**:
```python
2025-02-28 21:53:43.855 | ERROR | open_webui.routers.retrieval:process_web_search:1404 - 400 Client Error: BAD REQUEST for url: http://searxng:8080/search?q=&format=json...
```
---
do you added "- json" to your searxng settings.yml?
formats:
- html
- json
&
could you test with http://searxng:8080/searxng/search?q=<query> as searxng URL on openwebui search settings?
@rgaricano commented on GitHub (Feb 28, 2025):
do you added "- json" to your searxng settings.yml?
```
formats:
- html
- json
```
&
could you test with `http://searxng:8080/searxng/search?q=<query> ` as searxng URL on openwebui search settings?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @rogen84 on GitHub (Feb 28, 2025).
Bug Report
Description
When Open-WebUI is configured to use SearXNG as the search engine, all web search requests fail. The backend logs show a
400 BAD REQUESTerror from SearXNG due to an emptyqparameter in the request URL.Steps to Reproduce
http://searxng:8080/search?q=<query>).Expected Behavior
Open-WebUI should pass the user’s search query (e.g.,
"latest news") to SearXNG via theqparameter, generating a valid URL likehttp://searxng:8080/search?q=latest+news.Actual Behavior
The
qparameter in the SearXNG request URL is always empty (q=), resulting in a400error. Key log snippet:Impact
Environment
http://searxng:8080http://searxng:8080/search?q=testreturns valid results).Additional Context
@rgaricano commented on GitHub (Feb 28, 2025):
do you added "- json" to your searxng settings.yml?
&
could you test with
http://searxng:8080/searxng/search?q=<query>as searxng URL on openwebui search settings?