If you're as lazy as I am, here is the summary of the brilliant insights from this thread:
Enable 'json' in SearXNG (will not make the search interface public):
Open settings.yml for editing, e.g. via File Manager
Add json in search under formats
Example:
formats:
- html
- json <-- add this
Note the Port in of SearXNG
Configure OpenWebUI App to use SearXNG as web search:
In OpenWebUI, go to Admin Settings → Web Search
Enter URL: Paste the Searxng URL but replace <searx app id> and <searx port> (port is probably 8888)
http://<searx app id>:<searx port>/search?q=<query>&language=auto&time_range=&safesearch=0&categories=social+media,map,it,general,science,news&format=json
This bypasses OAuth internally so that OpenWebUI directly accesses SearXNG