---
name: local-web-search
description: "Local web search via SearXNG for querying the internet. Categories: general, images, videos, news, music, it, science, files. Filters: filetype:, site:, inurl:, intitle: (with * wildcards). Image size filter for raster formats (jpg, png, webp, gif). Time range filter for freshness."
arg_description: Search query
allowedTools:
  - "Bash(docker exec claude-skill-local-web-search*)"
  - "Bash(*docker compose up -d*)"
---

# Usage

```bash
docker exec claude-skill-local-web-search python3 /etc/searxng/search.py -q '{query}'
```

Quotes and minus signs in query are search operators — do not strip them:
- `"exact phrase"` — exact match
- `-term` — exclude term

If exec fails (container not running), start it in this skill's directory: `docker compose up -d`

Options:
- `-q` — query (required)
- `-c` — category (default: general)
- `-p` — page number (default 1)
- `-s` — image size filter: `xlarge` (>1920px), `large` (1280-1920), `medium` (640-1280), `small` (<640). Supported formats: jpg, jpeg, png, webp, gif, bmp, tiff. NOT supported: svg and other vector formats.
- `-l` — limit results (default 10)
- `-t` — time range: `day`, `week`, `month`, `year`
- `--safesearch` — safe search: `0`=off (default), `1`=moderate, `2`=strict

# Categories (-c)

| Category | Use when | Examples |
|----------|----------|----------|
| general | web pages, articles, documentation (default) | "python tutorial", "how to cook pasta" |
| images | images, photos, illustrations, wallpapers | "cat photos", "logo design" |
| videos | videos, tutorials, reviews, how-to | "python crash course", "product review" |
| news | news, current events, breaking news | "ukraine news", "tech announcements" |
| music | music, lyrics, artists, albums | "song lyrics", "artist discography" |
| it | code, GitHub, Stack Overflow, dev docs | "react hooks example", "docker error fix" |
| science | scientific articles, research, papers | "machine learning research", "climate study" |
| files | files for download | "ubuntu iso download", "free ebook pdf" |

# Time filter (-t)

Use with news or when freshness matters:
- `-t day` — last 24 hours
- `-t week` — last week
- `-t month` — last month
- `-t year` — last year

# Query operators

- `"exact phrase"` — exact phrase match (passed directly to search engines)
- `-term` — exclude term from results (do not strip the minus sign)
- `:uk` / `:en` / `:de` — language filter (infer from query language if user doesn't specify)

All support `*` wildcards for pattern matching:
- `filetype:pdf` — filter by file extension (`filetype:doc*` matches doc, docx)
- `site:example.com` — filter by domain (`site:*.gov`, `site:*wiki*`)
- `inurl:/api/` — filter by URL substring (`inurl:*search*`)
- `intitle:python` — filter by title (`intitle:*guide*`)

# Output format

Results are structured with labeled fields (blank line between each result):

- `URL:` — direct link
- `Description:` — content snippet (general, it, science, files)
- `Source:` — search engine that found it
- `Size:` — resolution (images)
- `Duration:` — video length (videos)
- `Thumbnail:` — video thumbnail URL (videos)
- `Published:` — publication date (news)
- `Artist:` — artist name (music)
- `Album:` — album name (music)

# Pagination

When "Results: 0/0" but "Found N before filtering" (N > 0):
- Try next page automatically
- Continue up to page 3
- After page 3 with no results, ask user if should continue
