[GH-ISSUE #24428] issue: DuckDuckGo searches through DDGS returns "No results found" #123610

Closed
opened 2026-05-21 02:56:29 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @MidKnightXI on GitHub (May 7, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24428

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

9.2 slim

Ollama Version (if applicable)

No response

Operating System

Fedora/Docker

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

The searches should complete properly as it does with other search engines like Google does.

Actual Behavior

DuckDuckGo returns a "No results found"

Steps to Reproduce

  1. Enable Web search
  2. Add DDGS as provider and duckduckgo as the search engine
  3. Ask anything to any model with the search tool activated to look up on the web
  4. ddg returns "No results found"

Logs & Screenshots

_open-webui_logs.txt

Additional Information

I already updated DDGS to its latest version to fix some previous issues in my container fyi

Originally created by @MidKnightXI on GitHub (May 7, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24428 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 9.2 slim ### Ollama Version (if applicable) _No response_ ### Operating System Fedora/Docker ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior The searches should complete properly as it does with other search engines like Google does. ### Actual Behavior DuckDuckGo returns a "No results found" ### Steps to Reproduce 1. Enable Web search 2. Add DDGS as provider and duckduckgo as the search engine 3. Ask anything to any model with the search tool activated to look up on the web 4. ddg returns "No results found" ### Logs & Screenshots [_open-webui_logs.txt](https://github.com/user-attachments/files/27474113/_open-webui_logs.txt) ### Additional Information I already updated DDGS to its latest version to fix some previous issues in my container fyi
GiteaMirror added the bug label 2026-05-21 02:56:29 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (May 7, 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. 🟢 #24188 Bug: DuckDuckGo web search fails with AttributeError: 'NoneType' object has no attribute 'split' when using ddgs >= 9.x
    This is the closest match: it is specifically about DuckDuckGo web search failing in Open WebUI with DDGS 9.x. The root cause discussed there could plausibly surface as a generic “No results found” symptom in the current report.
    by soulhakr

  2. 🟣 #21642 issue: DDGS not working with version 0.9.2 and more
    This earlier DDGS regression report covers DuckDuckGo web search breaking in Open WebUI 0.9.2/0.9.3, which is the same version range as the new issue. It indicates an existing DDGS integration problem rather than a new isolated bug.
    by pmasson91 · bug

  3. 🟣 #12349 issue: Can't use DuckDuckGo
    This older issue reports DuckDuckGo returning 'No search results found' in Open WebUI, making it directly related by symptom even though the specific stack/version differs.
    by eccentricpark · bug

  4. 🟣 #13194 issue: Web Search with DuckDuckGo broken
    This issue is about DuckDuckGo web search being broken in Open WebUI and helps establish that DDG integration failures have occurred before. The theme and subsystem are the same, though the observed error differs.
    by discostur · bug

  5. 🟣 #13666 issue: Websearch DuckDuckgo and Searxng - search engine failing
    This issue mentions DuckDuckGo websearch failing and producing no response/empty JSON, which is closely aligned with the current 'No results found' behavior.
    by Shamoonmohd · bug


💡 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:4396019320 --> @owui-terminator[bot] commented on GitHub (May 7, 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. 🟢 [#24188](https://github.com/open-webui/open-webui/issues/24188) **Bug: DuckDuckGo web search fails with `AttributeError: 'NoneType' object has no attribute 'split'` when using ddgs >= 9.x** *This is the closest match: it is specifically about DuckDuckGo web search failing in Open WebUI with DDGS 9.x. The root cause discussed there could plausibly surface as a generic “No results found” symptom in the current report.* *by soulhakr* 2. 🟣 [#21642](https://github.com/open-webui/open-webui/issues/21642) **issue: DDGS not working with version 0.9.2 and more** *This earlier DDGS regression report covers DuckDuckGo web search breaking in Open WebUI 0.9.2/0.9.3, which is the same version range as the new issue. It indicates an existing DDGS integration problem rather than a new isolated bug.* *by pmasson91 · `bug`* 3. 🟣 [#12349](https://github.com/open-webui/open-webui/issues/12349) **issue: Can't use DuckDuckGo** *This older issue reports DuckDuckGo returning 'No search results found' in Open WebUI, making it directly related by symptom even though the specific stack/version differs.* *by eccentricpark · `bug`* 4. 🟣 [#13194](https://github.com/open-webui/open-webui/issues/13194) **issue: Web Search with DuckDuckGo broken** *This issue is about DuckDuckGo web search being broken in Open WebUI and helps establish that DDG integration failures have occurred before. The theme and subsystem are the same, though the observed error differs.* *by discostur · `bug`* 5. 🟣 [#13666](https://github.com/open-webui/open-webui/issues/13666) **issue: Websearch DuckDuckgo and Searxng - search engine failing** *This issue mentions DuckDuckGo websearch failing and producing no response/empty JSON, which is closely aligned with the current 'No results found' behavior.* *by Shamoonmohd · `bug`* --- 💡 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 (May 8, 2026):

https://github.com/open-webui/open-webui/issues/24188

<!-- gh-comment-id:4408263730 --> @tjbck commented on GitHub (May 8, 2026): https://github.com/open-webui/open-webui/issues/24188
Author
Owner

@parsalotfy commented on GitHub (May 18, 2026):

Image

Hi @tjbck
I stilkl get the same error. No sources found. I tested both tavily and Exa.

<!-- gh-comment-id:4476402820 --> @parsalotfy commented on GitHub (May 18, 2026): <img width="954" height="665" alt="Image" src="https://github.com/user-attachments/assets/a6640f5a-5443-4f27-8358-fd6a27646b03" /> Hi @tjbck I stilkl get the same error. No sources found. I tested both tavily and Exa.
Author
Owner

@kkk112 commented on GitHub (May 18, 2026):

DDGS backend doesn't support open-webui or any other crawl robot

I use Gemini to figure it out, the core problem is duckduckgo search backend will block our request and then return "400 Bad Request", if the user who only choose DuckDuckGo for backend, this critical error may occur, so I suggest to choose Brave or yandex for backend.

Below is a part of duckduckgo.py I suggest to modify the origin code to this

    import logging
    from typing import Optional
    from open_webui.retrieval.web.main import SearchResult, get_filtered_results
    from ddgs import DDGS
    from ddgs.exceptions import RatelimitException
    log = logging.getLogger(__name__)
    def search_duckduckgo(
        query: str,
        count: int,
        filter_list: Optional[list[str]] = None,
        concurrent_requests: Optional[int] = None,
        backend: Optional[str] = 'auto',
    ) -> list[SearchResult]:
        """
        Search using DuckDuckGo's Search API and return the results as a list of SearchResult objects.
        Args:
            query (str): The query to search for
            count (int): The number of results to return
            backend (str): The search backend to use (auto, duckduckgo, google, brave, etc.)
    
        Returns:
            list[SearchResult]: A list of search results
        """
        # Use the DDGS context manager to create a DDGS object
        search_results = []
        with DDGS() as ddgs:
            if concurrent_requests:
                ddgs.threads = concurrent_requests
            # Use the ddgs.text() method to perform the search with smart fallback
            backends_to_try = [backend]
            if backend == 'duckduckgo' or not backend:
                # If the user-configured backend is duckduckgo, add braves, yandex and auto as fallbacks
                backends_to_try.extend(['brave', 'yandex', 'auto'])            
            for b in backends_to_try:
                try:
                    log.info(f"Attempting search with backend: {b}...")
                    search_results = ddgs.text(query, safesearch='moderate', max_results=count, backend=b)
                    if search_results:
                        log.info(f"Successfully retrieved {len(search_results)} results with backend {b}!")
                        break
                except Exception as e:
                    log.warning(f"Backend '{b}' failed or got blocked: {e}. Trying next...")
                    continue
            else:
                log.error("All search backends failed to retrieve results.")
                search_results = []
        if filter_list:
            search_results = get_filtered_results(search_results, filter_list)
    
        # Return the list of search results
        return [
            SearchResult(
                link=result['href'],
                title=result.get('title'),
                snippet=result.get('body'),
            )
            for result in search_results
        ]
<!-- gh-comment-id:4479362492 --> @kkk112 commented on GitHub (May 18, 2026): # DDGS backend doesn't support open-webui or any other crawl robot I use Gemini to figure it out, the core problem is duckduckgo search backend will block our request and then return "400 Bad Request", if the user who only choose DuckDuckGo for backend, this critical error may occur, so I suggest to choose `Brave` or `yandex` for backend. Below is a part of duckduckgo.py I suggest to modify the origin code to this import logging from typing import Optional from open_webui.retrieval.web.main import SearchResult, get_filtered_results from ddgs import DDGS from ddgs.exceptions import RatelimitException log = logging.getLogger(__name__) def search_duckduckgo( query: str, count: int, filter_list: Optional[list[str]] = None, concurrent_requests: Optional[int] = None, backend: Optional[str] = 'auto', ) -> list[SearchResult]: """ Search using DuckDuckGo's Search API and return the results as a list of SearchResult objects. Args: query (str): The query to search for count (int): The number of results to return backend (str): The search backend to use (auto, duckduckgo, google, brave, etc.) Returns: list[SearchResult]: A list of search results """ # Use the DDGS context manager to create a DDGS object search_results = [] with DDGS() as ddgs: if concurrent_requests: ddgs.threads = concurrent_requests # Use the ddgs.text() method to perform the search with smart fallback backends_to_try = [backend] if backend == 'duckduckgo' or not backend: # If the user-configured backend is duckduckgo, add braves, yandex and auto as fallbacks backends_to_try.extend(['brave', 'yandex', 'auto']) for b in backends_to_try: try: log.info(f"Attempting search with backend: {b}...") search_results = ddgs.text(query, safesearch='moderate', max_results=count, backend=b) if search_results: log.info(f"Successfully retrieved {len(search_results)} results with backend {b}!") break except Exception as e: log.warning(f"Backend '{b}' failed or got blocked: {e}. Trying next...") continue else: log.error("All search backends failed to retrieve results.") search_results = [] if filter_list: search_results = get_filtered_results(search_results, filter_list) # Return the list of search results return [ SearchResult( link=result['href'], title=result.get('title'), snippet=result.get('body'), ) for result in search_results ]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#123610