Free Web Search for Local Ollama Setups: DuckDuckGo vs SearXNG
Running OpenClaw with Ollama locally but want web search without paid API keys? This guide covers your two best options for 100% free web search that works with local models.
The Problem
OpenClaw's built-in web_search tool requires either a Brave API key or Perplexity account. If you're running a fully local setup with Ollama (no cloud API keys), you need alternatives.
Option 1: DuckDuckGo (Easiest "No Key" Solution)
The duckduckgo-search skill wraps the Python package of the same name, giving you query โ results without signing up for anything.
Setup:
-
Install the skill via ClawHub:
clawdhub install duckduckgo-search -
Check dependencies:
openclaw skills check(Usually needs
uv+ the pip package) -
Your agent can now search โ pick URLs โ
web_fetcheach for content
Tradeoffs:
- DDG-based approaches can be flaky (rate limits, occasional blocks)
- Still the best "free + no key" option for quick setups
Docs:
Option 2: SearXNG Self-Hosted (Most Reliable)
If you can run Docker, SearXNG is the most stable "free" option. You control it, and you can hit a JSON endpoint directly.
Key gotcha: web_fetch intentionally blocks localhost/private IPs, so you can't call http://127.0.0.1:8080/search?... via web_fetch. Use exec for the SearXNG query, then web_fetch only for the resulting public URLs.
Recommended Workflow:
- Agent receives a question
- Searches via SearXNG (local, using
exec+curl) - Fetches top URLs with
web_fetch - Summarizes and optionally saves to memory
Basic docker-compose setup (local-only):
services:
redis:
image: docker.io/valkey/valkey:8-alpine
restart: unless-stopped
volumes:
- searxng-redis:/data
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
searxng:
image: docker.io/searxng/searxng:latest
restart: unless-stopped
ports:
- "127.0.0.1:8080:8080"
volumes:
- searxng-data:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=http://localhost:8080/
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
depends_on:
- redis
volumes:
searxng-redis:
searxng-data:Create a search skill script (skills/searxng/searxng.sh):
#!/usr/bin/env bash
set -euo pipefail
QUERY="$1"
curl -s "http://127.0.0.1:8080/search?q=$(printf '%s' "$QUERY" | jq -sRr @uri)&format=json" | \
jq -r '.results[:5] | .[] | "\(.title)\n\(.url)\n\(.content)\n---"'SKILL.md for the skill:
# SearXNG Local Search
Search the web using a local SearXNG instance.
## UsagePrerequisites
- SearXNG running on localhost:8080
- jq installed
## Reality Check for Local Models
The search provider is only half the battle โ some local Ollama models are shaky at **tool calling**. If your model won't consistently call tools:
- Tighten prompts: "always search first, then fetch top 3 URLs"
- Use command-dispatch patterns for more deterministic invocation
- Consider swapping to a more tool-reliable model for web-enabled tasks
## TL;DR
| Option | Setup Effort | Reliability | Best For |
|--------|--------------|-------------|----------|
| DuckDuckGo | Low (install skill) | Medium (rate limits) | Quick start, casual use |
| SearXNG | Medium (Docker + skill) | High (you control it) | Production, heavy use |
For most local setups, start with DuckDuckGo. If you hit rate limits or need reliability, graduate to SearXNG.
---
*Based on a helpful discussion in the OpenClaw Discord #help channel. Thanks to dropa200 for the question and the community for the solutions!*
Comments (0)
No comments yet. Be the first to comment!