home / skills / openclaw / skills / private-web-search-searchxng
This skill enables private self-hosted web search using SearXNG, protecting privacy, blocking external APIs, and avoiding tracking in AI workflows.
npx playbooks add skill openclaw/skills --skill private-web-search-searchxngReview the files below or copy the command above to add this skill to your agents.
---
name: private-web-search-searchxng
description: Self-hosted private web search using SearXNG. Use when privacy is important, external APIs are blocked, you need search without tracking, or want to avoid paid search APIs.
metadata:
{
"openclaw":
{
"requires": { "bins": ["docker", "curl", "jq"] },
"install":
[
{
"id": "docker",
"kind": "bin",
"command": "docker --version",
"label": "Docker required",
},
],
},
}
---
# Private Web Search (SearXNG)
Privacy-respecting, self-hosted metasearch engine for AI agents.
## Quick Setup
```bash
# 1. Start container
docker run -d --name searxng -p 8080:8080 -e BASE_URL=http://localhost:8080/ searxng/searxng
# 2. Enable JSON API
docker exec searxng sed -i 's/ formats:/ formats:\n - json/' /etc/searxng/settings.yml
docker restart searxng
# 3. Verify
curl -sL "http://localhost:8080/search?q=test&format=json" | jq '.results[0]'
```
## Usage
### Basic Search
```bash
curl -sL "http://localhost:8080/search?q=YOUR_QUERY&format=json" | jq '.results[:10]'
```
### Using the Helper Script
```bash
./scripts/search.sh "openclaw ai" 5
```
### Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| SEARXNG_PORT | 8080 | Container port |
| SEARXNG_HOST | localhost | Server host |
| BASE_URL | http://localhost:8080 | Public URL |
## Available Engines
Google, Bing, DuckDuckGo, Brave, Startpage, Wikipedia, and more.
## Management
```bash
docker start searxng # Start
docker stop searxng # Stop
docker logs searxng # View logs
docker rm searxng -f # Remove
```
## Troubleshooting
| Issue | Solution |
|-------|----------|
| No results | Check `docker logs searxng` |
| 403 Forbidden | Enable JSON format (step 2) |
| Connection refused | Run `docker start searxng` |
This skill provides a self-hosted, privacy-respecting web search powered by SearXNG. It delivers metasearch results without tracking or reliance on paid external APIs, ideal for AI agents running in restricted or privacy-sensitive environments. The setup uses a lightweight containerized deployment and a simple JSON API for integrations.
The skill runs SearXNG in a Docker container and exposes a JSON search endpoint that aggregates results from multiple engines (Google, Bing, DuckDuckGo, Brave, Startpage, Wikipedia, etc.). It configures the JSON output format and offers helper scripts for querying and limiting results. Agents call the local /search?q=...&format=json endpoint to retrieve structured results for processing.
How do I enable JSON output?
Edit the SearXNG settings to include the json format under formats, then restart the container. Example: modify /etc/searxng/settings.yml to add '- json' under formats.
What if I get no results or a 403 error?
Check the container logs with docker logs searxng; ensure JSON format is enabled and the container can reach search engines. A 403 often indicates the JSON format is not configured.