How to Add Private Web Search to Your OpenClaw Agents with SearXNG
Your OpenClaw agent is powerful. But without web search, it's working from memory — and AI memory has a cutoff date.
SearXNG fixes that. It's a free, open-source, self-hosted search engine that wraps Google, Bing, DuckDuckGo, and 60+ other engines into one private API your agents can query in real time. No tracking. No API limits. No cost per search.
This guide walks you through connecting SearXNG to OpenClaw in under 20 minutes.
Why SearXNG Instead of a Search API?
You have options for giving your agents web search:
| Option | Cost | Rate Limits | Privacy | |---|---|---|---| | SearXNG (self-hosted) | $0 | None | Complete | | Serper.dev | $50/month for 5K queries | Yes | No | | Tavily API | $0–$100+/month | Yes | No | | Google Custom Search | $5 per 1,000 queries | Yes | No | | Exa AI | Free tier limited | Yes | No |
For most OpenClaw users running multiple agents, SearXNG is the obvious choice. You install it once and every agent gets unlimited searches.
What the SearXNG Skill Does
The OpenClaw SearXNG skill gives your agents:
- Real-time web results — not cached, not summarized, actual live search
- Multi-engine aggregation — pulls from Google, Bing, DuckDuckGo simultaneously
- Structured output — returns JSON your agents can parse and reason about
- Configurable engines — enable or disable specific sources per query
- Rate-limit free — no caps on how many searches your agents run
Once connected, any of your agents can call it: search("latest AI news") and get real results back in seconds.
Prerequisites
- OpenClaw installed and running
- Docker (for running SearXNG locally) or access to a VPS
- The SearXNG skill pack
- 20 minutes
Step 1: Install SearXNG with Docker
The fastest way to get SearXNG running locally:
# Create a directory for SearXNG
mkdir -p ~/searxng && cd ~/searxng
# Download the config
curl -o searxng/settings.yml https://raw.githubusercontent.com/searxng/searxng/master/searx/settings.yml
# Run SearXNG
docker run -d \
--name searxng \
--restart always \
-p 8080:8080 \
-v ./searxng:/etc/searxng \
-e SEARXNG_BASE_URL="http://localhost:8080/" \
searxng/searxng:latest
Verify it's running:
curl http://localhost:8080/search?q=test&format=json | head -c 200
You should see JSON search results. If you do, SearXNG is live.
On Linux (no Docker):
# Install via pip
pip install searxng
# Or use the one-line installer
export PORT=8080; bash <(curl -sSL https://raw.githubusercontent.com/searxng/searxng-docker/master/start.sh)
Step 2: Configure SearXNG for API Access
By default, SearXNG blocks API access. You need to enable JSON output.
Edit ~/searxng/searxng/settings.yml:
search:
formats:
- html
- json # Add this line
server:
secret_key: "your-random-secret-key-here"
bind_address: "0.0.0.0"
port: 8080
base_url: "http://localhost:8080/"
Restart SearXNG after saving:
docker restart searxng
Test the JSON API:
curl "http://localhost:8080/search?q=openclaw+skill+packs&format=json" | python3 -m json.tool | head -50
You should see structured JSON with search results.
Step 3: Install the OpenClaw SearXNG Skill
Download the skill from openclawskillpacks.com/skills/searxng-local, then install:
# Extract and install
unzip openclaw-searxng-local.zip -d ~/.openclaw/skills/searxng-local/
Configure the skill endpoint:
# Open the skill config
nano ~/.openclaw/skills/searxng-local/config.json
Set your SearXNG URL:
{
"searxng_url": "http://localhost:8080",
"default_engines": ["google", "bing", "duckduckgo"],
"results_per_query": 10,
"timeout_seconds": 10,
"safe_search": 0,
"language": "en"
}
Verify the skill is installed:
openclaw skills list | grep searxng
Step 4: Test Your First Agent Search
Run a quick test to confirm everything is connected:
openclaw agent \
--skill searxng-local \
--message "Search for: OpenClaw skill packs latest release"
You should see real search results returned by your agent, pulled live from the web.
More useful test queries:
# Current news
openclaw agent --skill searxng-local --message "Search for: AI automation news this week"
# Competitor research
openclaw agent --skill searxng-local --message "Search for: n8n alternatives 2026"
# Lead research
openclaw agent --skill searxng-local --message "Search for: roofing contractors Broward County reviews"
Step 5: Connect Search to Your Other Agents
The real power comes from combining SearXNG with your other agents. Here are three setups that work immediately:
Research Agent + SearXNG
Your research agent can now pull live data before generating reports:
# In your agent's SOUL.md, add:
TOOLS:
- searxng-local # Web search
- file-writer # Save findings
The agent will automatically use SearXNG when it needs current information.
Lead Scraper + SearXNG
Enrich scraped leads with real-time web research:
# Example: Research a prospect before cold email
openclaw agent \
--agent sales-agent \
--message "Research ABC Roofing in Broward County. Find their website, recent reviews, and any news. Then draft a personalized outreach email."
The sales agent uses SearXNG to research the company, then writes an email based on what it finds.
Content Agent + SearXNG
Generate blog posts and social content based on current trends:
openclaw agent \
--agent content-agent \
--message "Search for trending AI automation topics this week. Write a LinkedIn post about the most interesting finding."
Hosting SearXNG on a VPS (For Always-On Search)
If you want your agents to have web search 24/7 — not just when your Mac is on — deploy SearXNG to a cheap VPS:
On Hetzner or DigitalOcean ($5/month):
# SSH into your VPS
ssh root@your-vps-ip
# Install Docker
curl -fsSL https://get.docker.com | sh
# Run SearXNG
docker run -d \
--name searxng \
--restart always \
-p 8080:8080 \
-v /opt/searxng:/etc/searxng \
-e SEARXNG_BASE_URL="http://your-vps-ip:8080/" \
searxng/searxng:latest
Then update your skill config to point to your VPS:
{
"searxng_url": "http://your-vps-ip:8080"
}
Now your agents have live web search from anywhere, any time.
Troubleshooting
"Connection refused" when querying:
docker ps | grep searxng # Check if container is running
docker logs searxng # Check for error messages
JSON output not working:
Make sure json is in the formats list in settings.yml and you restarted the container after editing.
Slow search results:
Reduce the number of engines in your config. More engines = slower responses. Start with just google and duckduckgo for speed.
Search results in wrong language:
Set language: "en" in your config and add ?language=en to your test queries.
What to Build Next
With SearXNG connected, your agents can now:
- Monitor competitors — daily searches for competitor news and product launches
- Track keywords — search your target keywords daily and log ranking changes
- Research leads — look up every prospect before outreach automatically
- Generate trend content — search trending topics and create content in real time
- Price monitoring — search competitor pricing pages and log changes
The SearXNG skill is the foundation for any agent that needs to understand the world as it is right now — not as it was when the AI was trained.
👉 Get the OpenClaw SearXNG Local Skill →
Self-hosted. No API key needed. Unlimited queries. Works on Mac or VPS.
Related: OpenClaw Sales Agent | AI Cost Killer: $2.50/Month | Complete OpenClaw Skills Guide
Related Notes
Semantic connections via NVIDIA NV-EmbedQA | 2026-04-07
- [[guide_-using-logged-in-browser-instances-with-openclaw]] ↗️02-products — 69% match
- [[2026-01-18-How-to-build-my-own-Ai-agent-lead-search-engine]] ↗️08-research — 68% match
- [[2026-02-02-OpenClaw-Resources]] ↗️08-research — 68% match
- [[2026-02-09-New-OpenClaw-setups]] ↗️08-research — 68% match
- [[017-4th-March_-OpenClaw-AI-SEO]] ↗️08-research — 67% match
26-year contractor turned AI architect. Runs 25 agents across 5 businesses using OpenClaw and Claude Code. Building the largest Claude Code skills marketplace.
