[GH-ISSUE #12649] feat: How to change DuckDuckgo-search version to 8.0.0? #16668

Closed
opened 2026-04-19 22:33:25 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @eccentricpark on GitHub (Apr 9, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12649

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I use web search service to use DuckDuckgo.
but, print "error searching", "No search results found".
I stressed it.

Desired Solution you'd like

After several attempts, I found the reason why DuckDucko printed the error.

please consider my idea.

Alternatives Considered

First of all, I'm using a docker.

  1. Update DuckDuckGo version to 8.0.0.

  2. Set the timeout to 15 seconds or more.
    /backend/open_webui/retrieval/web/duckduckgo.py

    with DDGS(timeout=15) as ddgs:
        # Use the ddgs.text() method to perform the search
        ddgs_gen = ddgs.text(
            query, 
            safesearch="moderate", 
            max_results=count, 
            backend="api"
        )
        # Check if there are search results
        if ddgs_gen:
            # Convert the search results into a list
            search_results = [r for r in ddgs_gen]

  1. I don't know Why Error DuckDuckgo API?
    so, I found it can get search result if backend parameter change 'api' to 'html'.
    and, I add parameter timelimit, because keep up to date.

/backend/open_webui/retrieval/web/duckduckgo.py

    with DDGS(timeout=15) as ddgs:
        # Use the ddgs.text() method to perform the search
        ddgs_gen = ddgs.text(
            query, 
            safesearch="moderate", 
            max_results=count, 
            backend="html", # change api to html
            timelimit="y" # add parameter
        )
        # Check if there are search results
        if ddgs_gen:
            # Convert the search results into a list
            search_results = [r for r in ddgs_gen]

  1. Result. I found search result.

Image

Additional Context

No response

Originally created by @eccentricpark on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12649 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I use web search service to use DuckDuckgo. but, print "error searching", "No search results found". I stressed it. ### Desired Solution you'd like After several attempts, I found the reason why DuckDucko printed the error. please consider my idea. ### Alternatives Considered First of all, I'm using a docker. 1. Update DuckDuckGo version to 8.0.0. 2. Set the timeout to 15 seconds or more. /backend/open_webui/retrieval/web/duckduckgo.py ``` with DDGS(timeout=15) as ddgs: # Use the ddgs.text() method to perform the search ddgs_gen = ddgs.text( query, safesearch="moderate", max_results=count, backend="api" ) # Check if there are search results if ddgs_gen: # Convert the search results into a list search_results = [r for r in ddgs_gen] ``` 3. I don't know Why Error DuckDuckgo API? so, I found it can get search result if backend parameter change 'api' to 'html'. and, I add parameter timelimit, because keep up to date. /backend/open_webui/retrieval/web/duckduckgo.py ``` with DDGS(timeout=15) as ddgs: # Use the ddgs.text() method to perform the search ddgs_gen = ddgs.text( query, safesearch="moderate", max_results=count, backend="html", # change api to html timelimit="y" # add parameter ) # Check if there are search results if ddgs_gen: # Convert the search results into a list search_results = [r for r in ddgs_gen] ``` 4. Result. I found search result. ![Image](https://github.com/user-attachments/assets/3f109ea1-6347-4710-9ec0-4d7cd0decc70) ### Additional Context _No response_
Author
Owner

@eccentricpark commented on GitHub (Apr 9, 2025):

The answers in the image used Llama3.2-3B.

<!-- gh-comment-id:2789169291 --> @eccentricpark commented on GitHub (Apr 9, 2025): The answers in the image used Llama3.2-3B.
Author
Owner

@tjbck commented on GitHub (Apr 10, 2025):

Bumped in dev.

<!-- gh-comment-id:2794294017 --> @tjbck commented on GitHub (Apr 10, 2025): Bumped in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16668