npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pi-unipi/web-api

v0.1.16

Published

Web search, read, and summarize tools with provider-based backend selection for Pi coding agent

Readme

@pi-unipi/web-api

Web search, page reading, and content summarization for the agent. The read path uses a local smart-fetch engine by default — free, no API key, browser-grade TLS fingerprinting that bypasses Cloudflare.

Paid providers (SerpAPI, Tavily, Firecrawl, Perplexity) are available as fallbacks. DuckDuckGo and Jina work out of the box for search.

Commands

| Command | Description | |---------|-------------| | /unipi:web-settings | Configure providers, API keys, and smart-fetch defaults | | /unipi:web-cache-clear | Clear all cached web content |

Special Triggers

Workflow skills detect web-api and inject web tools for research-type commands:

| Skill | What Changes | |-------|--------------| | research | Full web search, read, summarize | | gather-context | External documentation lookup | | consultant | Industry best practices research | | subagents (explore) | Web research in parallel |

The footer and info-screen don't display web-api data — it's a tool package, not a state package.

Agent Tools

| Tool | Description | |------|-------------| | web_search | Search the web via provider | | multi_web_content_read | Extract content from URLs (smart-fetch or provider) | | web_llm_summarize | Summarize web content via LLM |

web_search

# Auto-select cheapest provider
web_search(query: "TypeScript generics")

# Use specific provider
web_search(query: "latest AI research", source: 4)  # Tavily

multi_web_content_read

# Single URL (smart-fetch engine by default)
multi_web_content_read(url: "https://example.com/article")

# Batch URLs
multi_web_content_read(url: ["https://example.com/a", "https://example.com/b"])

# Provider fallback (Jina Reader)
multi_web_content_read(url: "https://example.com/article", source: 1)

# Custom options
multi_web_content_read(url: "https://example.com/article", format: "json", maxChars: 10000)

web_llm_summarize

web_llm_summarize(url: "https://example.com/long-article")
web_llm_summarize(url: "https://example.com/research", prompt: "Extract key findings")

Smart-Fetch Engine

Local content extraction pipeline — no API key required:

| Component | Purpose | |-----------|---------| | wreq-js | Browser-grade TLS fingerprinting (bypasses Cloudflare) | | defuddle | Intelligent content extraction from HTML | | linkedom | Server-side DOM parsing |

Outputs clean markdown with metadata (title, author, site, word count). Supports batch concurrent fetching with progress.

Providers

Search

| Provider | Rank | Cost | API Key | |----------|------|------|---------| | DuckDuckGo | 1 | Free | No | | Jina AI Search | 2 | Freemium | Optional | | SerpAPI | 3 | Paid | Required | | Tavily | 4 | Paid | Required | | Perplexity | 5 | Paid | Required |

Read

| Provider | Rank | Cost | API Key | |----------|------|------|---------| | Smart-Fetch Engine | 0 | Free | No | | Jina AI Reader | 1 | Freemium | Optional | | Firecrawl | 2 | Paid | Required | | Perplexity | 3 | Paid | Required |

Summarize

| Provider | Rank | Cost | API Key | |----------|------|------|---------| | Perplexity | 1 | Paid | Required | | LLM Summarize | 2 | LLM tokens | No |

Configurables

API Keys

Configure via /unipi:web-settings (interactive TUI) or environment variables:

export SERPAPI_KEY="your-key"
export TAVILY_API_KEY="your-key"
export FIRECRAWL_API_KEY="your-key"
export PERPLEXITY_API_KEY="your-key"
export JINA_API_KEY="your-key"

Providers auto-enable when you add a valid API key.

Smart-Fetch Defaults

Configure browser profile, OS, max chars, timeout via /unipi:web-settings → "Smart Fetch Defaults".

Settings Files

  • Auth: ~/.unipi/config/web-api/auth.json (API keys, gitignored)
  • Config: ~/.unipi/config/web-api/config.json (provider settings, smart-fetch defaults)

Cache

  • Default TTL: 1 hour
  • Cache location: ~/.unipi/config/web-api/cache/
  • Automatic for all read operations

Troubleshooting

No provider available: Run /unipi:web-settings and add API keys or enable a free provider.

Smart-fetch fails: Try a different browser profile (browser: "chrome_133") or a provider fallback (source: 1).

Rate limiting: Add an API key for higher limits, use smart-fetch (no limits), or try a different provider.

License

MIT