[PR #2499] FEAT: Add DuckDuckGo Search Tool for Enhanced Privacy-Focused Search Functionality #23678

Closed
opened 2026-02-21 20:21:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/2499

State: closed
Merged: Yes


Description

This change introduces a new DuckDuckGo search tool to our application, enabling users to perform searches through the DuckDuckGo search engine directly. The motivation behind this feature is to provide a privacy-focused alternative to traditional search engines, aligning with the increasing user demand for data protection and privacy. This tool leverages the langchain library for interacting with DuckDuckGo's API, fetching search results that include snippets, links, and titles.

Fixes # (issue)

Dependencies:

  • duckduckgo-search: Required for interfacing with DuckDuckGo's API. This dependency has been added to the project's requirements.txt file.

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tests will include verifying the correct retrieval of search results from DuckDuckGo, ensuring that the tool handles errors gracefully, and checking that all user-configurable search parameters are respected.

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
**Original Pull Request:** https://github.com/langgenius/dify/pull/2499 **State:** closed **Merged:** Yes --- # Description This change introduces a new DuckDuckGo search tool to our application, enabling users to perform searches through the DuckDuckGo search engine directly. The motivation behind this feature is to provide a privacy-focused alternative to traditional search engines, aligning with the increasing user demand for data protection and privacy. This tool leverages the langchain library for interacting with DuckDuckGo's API, fetching search results that include snippets, links, and titles. Fixes # (issue) ## Dependencies: - duckduckgo-search: Required for interfacing with DuckDuckGo's API. This dependency has been added to the project's requirements.txt file. ## Type of Change Please delete options that are not relevant. - [x] New feature (non-breaking change which adds functionality) # How Has This Been Tested? Tests will include verifying the correct retrieval of search results from DuckDuckGo, ensuring that the tool handles errors gracefully, and checking that all user-configurable search parameters are respected. # Suggested Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods - [x] `optional` I have made corresponding changes to the documentation
yindo added the pull-request label 2026-02-21 20:21:33 -05:00
yindo closed this issue 2026-02-21 20:21:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#23678