home / skills / openclaw / skills / local-websearch-1

local-websearch-1 skill

/skills/eg-yks/local-websearch-1

This skill enables private web searching via a self-hosted SearXNG instance, aggregating engines and returning transparent results.

npx playbooks add skill openclaw/skills --skill local-websearch-1

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.6 KB
---
name: searxng
description: Search the web using a self-hosted SearXNG metasearch engine. Aggregates Google, Brave, DuckDuckGo, and more without API keys.
homepage: https://docs.searxng.org
command-dispatch: cli
command: python3 {baseDir}/scripts/searxng_search.py
metadata: {"moltbot":{"emoji":"🔍","requires":{"bins":["python3"],"env":["SEARXNG_URL"]}}}
---

# SearXNG Web Search

Privacy-respecting metasearch via your self-hosted SearXNG instance.

## When to use (trigger phrases)

Use this skill when the user asks:
- "search the web for..."
- "look up..." / "find information about..."
- "what is..." (when current info needed)
- "research..." / "search for..."
- "google..." (redirect to privacy-respecting search)

## Quick start

```bash
python3 {baseDir}/scripts/searxng_search.py "your query"
python3 {baseDir}/scripts/searxng_search.py "query" --count 10
python3 {baseDir}/scripts/searxng_search.py "query" --lang de
```

## Setup

Set `SEARXNG_URL` environment variable:
```bash
export SEARXNG_URL="http://your-searxng-host:8888"
```

## Flags

| Flag | Default | Description |
|------|---------|-------------|
| `-n`, `--count` | 5 | Results to return (1-20) |
| `-l`, `--lang` | auto | Language code (en, de, fr, es, etc.) |

## Output

Returns JSON:
```json
{
  "query": "search terms",
  "count": 5,
  "results": [
    {"title": "...", "url": "...", "description": "...", "engines": ["google", "brave"], "score": 1.5}
  ]
}
```

## Notes

- No API keys needed—SearXNG aggregates upstream engines
- Results include source engines for transparency
- Scores indicate relevance (higher = better)
- For news, add "news" to query or use `--lang` for regional results

Overview

This skill lets you search the web using a self-hosted SearXNG metasearch engine. It performs privacy-respecting searches by aggregating results from multiple upstream engines like Google, Brave, and DuckDuckGo without needing API keys. Results are returned as structured JSON including titles, URLs, descriptions, source engines, and relevance scores. You control the instance URL and result count via simple flags or environment variables.

How this skill works

The skill sends user queries to your configured SearXNG instance and parses the aggregated response into a consistent JSON payload. It reports which upstream engines contributed each result and a numerical relevance score for transparency. Language and result count can be adjusted via flags or environment variables to tailor regional or topical coverage. No third-party API keys are required because SearXNG handles upstream aggregation on your host.

When to use it

  • You need up-to-date web information or quick research without exposing requests to big search providers.
  • Look up facts, definitions, news, or links while preserving privacy and control over the search endpoint.
  • Gather multiple engine perspectives for a single query to compare results and sources.
  • Automate web lookups in scripts or tools that expect JSON-formatted search output.
  • Prefer self-hosted search aggregation over direct use of commercial search APIs.

Best practices

  • Set SEARXNG_URL to your secure, access-controlled instance and use HTTPS when possible.
  • Limit count to a reasonable number (1–20) to avoid large responses and speed up processing.
  • Use language flags to improve regional relevance for news or local results.
  • Include explicit keywords like "news" for time-sensitive queries to bias results toward recent coverage.
  • Validate and sanitize URLs before programmatically following results in downstream workflows.

Example use cases

  • Command-line quick lookup: run the script with a short query to get JSON results for further processing.
  • Research assistant: aggregate links and snippets from multiple engines for a single topic to build a reading list.
  • Content discovery: find relevant articles and compare which engines surface specific sources.
  • Monitoring: daily scripted queries to collect and archive top results for chosen keywords.
  • Integration: feed results into a bot or dashboard that displays titles, descriptions, and source engines.

FAQ

Do I need an API key to use this skill?

No. The skill queries your self-hosted SearXNG instance, which aggregates upstream engines without requiring API keys.

How do I change language or number of results?

Use the --lang flag to set a language code and --count (or -n) to set how many results (1–20). You can also set defaults via environment variables.