DuckDuckGo Integration Documentation
What the Integration Does
DuckDuckGo integration allows easy access to the DuckDuckGo search engine, enabling users to perform web and news searches natively from the Fluo Platform.
Short Description
It provides the capability to integrate DuckDuckGo's search and news functionalities into your system. Typical use cases include enhancing search capabilities within applications or receiving curated news results.
Example Scenarios
- Search the web for up-to-date information without tracking user details.
- Fetch the latest news headlines on a specific subject seamlessly.
Capabilities
What the Integration Enables
- Search: Perform a standard web search using DuckDuckGo.
- News: Retrieve the latest news articles relevant to a provided query.
Input/Output Schemas for Each Capability
- Search
- Input: query (str) - The search term; max_results (int, optional) - Maximum results to fetch.
- Output: A JSON string containing search results.
- News
- Input: query (str) - The news topic query; max_results (int, optional) - Maximum news articles to fetch.
- Output: A JSON string with news results.
Limitations
- Relies on DuckDuckGo's public API endpoints, which can have discrepancies in result freshness.
- Usage of caching can delay updates since results are stored temporarily.
Setup & Configuration
Prerequisites
- Ensure the duckduckgo-search Python package is installed.
Authentication
No authentication or API keys are needed as it uses public APIs.
Step-by-Step Guide
- Install the necessary package:
bash pip install duckduckgo-search
- Initialize the DuckDuckGo toolkit in your environment.
Testing Connection
Verify setup by running a test search query through the integration and checking for valid responses.
How to Use in Agents
Example Configuration
- Enabling Search in an Agent python DuckDuckGoTools(search=True)
- Enabling News in an Agent python DuckDuckGoTools(news=True)
Best Practices
- Use modifiers to refine search queries and get targeted results.
- Enable caching for frequent queries to reduce latency.
Reference Section
- The integration doesn't directly expose API endpoints but leverages the duckduckgo-search library.
- For more details on the DuckDuckGo API, refer to the original service's documentation.