Web & Regional Search
Web-search lanes focus on returning normalized web links, page summaries, and relevance ranking. The standard Results channel is nb-search.results@1; direct Zhihu synthesis through zhihu.synthesis returns nb-search.synthesis@1.
Keyless default search source
DuckDuckGo (duckduckgo.search)
- Operation contract:
duckduckgo/search; outputsnb-search.results@1; supportssyncandasync. - Default behavior: In version
0.5.0and later, this is the built-in default search source (defaults.search_lane = "duckduckgo.search"). You can search the general web without registering an account, configuring an API key, or passing--lanemanually. - Errors and rate limits: Public HTML search endpoints may trigger a CAPTCHA or
429rate limiting (theRetry-Aftermetadata is retained). The runtime returns challenge pages and unrecognized pages as explicit errors, never disguises them as empty results (empty), and never silently switches to a paid search source. - Metadata labels: Cost
free; latencymedium.
BYOK general and regional search sources
1. Tavily Search (tavily.search)
- Operation contract:
tavily/search; outputsnb-search.results@1; supportssyncandasync. - Required configuration:
NB_SEARCH_TAVILY_API_KEY(supports comma-separated rotation of up to 32 keys; the local SDK exposeskeyUsage()for periodic usage inspection) - Optional configuration:
NB_SEARCH_TAVILY_BASE_URL(retains the URL prefix and appends/search) - Metadata labels: Cost
cheap; latencyfast. - Advanced lanes from the same source: The same instance also provides
tavily.synthesis(nb-search.synthesis@1),tavily.crawl(nb-search.crawl@1, default timeout 180s), andtavily.research(nb-search.research@1, default timeout 900s).
2. Exa Search (exa.search)
- Operation contract:
exa/search; outputsnb-search.results@1; supportssyncandasync. - Required configuration:
NB_SEARCH_EXA_API_KEY - Optional configuration:
NB_SEARCH_EXA_BASE_URL(appends/searchto the endpoint) - Metadata labels: Cost
cheap; latencyfast.
3. Brave Search (brave.search)
- Operation contract:
brave/search; outputsnb-search.results@1; supportssyncandasync. - Required configuration:
NB_SEARCH_BRAVE_API_KEY - Optional configuration:
NB_SEARCH_BRAVE_BASE_URL(appends/res/v1/web/searchto the endpoint) - Metadata labels: Cost
cheap; latencyfast.
4. Firecrawl Search (firecrawl.search)
- Operation contract:
firecrawl/search; outputsnb-search.results@1with page-content excerpts; supportssyncandasync. - Required configuration:
NB_SEARCH_FIRECRAWL_API_KEY(the local SDK exposeskeyUsage()to inspect remaining team credits) - Optional configuration:
NB_SEARCH_FIRECRAWL_BASE_URL(retains the URL prefix and appends/v2/search) - Metadata labels: Cost
cheap; latencyfast.
5. SearXNG (searxng.search)
- Operation contract:
searxng/search; outputsnb-search.results@1; supportssyncandasync. - Required configuration:
NB_SEARCH_SEARXNG_BASE_URL(self-hosted or private aggregated instance; no API key; appends/searchto the endpoint) - Metadata labels: Cost
free; latencymedium.
6. Zhipu Search (zhipu.search)
- Operation contract:
zhipu/search; outputsnb-search.results@1; supportssyncandasync. - Required configuration:
NB_SEARCH_ZHIPU_API_KEY - Optional configuration:
NB_SEARCH_ZHIPU_BASE_URL(appends/paas/v4/web_searchto the endpoint) - Metadata labels: Cost
cheap; latencyfast.
7. Parallel Search (parallel.search)
- Operation contract:
parallel/search; outputsnb-search.results@1; supportssyncandasync. - Required configuration:
NB_SEARCH_PARALLEL_API_KEY - Endpoint: Always calls
https://api.parallel.ai/v1/search - Metadata labels: Cost
cheap; latencyfast.
Opt-in Zhihu source
The built-in zhihu adapter (provider_id: "zhihu") is opt-in. The default configuration does not inject a provider_instance, credential_slot, or lane. To use it, declare all three in a Schema v4 config.json (the latency and cost values below are orchestration metadata labels, not request quota limits):
{
"schema_version": "4",
"provider_instances": {
"zhihu.manual": {
"provider_id": "zhihu",
"enabled": true,
"credential_slot_id": "zhihu.manual",
"base_url": "https://developer.zhihu.com",
"options": {
"allow_paid": false,
"search_db": "all",
"zhida_model": "zhida-fast-1p5",
"search_path": "/api/v1/content/zhihu_search",
"global_search_path": "/api/v1/content/global_search",
"synthesis_path": "/v1/chat/completions",
"quota_path": "/api/v1/quota"
}
}
},
"credential_slots": {
"zhihu.manual": {
"provider_id": "zhihu",
"env": "NB_SEARCH_ZHIHU_API_KEY"
}
},
"lanes": {
"zhihu.search": {
"provider_instance_id": "zhihu.manual",
"operation_id": "search",
"latency": "fast",
"cost": "cheap"
},
"zhihu.global": {
"provider_instance_id": "zhihu.manual",
"operation_id": "global",
"latency": "fast",
"cost": "cheap"
},
"zhihu.synthesis": {
"provider_instance_id": "zhihu.manual",
"operation_id": "synthesis",
"latency": "medium",
"cost": "cheap"
}
}
}Set NB_SEARCH_ZHIHU_API_KEY="YOUR_API_KEY", then select the required lane explicitly:
nb-search search "人工智能架构演进" --lane zhihu.search
nb-search search "人工智能架构演进" --lane zhihu.global
nb-search search "比较近期端侧模型推理框架的工程取舍" --lane zhihu.synthesisOperation contracts and path parameters
zhihu.search: CallsGET /api/v1/content/zhihu_searchand outputsnb-search.results@1. After trimming leading and trailing whitespace, the query must be 2–100 characters long. The requested count is clamped to 1–10. The summary prefix retains labels for content type, author, authority level, upvotes, and comments.zhihu.global: CallsGET /api/v1/content/global_searchand outputsnb-search.results@1; the requested count is clamped to 1–20.options.search_dbdefaults to"all"and also accepts"realtime"or"static".zhihu.synthesis: CallsPOST /v1/chat/completionsand outputs a singletypedchannel with schemanb-search.synthesis@1; it cannot be mixed with theresultschannel in--lanes.options.zhida_modeldefaults to"zhida-fast-1p5"and also accepts"zhida-thinking-1p5","zhida-agent", or any other non-empty custom model name.- URL prefix and path overrides: All three lanes support
syncandasync.base_urldefaults tohttps://developer.zhihu.com; endpoint paths are joined according to URL-prefix semantics forsearch_path,global_search_path,synthesis_path, andquota_path. Reverse-proxy prefixes are preserved, such ashttps://relay.example.test/zhihu.
Free-quota gate (allow_paid) and keyUsage() metrics
- Block over-quota billing by default (
allow_paid: false): Before dispatching a request, the runtime verifies free quota throughGET /api/v1/quota. If free quota is exhausted or verification cannot complete, it rejects the request directly (fail-closed). Instances that point to the same quota endpoint and credentials share a reservation ledger within one runtime. If a request is interrupted and its result is undecided, the reservation remains until upstreamTotalUsedadvances or the daily quota resets at00:00Beijing time (Asia/Shanghai,UTC+8). A quota snapshot is cached for at most 60 seconds only when more than 32 requests remain. Set"allow_paid": trueexplicitly only when wallet billing is intentionally allowed. - Local SDK
keyUsage()metric:runtime.keyUsage()also readsGET /api/v1/quotaand returns per-API request counters inKeyUsage.usage.meters. For the compatible credits summary, it preferszhihu_searchand falls back to the first meter when absent. The key is markedexhaustedonly when bothzhihu_searchandglobal_searchhave zero remaining quota.
Multi-source RRF queries
All web-search sources that output nb-search.results@1, including enabled zhihu.search and zhihu.global, can run in parallel through comma-separated --lanes, repeated --lane options, or configured presets:
nb-search search "web standard fetch streaming spec" \
--lanes exa.search,tavily.search,brave.searchnb-search search "web standard fetch streaming spec" \
--lane exa.search --lane tavily.searchDuring aggregation, the runtime canonicalizes and deduplicates URLs, then calculates global rankings with Reciprocal Rank Fusion (RRF), while retaining each source's evidence_groups and provenance.