searxng-search
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Search the web using a self-hosted SearXNG instance. Use when users ask to search with SearXNG, or when web search is needed and a SearXNG instance is configured. Supports categories, engines, time range, and language filters.
14installs
Sourcexyenon/agents
Added on
NPX Install
npx skill4agent add xyenon/agents searxng-searchTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →SearXNG Search Skill
Search the web using a SearXNG instance via its API.
Configuration
The config file is read from (defaults to ).
$XDG_CONFIG_HOME/agents/searxng.json~/.config/agents/searxng.jsonConfig fields
| Field | Type | Required | Description |
|---|---|---|---|
| | Yes | SearXNG instance URL (no trailing slash) |
| | No | Auth config object (see below) |
| | If auth | |
| | If bearer | Bearer token value (supports |
| | If basic | Basic auth username |
| | If basic | Basic auth password |
| | No | Key-value pairs of additional HTTP headers |
| | No | Default language code (e.g. |
| | No | Default categories (e.g. |
| | No | Default engines (e.g. |
| | No | Default safe search level: |
| | No | Default time range: |
| | No | Max results to display (default: |
| | No | Request timeout in seconds (default: |
Example config (Bearer auth)
json
{
"base_url": "https://searx.example.com",
"auth": {
"type": "bearer",
"token": "your-token-here"
},
"default_categories": ["general"],
"default_engines": ["google", "duckduckgo", "brave"],
"default_max_results": 10,
"headers": {
"X-Custom-Header": "value"
}
}Example config (Basic auth)
json
{
"base_url": "https://searx.example.com",
"auth": {
"type": "basic",
"user": "admin",
"pass": "password"
},
"default_safesearch": 1
}Usage
Run the search script:
bash
python3 scripts/search.py [OPTIONS] <query>Options
| Flag | Description |
|---|---|
| Comma-separated categories ( |
| Comma-separated engines ( |
| Language code ( |
| Page number (default: 1) |
| Time range: |
| Max results to show (overrides config default) |
| Safe search: |
Examples
bash
# 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 (), 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.
-l en - Chinese lifestyle topics (food, travel, shopping, local services, social trends, etc.): In addition to the default search, run a second search with using a Chinese query to capture China-specific results. Merge and deduplicate results before presenting to the user.
-e baidu,sogou -l zh-CN
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 with the query and any relevant filters
scripts/search.py - Present results to the user in a readable format
- If user wants more results, use for pagination or
-pfor more per page-n