zeroclaw-labs/zeroclaw · error

DuckDuckGo blocked the automated search request. Try…

Error message

DuckDuckGo blocked the automated search request. Try configuring SearXNG, Brave, or Tavily as the web search provider.

What it means

Sentinel from search_duckduckgo_at: DuckDuckGo's bot protection blocked the scrape-style HTML search (403, anomaly modal, or verification page). It deliberately tells the caller this provider is unavailable and a real search API (SearXNG, Brave, Tavily) should be configured instead.

Solutions

  1. Configure SearXNG, Brave, or Tavily as the web search provider via `zeroclaw config set tools.web_search.provider <name>` and set its API key/URL.
  2. Reduce request rate or retry later if DuckDuckGo rate-limited the request.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/zeroclaw-tools/src/web_search_tool.rs:204 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/8638b177e089ef86. Report an issue: GitHub.

Appendix: source

Thrown at crates/zeroclaw-tools/src/web_search_tool.rs:204

    ) -> anyhow::Result<String> {
        let encoded_query = urlencoding::encode(query);
        let search_url = format!("{}?q={}", endpoint_url, encoded_query);

        let builder = reqwest::Client::builder()
            .timeout(Duration::from_secs(self.timeout_secs))
            .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36");
        let builder =
            zeroclaw_config::schema::apply_runtime_proxy_to_builder(builder, "tool.web_search");
        let client = builder.build()?;

        let response = client.get(&search_url).send().await?;
        let status = response.status();
        let final_url_is_block =
            contains_ascii_case_insensitive(response.url().as_str(), "/wr.do?");

        if !status.is_success() {
            if let Some(message) = duckduckgo_block_message(status, final_url_is_block, false) {
                anyhow::bail!(message);
            }
            return Err(http_search_failure("duckduckgo", status));
        }

        let html = response.text().await?;
        let html_contains_block = contains_ascii_case_insensitive(&html, "/wr.do?")
            || contains_ascii_case_insensitive(&html, "anomaly-modal");
        if let Some(message) =
            duckduckgo_block_message(status, final_url_is_block, html_contains_block)
        {
            anyhow::bail!(message);
        }
        self.parse_duckduckgo_results(&html, query)
    }

    fn parse_duckduckgo_results(&self, html: &str, query: &str) -> anyhow::Result<String> {
        // Extract result links: <a class="result__a" href="...">Title</a>
        let link_regex = Regex::new(

View on GitHub (pinned to 88bb9c8533)