43 lines
1.4 KiB
Markdown
43 lines
1.4 KiB
Markdown
# SearXNG — Self-Hosted Search Engine
|
|
|
|
Deployed on **Core** (`/root/docker/searxng/`) via Docker Compose. Used as a local search engine when Firecrawl's API key is not configured.
|
|
|
|
## Connection details
|
|
- **URL:** `http://127.0.0.1:8888`
|
|
- **JSON API:** `http://127.0.0.1:8888/search?q=QUERY&format=json`
|
|
- **Container:** `searxng`
|
|
- **Auto-start:** Docker restart policy
|
|
- **Settings:** `/root/docker/searxng/searxng-data/settings.yml`
|
|
|
|
## Configuration
|
|
The settings.yml file enables both HTML and JSON formats:
|
|
```yaml
|
|
search:
|
|
formats:
|
|
- html
|
|
- json
|
|
```
|
|
|
|
## Usage from agent
|
|
```bash
|
|
curl -s "http://127.0.0.1:8888/search?q=QUERY&format=json" | python3 -c "
|
|
import sys, json
|
|
d = json.load(sys.stdin)
|
|
for r in d.get('results',[])[:N]:
|
|
print(f'{r.get(\"title\",\"?\")} - {r.get(\"url\",\"?\")}')
|
|
"
|
|
```
|
|
|
|
## Limitations
|
|
- **No extraction.** SearXNG returns search results (title + URL + snippet) but does not extract full page content. For full page extraction, use Firecrawl or `curl` + HTML stripping.
|
|
- **Local only.** Bound to 127.0.0.1 — not accessible from the network. Access via terminal on Core.
|
|
- **Rate limited.** Default rate limit is 120 requests/hour from a single IP.
|
|
|
|
## Relationship to Firecrawl
|
|
| Capability | SearXNG | Firecrawl |
|
|
|---|---|---|
|
|
| Search (find links) | ✅ Unlimited | ⚠️ 500/mo free |
|
|
| Extract (get page content) | ❌ | ✅ Clean markdown |
|
|
| API key needed | No | Yes |
|
|
| Self-hosted | Yes | No (cloud) |
|