Self-hosted private web search for OpenClaw
A complete OpenClaw plugin that provides web search using your own SearXNG instance. Zero tracking, zero API costs, 100% private.
Latest: v1.2.0 Chinese content support - Baidu, Sogou, Bilibili, iQiyi + Smart repo search! See CHANGELOG.
- π General search - Web results from multiple search engines
- π° News search - Time-filtered news articles (Chinese news: use general search for better results)
- πΌοΈ Image search - Find images with metadata
- π¬ Video search - Search YouTube, Vimeo, Bilibili, iQiyi, and more
- π» Repository search - Find code on GitHub/GitLab (auto-adds site: operator)
- π‘ Quick answer - Get direct answers to questions
- β Baidu (ηΎεΊ¦) - General search
- β Sogou (ζη) - General search
- β Chinaso News (δΈε½ζη΄’) - News search
- β Bilibili (εε©εε©) - Video search
- β iQiyi (η±ε₯θΊ) - Video search
- π 100% Private - Your SearXNG, your data
- π° Zero cost - No API fees
- β‘ Fast - Localhost or self-hosted
- π― Native integration - Works seamlessly with OpenClaw
- ποΈ Extensible - Easy to add new search types
Before installing claw-search, you need:
- OpenClaw installed and running
- SearXNG instance running (provided setup script)
- Docker (for SearXNG)
Use the provided deployment script:
git clone https://github.com/binglius/claw-search.git
cd claw-search
./deploy.shThe script automatically:
- β Deploys SearXNG if not running
- β Configures JSON API
- β Enables Chinese search engines (baidu, sogou, chinaso, bilibili, iqiyi)
- β Installs the plugin
- β Restarts gateway
cd claw-search
./update.sh --yes # Non-interactive mode
# or
./update.sh # Interactive mode with confirmationopenclaw plugins install https://github.com/binglius/claw-search.gitgit clone https://github.com/binglius/claw-search.git ~/claw-search
openclaw plugins install ~/claw-searchopenclaw plugins enable claw-search
openclaw gateway restartThe plugin works out-of-the-box with default settings. To customize, edit your OpenClaw config:
{
"plugins": {
"entries": {
"claw-search": {
"enabled": true,
"config": {
"baseUrl": "http://localhost:8888",
"maxResults": 10,
"language": "en",
"safesearch": 0,
"timeout": 15
}
}
}
}
}| Option | Type | Default | Description |
|---|---|---|---|
baseUrl |
string | http://localhost:8888 |
Your SearXNG instance URL |
maxResults |
number | 10 |
Maximum results per search (1-100) |
language |
string | en |
ISO 639-1 language code (en, zh, de, etc.) |
safesearch |
number | 0 |
Safe search: 0=off, 1=moderate, 2=strict |
timeout |
number | 15 |
Request timeout in seconds (5-60) |
Once installed, just ask OpenClaw naturally:
- "Search for quantum computing" (uses
search) - "Find recent AI news" (uses
search_news) - "Show me sunset pictures" (uses
search_images) - "Find Python tutorial videos" (uses
search_videos) - "Search for React repositories" (uses
search_repos) - "What is quantum computing?" (uses
quick_answer)
OpenClaw will automatically use the appropriate search tool!
The plugin registers 6 search tools:
General web search across multiple engines.
Example queries:
- "Search for OpenClaw documentation"
- "Find information about SearXNG"
- "Look up Python tutorials"
Time-filtered news search.
Example queries:
- "Find latest AI news"
- "What's happening in quantum computing?"
- "Recent breakthroughs in medicine"
Image search with URLs and metadata.
Example queries:
- "Find sunset images"
- "Show me cat pictures"
- "Search for OpenClaw logo"
Search for videos from YouTube, Vimeo, and other platforms.
Example queries:
- "Find Python tutorial videos"
- "Search for quantum computing lectures"
- "Show me cooking videos"
Search code repositories. Automatically adds site:github.com for better results.
Smart platform detection:
- Default: GitHub
- Query contains "gitlab": GitLab
- Query contains "bitbucket": Bitbucket
Example queries:
- "Find React repositories"
- "Search for Python machine learning projects"
- "Look up Docker alternatives"
- "Find gitlab CI/CD projects" (auto-detects GitLab)
Get direct answers to factual questions.
Example queries:
- "What is quantum computing?"
Image search with URLs and metadata.
Example queries:
- "Find sunset images"
- "Show me cat pictures"
- "Search for OpenClaw logo"
The plugin uses a declarative configuration approach for maximum extensibility:
// Core: Generic search function (DRY principle)
async function performSearch(params) { ... }
// Factory: Create tools from config
function createSearchTool(config) { ... }
// Configuration: Easy to extend!
const searchTools = [
{ name: 'search', category: 'general', formatResult: ... },
{ name: 'search_news', category: 'news', formatResult: ... },
// Add new search type = just 5-10 lines!
];- Zero duplication - All tools share the same search logic
- Easy to extend - New search types require only configuration
- Consistent behavior - All tools follow the same pattern
- Easy to maintain - Fix once, apply everywhere
Want to add music search? Just add a configuration object:
{
name: 'search_music',
description: 'Search for music tracks and albums',
category: 'music',
formatResult: (result, idx) => `${idx + 1}. π΅ ${result.title}\n...`
}That's it! No need to copy-paste 60-70 lines of code.
- SearXNG instance running (Docker or native)
- JSON API enabled in SearXNG
- OpenClaw >= 2026.2.0
Don't have SearXNG? Here's a 2-minute setup:
# 1. Run SearXNG in Docker
docker run -d \
--name searxng \
--restart=always \
-p 8888:8080 \
searxng/searxng:latest
# 2. Enable JSON API
docker exec searxng sed -i '/formats:/,/- html/{s/- html/- html\n - json/}' /etc/searxng/settings.yml
docker restart searxng
# 3. Test it
curl "http://localhost:8888/search?q=test&format=json" | jqDone! π
# List all plugins
openclaw plugins list
# Check claw-search details
openclaw plugins info claw-searchExpected output:
claw-search
Self-hosted private web search using SearXNG
Status: loaded
Tools: search, search_news, search_images
Version: 1.0.0
Ask OpenClaw:
"Search for OpenClaw"
You should see formatted search results!
Check installation:
openclaw plugins list | grep claw-searchCheck for errors:
openclaw plugins doctorReinstall:
openclaw plugins uninstall claw-search
openclaw plugins install ~/claw-search
openclaw gateway restart1. Check SearXNG is running:
curl http://localhost:88882. Check JSON API:
curl "http://localhost:8888/search?q=test&format=json" | jq3. Check baseUrl in config:
openclaw config get plugins.entries.claw-search.config.baseUrl4. Check logs:
openclaw logs | grep claw-search- Increase
timeoutin plugin config - Check network connectivity to SearXNG
- Verify
baseUrlis correct and accessible
- Confirm SearXNG has search engines enabled
- Test URL directly in browser:
http://localhost:8888/search?q=test - Check SearXNG configuration and logs
β
Self-hosted - All queries to your SearXNG instance
β
No tracking - Zero telemetry
β
No third-party APIs - Complete independence
β
No API keys - Nothing to leak
β
Full control - Your infrastructure, your rules
| Feature | claw-search | Brave API | Google API |
|---|---|---|---|
| Privacy | β 100% | β Tracked | |
| Cost | β Free | β $5/month | β Pay per use |
| Rate Limits | β None | β 2000/month | β Limited |
| Self-hosted | β Yes | β No | β No |
| Setup | β‘ 5 min | π Register | π Register |
cd ~/claw-search
git pull
openclaw plugins install .
openclaw gateway restartdocker pull searxng/searxng:latest
docker stop searxng
docker rm searxng
# Re-run docker run command from setupopenclaw plugins uninstall claw-search
openclaw gateway restartclaw-search/
βββ package.json # NPM manifest
βββ openclaw.plugin.json # Plugin manifest with config schema
βββ index.js # Plugin implementation (3 tools)
βββ SKILL.md # Agent documentation
βββ README.md # This file
βββ QUICKSTART.md # Quick start guide
βββ LICENSE # MIT License
βββ .gitignore # Git ignore rules
# Install from local directory
openclaw plugins install ~/claw-search
# Check it loaded
openclaw plugins list | grep claw-search
# View tools
openclaw plugins info claw-search
# Test with OpenClaw
# Just ask to search for something!The plugin exports a default function that receives the OpenClaw API:
export default function (api) {
// Register tools
api.registerTool({
name: 'search',
description: '...',
parameters: { /* JSON Schema */ },
async execute(_id, params) {
// Tool implementation
return { content: [{ type: 'text', text: '...' }] };
}
});
}Tools are automatically discovered and made available to the agent.
Contributions welcome!
- Issues: Report bugs or request features
- Pull Requests: Improvements and fixes
- Feedback: Share your experience
MIT - See LICENSE
- Built for OpenClaw users who value privacy
- Powered by SearXNG
- Inspired by the need for self-hosted search
- Documentation: SKILL.md, QUICKSTART.md
- Issues: https://github.com/binglius/claw-search/issues
- OpenClaw Docs: https://docs.openclaw.ai/
claw-search - Own your search. Own your data. π¦π
Because your searches are nobody's business but yours.