Enhanced web and package repository search using local SearXNG instance
77
73%
Does it follow best practices?
Impact
95%
3.80xAverage score across 3 eval scenarios
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./searxng-search/SKILL.mdSearXNG is a privacy-respecting metasearch engine that you can run locally. It aggregates results from multiple search engines and package repositories, returning clean JSON output.
Start SearXNG:
start-searxng --detachThis will:
http://localhost:8888Stop SearXNG:
podman stop searxng # or: docker stop searxngCustom port:
start-searxng --port 9999 --detach| Task | Command | Category |
|---|---|---|
| General web search | curl "http://localhost:8888/search?q=<query>&format=json" | general |
| Search Cargo/crates.io | curl "http://localhost:8888/search?q=<crate>&format=json&categories=cargo" | cargo |
| Search npm packages | curl "http://localhost:8888/search?q=<pkg>&format=json&categories=packages" | packages |
| Search code repositories | curl "http://localhost:8888/search?q=<query>&format=json&categories=repos" | repos |
| Search IT resources | curl "http://localhost:8888/search?q=<query>&format=json&categories=it" | it |
| Limit results | Add &limit=N to URL | - |
| Multiple categories | &categories=cat1,cat2 | - |
Run to see all categories:
curl -s "http://localhost:8888/config" | jq '.categories'Notable categories:
See package-engine-status.md for comprehensive package search testing results.
{
"query": "search term",
"number_of_results": 0,
"results": [
{
"url": "https://example.com",
"title": "Result Title",
"content": "Snippet of content...",
"publishedDate": "2025-01-01T00:00:00",
"engine": "duckduckgo",
"engines": ["duckduckgo", "startpage"],
"score": 3.0,
"category": "general"
}
],
"answers": [], // Direct answers/infoboxes
"suggestions": [], // Search suggestions
"corrections": [], // Query corrections
"infoboxes": [], // Knowledge panels
"unresponsive_engines": []
}Cargo/Rust crates:
curl -s "http://localhost:8888/search?q=tokio&format=json&categories=cargo" | \
jq '.results[] | {title, url, content}'npm packages:
curl -s "http://localhost:8888/search?q=express&format=json&categories=packages" | \
jq '.results[] | select(.engines[] == "npm") | {title, url, content}'PyPI packages (workaround - see below):
# PyPI engine is enabled but not returning results in current SearXNG config
# Use direct API or qypi CLI instead (see PyPI Workaround section)IT/Tech search:
curl -s "http://localhost:8888/search?q=rust+async&format=json&categories=it" | \
jq '.results[0:5] | .[] | {title, url, engines}'GitHub repositories:
curl -s "http://localhost:8888/search?q=machine+learning&format=json&categories=repos" | \
jq '.results[] | select(.engines[] == "github") | {title, url}'Get top 3 results:
curl -s "http://localhost:8888/search?q=rust+ownership&format=json" | \
jq '.results[0:3] | .[] | {title, url, content}'Check which engines returned results:
curl -s "http://localhost:8888/search?q=python&format=json" | \
jq '.results[0].engines'Get answer boxes/infoboxes:
curl -s "http://localhost:8888/search?q=rust+language&format=json" | \
jq '.infoboxes, .answers'Since PyPI is not returning results in SearXNG (despite being enabled), use these alternatives:
# Search (limited to simple package name matching)
curl -s "https://pypi.org/pypi/<package>/json" | jq '.info | {name, summary, version, home_page}'
# Example:
curl -s "https://pypi.org/pypi/requests/json" | jq '.info.summary'# Install
uvx qypi search pandas --json
# Get package info
uvx qypi info requests --json
# List releases
uvx qypi releases flask --jsonSee references/pypi-direct-search.md for more details.
Create a helper function:
def searx [
query: string,
--category (-c): string = "general",
--limit (-l): int = 10
] {
http get $"http://localhost:8888/search?q=($query | url encode)&format=json&categories=($category)"
| get results
| first $limit
| select title url content engines
}Usage:
searx "tokio async" --category cargo --limit 5
searx "flask tutorial" --category generalCheck SearXNG config:
curl -s "http://localhost:8888/config" | jq '.engines[] | select(.name == "pypi")'Check for engine errors:
curl -s "http://localhost:8888/search?q=test&format=json" | jq '.unresponsive_engines'Test specific engine:
curl -s "http://localhost:8888/search?q=flask&format=json&engines=pypi" | jq .categories=packages or categories=it which also include crates.ioThe start-searxng script creates a minimal configuration automatically:
start-searxng --helpDefault config includes:
use_default_settings: true (inherits all SearXNG defaults)start-searxng --config /path/to/your/config/dirYour config directory should contain settings.yml.
# Create config
mkdir -p /tmp/searxng-config
cat > /tmp/searxng-config/settings.yml << 'EOF'
use_default_settings: true
search:
formats:
- html
- json
server:
secret_key: "change-me-in-production"
bind_address: "0.0.0.0"
port: 8080
EOF
# Start with podman
podman run --rm -d --name searxng \
-p 8888:8080 \
-v /tmp/searxng-config:/etc/searxng:Z \
docker.io/searxng/searxng:latest
# Or with docker
docker run --rm -d --name searxng \
-p 8888:8080 \
-v /tmp/searxng-config:/etc/searxng \
docker.io/searxng/searxng:latestpodman logs searxng # or: docker logs searxngSee SearXNG Settings Documentation for all options.
Minimal config to add JSON output to defaults:
use_default_settings: true
search:
formats:
- html
- jsonYPares/agent-skills
e2b6eda
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.