Overview
pi-web-access adds web_search, fetch_content and follow-up content retrieval to Pi. Use the installation command below, restart Pi, then begin with a public URL or a small search.
Zero setup applies to the keyless Exa MCP search path. It does not promise free access to every provider, offline operation, authenticated websites or YouTube analysis without an available backend.
Installation & operating boundaries
pi-web-access
Search, page extraction, PDF reading and video analysis through one extension.
pi install npm:pi-web-access- Mechanism
- Registers native Pi tools. Search routes to provider APIs or Exa MCP; ordinary URLs start with direct HTTP and local HTML extraction, with configured extraction fallbacks. GitHub repository URLs have a local clone path.
- Prerequisites
- Pi and outbound network access. Exa MCP needs no API key; keyed providers need their own credentials. GitHub cloning needs Git. PDF text extraction uses bundled unpdf/pdf.js; ffmpeg and yt-dlp are optional for video frames.
- Data scope
- Queries go to the chosen search service. Hosted extraction receives URLs; configured Datalab/Gemini PDF processing receives PDF bytes. Local video analysis may upload video to Gemini. Browser-cookie access is opt-in.
- Failure behavior
- Automatic search tries eligible fallbacks; a named provider is strict. Exhausted routes return diagnostics. Remote hosted HTTP extraction is disabled unless fetchRouting.allowRemoteHostedProviders is enabled.
- Known limitations
- Keyless does not mean offline or unlimited. DuckDuckGo is explicit-only. The local PDF fallback has no OCR. Private or age-restricted YouTube videos can fail, and readable content behind a paywall is not guaranteed.
Source / documentation reviewed · v0.30.0 · 6c5afa1d0d43eef8552284ad73f4bd9f0612a378
How search falls back
Automatic search starts with configured SearXNG. When the active model is openai-codex it tries authenticated OpenAI first; otherwise Exa precedes OpenAI. Keyed Exa uses the direct API and unkeyed Exa uses MCP.
The remaining eligible sequence in this revision is Brave → Parallel → TinyFish → Search1API → Searchinfinity → Querit → Tavily → Firecrawl → Jina → SERPdive → Kagi → Bocha → Ollama → Perplexity → Gemini API/Web. Unavailable services are skipped. Cookie-based Gemini Web is opt-in.
DuckDuckGo is explicit-only. A named provider stays strict; searchRouting.providers can define an ordered route, and fallbackOn controls which failure types advance it. Do not assume every error silently selects another backend.
How URL extraction differs
A GitHub repository can be cloned for local file access. Ordinary HTML first uses direct HTTP, Readability and an RSC parser. Configured self-hosted Firecrawl or Crawl4AI may follow; third-party hosted extractors require fetchRouting.allowRemoteHostedProviders: true for remote HTTP(S) targets.
That opt-in lets a remote service receive the target URL and perform its own fetch. It is separate from API search configuration. Neither the fallback chain nor “intelligent extraction” guarantees access to login-only, paywalled or anti-bot content.
PDF dependencies and data paths
PDF extraction tries configured Datalab, then configured Gemini, then local unpdf/pdf.js. The local path does not need pdftotext, a browser or an API key, but reads only embedded text and has no OCR. Remote PDF tiers receive the PDF bytes.
Set pdf.provider to unpdf for local extraction; scanned pages may then return little or no text. Defaults are 20 MB and the first 100 pages. Remote errors can fall back locally, while cancellation and credential/configuration errors are not treated as ordinary recoverable failures.
{
"pdf": { "provider": "unpdf", "maxSizeMB": 20, "maxPages": 100 }
}YouTube analysis versus frame extraction
YouTube understanding tries Gemini Web when browser cookies are explicitly allowed, then Gemini API, then Perplexity. Configure an available authorized backend; private and age-restricted videos can fail across the chain.
ffmpeg and yt-dlp are optional system binaries for retrieving YouTube frames as images. They are not prerequisites for remote transcript/visual descriptions. Local video frame extraction needs ffmpeg; video analysis can upload the file to Gemini.
Configure and verify
Optional provider settings live in ~/.pi/agent/web-search.json. For example, braveApiKey can use "$BRAVE_API_KEY" to resolve that environment variable. Merge the PDF example above into the same JSON object when needed.
After restarting Pi, request a search and fetch as shown. Check source URLs and provider metadata, then try a known text PDF. These are reproducible verification steps, not a claim that this project ran each upstream service or measured extraction accuracy.
web_search({ query: "Pi coding agent documentation", numResults: 3 })
fetch_content({ url: "https://pi.dev/" })Related & alternative options
- @juicesharp/rpiv-web-tools →
Pluggable web search (Brave, Tavily, Serper, Exa, Jina, Firecrawl, SearXNG, Ollama).
- @ollama/pi-web-search →
Ollama web search and fetch API integration.
Link from your README
Primary sources & verification scope
Source review and runtime testing are distinguished above. Features, performance and savings not marked “Tested” are not measurements by Pi Index.