About searxng-search
searxng-search is a skill for searching the web through a SearXNG instance's API. It supports filters for categories, engines, language, time range and safe search, along with pagination and result limits.
Key features
- 01Searches through a SearXNG API
- 02Filters by category and engine
- 03Sets language and time range
- 04Controls safe search level
- 05Supports pagination and result limits
Use cases
- 01Searching for recent news
- 02Restricting results to selected engines
- 03Finding results in a chosen language
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ xyenon/ agents --skill searxng-searchAfter installing, type/searxng-searchin Claude Code to confirm it loaded.
Bundled filesreferences/configuration.mdscripts/search.py
Details
From the project READMESearXNG Search Skill
Search the web using a SearXNG instance via its API.
Configuration issues
This skill depends on a local SearXNG config file. Keep setup details out of this file and load references/configuration.md only when needed.
If scripts/search.py reports configuration, auth, or instance setup errors,
read references/configuration.md before retrying. Common examples include:
ERROR: Config file not foundERROR: Invalid TOML .../ERROR: Invalid JSON ...ERROR: base_url is requiredERROR: Environment variable ... is not setERROR: auth.token required for bearer authERROR: auth.user and auth.pass required for basic authERROR: Unknown auth.type ...ERROR: HTTP 401/ERROR: HTTP 403
Usage
Run the search script:
python3 scripts/search.py [OPTIONS] <query>
Options
| Flag | Description |
|---|---|
-c, --categories | Comma-separated categories (general, news, images, videos, music, files, it, science, social media) |
-e, --engines | Comma-separated engines (google, duckduckgo, bing, etc.) |
-l, --language | Language code (en, zh-CN, ja, etc.) |
-p, --page | Page number (default: 1) |
-t, --time-range | Time range: day, month, year |
-n, --max-results | Max results to show (overrides config default) |
-s, --safesearch | Safe search: 0 (off), 1 (moderate), 2 (strict) |
Examples
# Basic search
python3 scripts/search.py "SearXNG documentation"
# Search news from the last day
python3 scripts/search.py -c news -t day "latest tech news"
# Search with specific engines, page 2
python3 scripts/search.py -e google,duckduckgo -p 2 "rust programming"
# Search in Chinese with more results
python3 scripts/search.py -l zh-CN -n 10 "开源搜索引擎"
Best Practices
- Technical topics (programming, software, science, IT, etc.): Always use English as both the query language and search language (
-l en), regardless of the user's input language. Translate the query to English if needed. English results are more comprehensive and up-to-date for technical content. - Chinese lifestyle topics (food, travel, shopping, local services, social trends, etc.): In addition to the default search, run a second search with
-e baidu,sogou -l zh-CNusing a Chinese query to capture China-specific results. Merge and deduplicate results before presenting to the user.
Workflow
- User asks to search for something
- Determine the topic type:
- Technical: translate query to English if needed, search with
-l en - Chinese lifestyle: run the default search first, then an additional search with
-e baidu,sogou -l zh-CN
- Technical: translate query to English if needed, search with
- Run
scripts/search.pywith the query and any relevant filters - Present results to the user in a readable format
- If user wants more results, use
-pfor pagination or-nfor more per page
Comments
Markdown supported