π¦ ClawHub
Web Search via SearXNG
by @simoncatbot
Search the web using SearXNG meta-search engine. Use when the user wants to search the web, find current information, look up facts, news, or any query that...
π‘ Examples
CLI
# Basic search
python scripts/search.py "python async tutorial"Limit results
python scripts/search.py "machine learning" --limit 5Specific category
python scripts/search.py "breaking news" --category newsTime range
python scripts/search.py "tech announcements" --time weekSpecific engines
python scripts/search.py "wikipedia python" --engines wikipediaJSON output
python scripts/search.py "docker tutorial" --json
Python API
from searxng import SearXNGClientInitialize
client = SearXNGClient()Search
results = client.search("quantum computing")Access results
for result in results["results"]:
print(f"{result['title']}: {result['url']}")Search with options
results = client.search(
query="AI safety",
category="news",
time_range="month",
limit=5
)
βοΈ Configuration
Edit config/searxng.yaml:
# SearXNG instance URL
Use public instance or your own
base_url: "https://searx.be" # or your local instanceDefault search settings
defaults:
language: "en-US"
safesearch: 0 # 0 = off, 1 = moderate, 2 = strict
time_range: "" # day, week, month, year
results_per_page: 10Preferred engines (optional)
engines:
- google
- duckduckgo
- bing
- brave
- wikipediaCategories
categories:
general: "general"
news: "news"
images: "images"
videos: "videos"
files: "files"
π Tips & Best Practices
"Connection refused"
# Check if SearXNG instance is reachable
curl https://your-searx-instance/healthz
"No results"
--engines google,duckduckgo--category general"Rate limited"
TERMINAL
clawhub install web-search-searxng