Preface¶
When developing agents or using DeepSeek Harness (DSH), web search is a common requirement. Most search APIs require an API Key and are billed per call, which is not ideal for zero-cost or lightweight scenarios. The dsh-web-search-rss plugin provides a free, locally controllable alternative: by default it scrapes result pages from cn.bing / bing / google without requiring a Key or per-call billing, while also supporting API mode, ad filtering, official-site verification, and more.
What It Is¶
dsh-web-search-rss is a web-search plugin for DSH, maintained by KILL-STAR SX. It registers a search source (id: rss) on ctx.web, so all web_search calls in the host go through it, and the settings page can also test it independently. It operates in two modes: RSS mode directly scrapes search-engine result pages, while API mode calls existing endpoints (you can use a provider already registered in DSH, or integrate Brave / Tavily / Serper / a custom JSON endpoint).
Installation & Activation¶
The recommended approach is to use DSH’s plugin install command:
dsh plugin --profile <profile> add link:/path/to/dsh-web-search-rss
For manual installation, place the package into the profile’s node_modules (a symlink works too), then insert the following line into cordis.patch.yml:
- insert:
- id: web-search-rss
name: dsh-web-search-rss
config:
useRss: true
The plugin’s built-in patch already includes the full configuration, so it will work even if you omit this. After installation, point the web service’s search source to this plugin:
- id: web
name: '@deepseek-ai/dsh-web'
config:
searchProvider: rss
After installing, restart DSH once. The host half-module, /api/web-search-rss, and the settings page will all be assembled at startup.
Settings Page¶
Once installed, go to “Settings → Web Search” where you can configure:
- Switch between RSS and API mode
- Whether to fall back to RSS when the API fails
- Per-channel enable/disable, endpoint URL, Key, environment variables, as well as request method / auth header / field names for custom endpoints
- Engine selection, auto-detection, ad blocking, official-site verification, strict mode, remote domain list
- Chinese translation toggle, result count, debug toggle
Each channel has a “Test” button—just enter a query to verify connectivity. Built-in channels only parse credentials without sending requests, while other channels actually call the endpoint; changes take effect immediately.
The settings page exposes endpoints via the host’s /api/web-search-rss:
| Method | Path | Purpose |
|---|---|---|
| GET | /status |
Current config, engine, network status, channel list (Keys masked) |
| POST | /config |
Save a patch, atomic write |
| POST | /detect |
Re-run local network detection |
| POST | /vet-urls |
Evaluate a batch of URLs against the official-site database |
| POST | /probe |
Run a test search with diagnostics |
| POST | /channel-test |
Test a single channel; dryRun only parses credentials |
Three Search Engines¶
The plugin supports three engines:
cn-bing https://cn.bing.com/search default
bing https://www.bing.com/search
google https://www.google.com/search
There is no Baidu, Sogou, or 360, and no browser-engine aggregation. Domestic platforms have many ad slots and redirects, making scraped results difficult to use directly; these three have relatively stable structures. When auto-detection is enabled, the plugin checks local proxy environment variables and virtual/tunnel network interfaces. If an outbound path to the external internet exists, it tries in the order google → bing → cn.bing; otherwise it uses cn.bing. Detection runs locally without sending any requests, so available() won’t block. Manually selecting bing or google in settings will prioritize them; conversely, to pin cn-bing, you need to disable auto-detection.
Ad Blocking¶
Ad-blocking rules are organized in four layers:
- Ad and tracking domains, e.g. doubleclick.net, googlesyndication.com, adnxs.com, taboola.com, outbrain.com, popads.net
- Click-tracking paths, e.g.
/aclick,/aclk,/ck/a,/pagead/ - Click ID parameters, e.g. msclkid, gclid, fbclid, yclid
- Bing’s and Google’s own sponsored blocks
Bing marks sponsored results as b_ad and organic results as b_algo; the parser only accepts the latter, so sponsored blocks never leak into results. Enabled by default; can be turned off.
Official-Site Verification¶
Official-site verification distinguishes genuine official sites from fake download pages; all checks run locally:
- Registrable domains in the built-in database: pass through with a slight ranking boost
- Unknown domains: flagged by rules and demoted in ranking
- High-risk domains: discarded
- Strict mode: only retain domains from the database
The heuristics include: using the public suffix list to extract the registrable domain; checking for punycode / non-ASCII homoglyphs; computing edit distance against brand names in the database (for lookalikes); commonly abused TLDs; shorteners and direct IP connections; hostnames containing words like login / verify / secure.
The built-in database covers programming languages, toolchains, vendors, cloud services, package repositories, and documentation sites. You can also fetch a remote list via trustedDomainsUrl (supports JSON array, one hostname per line, or Tranco-style rank,domain CSV), disabled by default. This capability is an aid for ranking and filtering only, and should not be treated as a security guarantee. The plugin itself never downloads any content and does not write executable files to disk.
Chinese Queries¶
Bing and Google handle short English keywords well but often return dictionary pages and degree-ad results for long Chinese sentences. Chinese queries first strip filler phrases like “请问” (please ask) and “是什么” (what is), translate the whole sentence into English, then compress it into a keyword search; if whole-sentence translation fails, it falls back to segment-by-segment translation. Results are translated back to Chinese upon return, preferring the session model for a one-shot translation, otherwise falling back to MyMemory per title. MyMemory is a free public API that rate-limits under heavy load; the translation toggle can be turned off. If translation fails, the original text is used for searching—no error is raised.
Configuration Reference¶
Default configuration keys:
| Key | Default | Description |
|---|---|---|
| useRss | true | true → RSS mode; false → API channel mode |
| apiFallbackToRss | true | Fall back to RSS if all API channels fail |
| engine | cn-bing | cn-bing / bing / google |
| autoNetwork | true | Local detection of outbound internet access |
| blockAds | true | Filter ad slots |
| checkOfficial | true | Official-site database verification |
| strictOfficial | false | Only keep domains in the database |
| trustedDomainsUrl | (empty) | Remote domain list URL |
| maxResults | 10 | 1..20 |
| translate | true | Chinese query translation bridge |
| debug | false | Diagnostic logging |
Priority: defaults < config in patch < saved config.json. Configuration writes use a temp file + rename to avoid corrupting existing config. You can set DSH_WEB_SEARCH_RSS_CONFIG to specify the config file path, useful for testing. apiChannels only exists in config.json and may contain plaintext Keys; it is never distributed via patch, not returned by /status, and only hasKey and a masked preview are exposed. Leaving the Key input blank means keeping the previously stored value.
Known Limitations¶
RSS mode quality depends on how well the search engine serves non-browser clients. Bing sometimes returns only keyword-match results for non-browser clients (e.g., searching model rocket kit yields a pile of Microsoft docs); Google’s HTML is sometimes a JS-rendered empty shell. Therefore RSS is better suited as a fallback or for zero-cost scenarios; for stable results, configuring an API channel is recommended. When the API fails and apiFallbackToRss is enabled, the current search falls back to RSS and the event is recorded in diagnostics; with the option disabled, an error is raised directly to aid troubleshooting.
Development & License¶
The plugin is tested with node:test, using a mock fetch and temporary config files—no network access and no reading of real configuration. Dependencies are limited to Node.js built-in modules; there are no third-party dependencies. Licensed under MIT.
Use Cases & Cautions¶
This plugin is suitable for DSH users who need web search but want to control costs and avoid frequent API calls. It runs with the permissions of the current DSH process, so it is advisable to review the source code and license before installing. It fits zero-cost scenarios, cases requiring locally controllable filtering (ads, official-site verification), and scenarios needing multiple search engines as fallbacks. For stable, high-quality results, pairing it with an API channel is recommended.
Summary¶
dsh-web-search-rss provides DSH with a key-free, pay-per-use web search solution. It supports both RSS and API modes, includes ad blocking and official-site verification, and handles Chinese queries with dedicated processing. Relying on local detection and rule-based filtering, it is well suited for agent development scenarios where cost and controllability are priorities.
More Info¶
- Plugin directory page: https://www.skillhub.cn/plugins/KILLSTARSX/dsh-web-search-rss
- GitHub: https://github.com/KILLSTARSX/dsh-web-search-rss