{"_id":"@blazer2k/searxng-suite","name":"@blazer2k/searxng-suite","dist-tags":{"latest":"0.2.3"},"versions":{"0.2.3":{"name":"@blazer2k/searxng-suite","version":"0.2.3","description":"SearxNG-based web search with category filtering and multi-format URL extraction for pi.","type":"module","keywords":["pi","pi-package","searxng","web-search","web-fetch"],"author":{"name":"Fedor Vasilev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/blazer2k/pi-blz.git","directory":"packages/searxng-suite"},"bugs":{"url":"https://github.com/blazer2k/pi-blz/issues"},"homepage":"https://github.com/blazer2k/pi-blz/tree/main/packages/searxng-suite#readme","publishConfig":{"access":"public"},"dependencies":{"linkedom":"^0.18.12","turndown":"^7.2.4","unpdf":"^1.6.2"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@earendil-works/pi-tui":"*","typebox":"*"},"devDependencies":{"@types/turndown":"^5.0.6"},"pi":{"extensions":["./src/index.ts"],"image":"https://raw.githubusercontent.com/blazer2k/pi-blz/main/packages/searxng-suite/images/bg.jpg"},"gitHead":"f64889fed2027bb7b5080373c1d88bb4e1a08db2","_id":"@blazer2k/searxng-suite@0.2.3","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-E0U3TaTEJWIUjWG/ID16NKCMiLydwxIfmFNPQOArTDBIIqEkTIJ99tki7JG0A9GVanOwLEjC7zFT/ru6+y7KJg==","shasum":"7fbae1aed63044702e6eac424f43d2d541cef110","tarball":"https://registry.npmjs.org/@blazer2k/searxng-suite/-/searxng-suite-0.2.3.tgz","fileCount":25,"unpackedSize":352063,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAV74zUO1eBSCBXjIywwiFyeCnZ2DWuU5GoCY7ZCIVKkAiEA5rf+LIyPe4Fk818X5FoN+Ok2gqjZc5o8o5t0kw4aW94="}]},"_npmUser":{"name":"blazer2k","email":"blazer2kforever@gmail.com"},"directories":{},"maintainers":[{"name":"blazer2k","email":"blazer2kforever@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/searxng-suite_0.2.3_1781199906854_0.49569139600682455"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-11T17:45:06.710Z","0.2.3":"2026-06-11T17:45:07.016Z","modified":"2026-06-11T17:45:07.187Z"},"maintainers":[{"name":"blazer2k","email":"blazer2kforever@gmail.com"}],"description":"SearxNG-based web search with category filtering and multi-format URL extraction for pi.","homepage":"https://github.com/blazer2k/pi-blz/tree/main/packages/searxng-suite#readme","keywords":["pi","pi-package","searxng","web-search","web-fetch"],"repository":{"type":"git","url":"git+https://github.com/blazer2k/pi-blz.git","directory":"packages/searxng-suite"},"author":{"name":"Fedor Vasilev"},"bugs":{"url":"https://github.com/blazer2k/pi-blz/issues"},"license":"MIT","readme":"# @blazer2k/searxng-suite\n\nSearxNG-based web search with category filtering and multi-format URL extraction for [pi](https://pi.dev).\n\n**Current version:** 0.2.3 · [Changelog](CHANGELOG.md)\n\n## Overview\n\nThis extension provides two LLM-callable tools:\n\n- **`web_search`:** Search the web via your SearxNG instance with configurable result limits, timeouts, and SafeSearch.\n- **`web_extract`:** Extract content from any URL, supporting multiple formats:\n\n| Format     | Output                                                                              |\n| ---------- | ----------------------------------------------------------------------------------- |\n| HTML       | Denoised, converted to Markdown with metadata (title, author, date, description)    |\n| Plain text | Raw text with source info                                                           |\n| PDF        | Text extracted per page with headers and separators (text-native PDFs only, no OCR) |\n| Images     | Attached with metadata (format, size)                                               |\n\n![Example: searching and extracting university admission info](images/example.webp)\n\n## Requirements\n\n- **Node.js 20+** (extensions run via jiti)\n- A running [SearxNG](https://searxng.org) instance (local or remote)\n\n## Installation\n\n```bash\npi install npm:@blazer2k/searxng-suite\n```\n\nOr install locally for development:\n\n```bash\ngit clone https://github.com/blazer2k/pi-blz.git\ncd pi-blz\nnpm install\npi -e ./packages/searxng-suite/src/index.ts\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable          | Default                 | Description                              |\n| ----------------- | ----------------------- | ---------------------------------------- |\n| `SEARXNG_URL`     | `http://localhost:8888` | Base URL of your SearxNG instance        |\n| `SEARXNG_API_KEY` | _(none)_                | Bearer token for authenticated instances |\n\nThese must be available to the process running pi – set them in your shell profile, systemd service, or however you launch pi.\n\n### Runtime Settings\n\nRun `/search-config` in pi to adjust settings at runtime:\n\n| Setting                | Options                           | Description                                                            |\n| ---------------------- | --------------------------------- | ---------------------------------------------------------------------- |\n| Results limit          | 1, 5, 10, 15, 20                  | Maximum results per search                                             |\n| LLM can override limit | false, true                       | Allow the LLM to request fewer results per search                      |\n| Timeout                | 5s, 10s, 15s, 30s                 | Request timeout                                                        |\n| SafeSearch             | 0 (off), 1 (moderate), 2 (strict) | Filter explicit content                                                |\n| LLM can pick category  | false, true                       | Allow the LLM to choose a search category                              |\n| Allow private URLs     | false, true                       | Allow requests to localhost and private IP ranges (`web_extract` only) |\n| Verbose                | false, true                       | Show full results instead of compact summary                           |\n\nSettings persist to `~/.pi/agent/pi-searxng-suite.json`.\n\n> **Note:** Changes to **LLM can override limit** and **LLM can pick category** require `/reload` to take effect, as they alter the tool schema presented to the LLM. Other settings (limit, timeout, SafeSearch, etc.) apply immediately.\n\n![Example: configuring the extension via pi command](images/settings.webp)\n\n## Search Categories\n\nWhen **LLM can pick category** is enabled, the LLM can target searches to specific SearxNG categories:\n\n| Category       | Use case                               |\n| -------------- | -------------------------------------- |\n| `general`      | Default – searches all enabled engines |\n| `images`       | Image search                           |\n| `videos`       | Video search                           |\n| `news`         | News articles                          |\n| `it`           | IT and programming                     |\n| `science`      | Scientific papers and articles         |\n| `files`        | File downloads                         |\n| `social media` | Social media posts                     |\n\nThe LLM receives the category list in the tool description and picks the best match for each query.\n\n## Security\n\n- Private IP ranges (localhost, 10.x, 127.x, 192.168.x, 172.16–31.x) are blocked by default for `web_extract`.\n- Content size limits prevent oversized downloads (2 MB HTML, 1 MB text, 50 MB PDF/images).\n- All search and extract results are flagged as untrusted content in the LLM context.\n\n## License\n\nMIT – see [LICENSE](LICENSE)\n","readmeFilename":"README.md","_rev":"1-9d2b5d0e24c34de6a4c1ed5bc822af29"}