> ## Documentation Index
> Fetch the complete documentation index at: https://agdiai-597e782f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DuckDuckGo Search

# DuckDuckGo Search

Agdi supports DuckDuckGo as a **key-free** `web_search` provider. No API
key or account is required.

> [!WARNING]
>
> DuckDuckGo is an **experimental, unofficial** integration that pulls results
> from DuckDuckGo's non-JavaScript search pages — not an official API. Expect
> occasional breakage from bot-challenge pages or HTML changes.

## Setup

No API key needed — just set DuckDuckGo as your provider:

**1. Configure**

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
agdi configure --section web
# Select "duckduckgo" as the provider
```

## Config

```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  tools: {
    web: {
      search: {
        provider: "duckduckgo",
      },
    },
  },
}
```

Optional plugin-level settings for region and SafeSearch:

```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  plugins: {
    entries: {
      duckduckgo: {
        config: {
          webSearch: {
            region: "us-en", // DuckDuckGo region code
            safeSearch: "moderate", // "strict", "moderate", or "off"
          },
        },
      },
    },
  },
}
```

## Tool parameters

| Parameter | Description |
| - | - |
| `query` | Search query (required) |
| `count` | Results to return (1-10, default: 5) |
| `region` | DuckDuckGo region code (e.g. `us-en`, `uk-en`, `de-de`) |
| `safeSearch` | SafeSearch level: `strict`, `moderate` (default), or `off` |

Region and SafeSearch can also be set in plugin config (see above) — tool
parameters override config values per-query.

## Notes

* **No API key** — works out of the box, zero configuration
* **Experimental** — gathers results from DuckDuckGo's non-JavaScript HTML
  search pages, not an official API or SDK
* **Bot-challenge risk** — DuckDuckGo may serve CAPTCHAs or block requests
  under heavy or automated use
* **HTML parsing** — results depend on page structure, which can change without
  notice
* **Auto-detection order** — DuckDuckGo is checked last (order 100) in
  auto-detection, so any API-backed provider with a key takes priority
* **SafeSearch defaults to moderate** when not configured

> [!TIP]
>
> For production use, consider [Brave Search](https://agdiai-597e782f.mintlify.site/tools/brave-search.md) (free tier
> available) or another API-backed provider.

## Related

* [Web Search overview](https://agdiai-597e782f.mintlify.site/tools/web.md) -- all providers and auto-detection
* [Brave Search](https://agdiai-597e782f.mintlify.site/tools/brave-search.md) -- structured results with free tier
* [Exa Search](https://agdiai-597e782f.mintlify.site/tools/exa-search.md) -- neural search with content extraction


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.