Expand description
Zero-infrastructure web search via DuckDuckGo Lite scraping.
No API key, no backend. Results reuse the same reference-style URL
preservation as the fetch path: each hit’s title carries an inline [N]
marker and the full URLs are collected into a reference block, keeping the
context window tight while staying citable.
Modules§
- compress
- extract
- Parse DuckDuckGo Lite’s table layout into structured results.
- refs
- Shared reference-style URL preservation.
- types
- Types for the web-search layer.
Functions§
- build_
output - Parse an already-fetched results page into a
SearchOutput(no network). - build_
refs - Build the reference block (index → URL) from parsed results.
- fetch_
ddg_ lite - Fetch the raw DuckDuckGo Lite results page for a query, retrying transient failures (connection/timeout, 5xx, 429) with exponential backoff.
- format_
results - Render the inline body: each result as
title [N]followed by its snippet. URLs are intentionally absent here — they live in the reference block. - render_
references - Render the reference block appended to text output.
Thin wrapper over
crate::refs::render_block. - run_
search - Fetch and parse a query end to end.