About web-search
web-search is a skill for querying a local SearXNG instance with curl and parsing its search results. It covers engine, language, and recency filters, plus guidance for choosing snippets or fetching pages.
Key features
- 01Searches local SearXNG with curl
- 02Filters by engine and language
- 03Limits results by recency
- 04Parses result snippets with Python
- 05Includes setup and troubleshooting guidance
Use cases
- 01Finding recent news with a time filter
- 02Searching code through selected engines
- 03Looking up Chinese-language results
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ hachiman566/ miao-skills --skill web-searchAfter installing, type/web-searchin Claude Code to confirm it loaded.
Bundled filesscripts/setup.sh
Details
From the project READMESearXNG Search Skill
Prerequisites: Run
bash skills/searxng/scripts/setup.shto auto-install and start SearXNG (Docker-based, idempotent — safe to re-run).
Searching
Query the local SearXNG instance via curl (preferred — WebFetch blocks localhost):
curl -s "http://localhost:8888/search?q=YOUR+QUERY&format=json"
Common variations:
# Target specific engines (reduces noise)
curl -s "http://localhost:8888/search?q=react+hooks&engines=google,bing&format=json"
# Filter by recency
curl -s "http://localhost:8888/search?q=openai+news&time_range=week&format=json"
# Chinese content
curl -s "http://localhost:8888/search?q=人工智能&engines=baidu,bing&lang=zh&format=json"
# Dev/code questions
curl -s "http://localhost:8888/search?q=rust+async+error&engines=stackoverflow,github&format=json"
Parse results with python (recommended):
curl -s "http://localhost:8888/search?q=YOUR+QUERY&format=json" | \
python3 -c "import sys,json; data=json.load(sys.stdin); [print(f'- {r[\"title\"]}\n {r[\"url\"]}\n {r[\"content\"][:150]}') for r in data.get('results',[])[:5]]"
Parameters
| Parameter | Description | Values |
|---|---|---|
q | Search query | URL-encoded string |
engines | Specific engines | google,bing,duckduckgo,stackoverflow,github,baidu,... |
lang | Language | zh, en, all |
pageno | Page number | 1, 2, ... |
time_range | Recency filter | day, week, month, year |
safesearch | Safe search | 0, 1, 2 |
Best Practices
Read snippets before fetching pages. Each result has a content field with a relevant excerpt — this often contains the answer directly. Fetching full pages costs significantly more tokens, so only do it when the snippet isn't enough.
Limit to top 3–5 results. The first few results are almost always sufficient. More results mean more tokens without meaningfully better answers.
Target engines for the task. Narrowing to relevant engines reduces noise and speeds up results:
- Code / dev:
engines=stackoverflow,github - Chinese content:
engines=baidu,bing&lang=zh - Recent events: append
&time_range=week
If SearXNG is not running
Run the setup script first, then retry:
bash skills/web-search/scripts/setup.sh
Note on WebFetch
Do NOT use WebFetch for SearXNG — it blocks all local/private addresses (localhost, 127.0.0.1, 192.168.x.x, [::1], custom hosts entries) due to SSRF protection. Always use curl via Bash.
Notes
- First request may be slow (engine warm-up)
- For remote or production use, add authentication to your SearXNG instance