@apmantza/greedysearch-pi

Headless multi-engine AI search (Perplexity, Google AI, ChatGPT, Gemini) via browser automation. NO API KEYS needed. Grounded all-engine search fetches sources by default, with optional configurable synthesis and deep research.

Packages

Package details

extension

Install @apmantza/greedysearch-pi from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@apmantza/greedysearch-pi
Package
@apmantza/greedysearch-pi
Version
2.1.6
Published
Jul 21, 2026
Downloads
1,670/mo · 413/wk
Author
apmantza
License
MIT
Types
extension
Size
982.4 KB
Dependencies
5 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

GreedySearch for Pi

GreedySearch registers the greedy_search tool for Pi: headless-first, no-API-key AI/web search through a dedicated Chrome profile.

What It Does

  • Multi-engine search across Perplexity, Google AI, ChatGPT, and Gemini
  • Source-grounded engine: "all" results with fetched source content
  • Optional synthesis over engine answers and fetched sources
  • Iterative depth: "research" runs with citation audit and research bundles
  • Visible Chrome fallback for login/captcha/cookie setup when needed

Install

pi install npm:@apmantza/greedysearch-pi

Or from git:

pi install git:github.com/apmantza/GreedySearch-pi

Quick Usage

greedy_search({ query: "React 19 changes" });
greedy_search({ query: "React 19 changes", synthesize: true });
greedy_search({ query: "Prisma vs Drizzle", engine: "perplexity" });
greedy_search({
  query: "Evaluate browser automation options for AI agents",
  depth: "research",
  breadth: 3,
  iterations: 2,
  maxSources: 8,
});

Headless is the default. Use visible: true only when you need to establish a session, solve a challenge, or inspect the browser:

greedy_search({ query: "Visible setup", engine: "perplexity", visible: true });

MCP server

GreedySearch also ships a dependency-free MCP stdio server (bin/mcp.mjs) so Claude Code — or any MCP client — can call it directly, outside of Pi. It exposes two tools:

  • greedy_search — same parameters as the Pi greedy_search tool (query, engine, synthesize, synthesizer, depth, breadth, iterations, maxSources, researchOutDir, writeResearchBundle, fullAnswer, locale, visible). Spawns bin/search.mjs under the hood; searches take roughly 1-5 minutes.
  • greedy_fetch — fetch a single URL and return its extracted title/byline/content (url, maxChars).

Register with Claude Code

This repo includes a project-scope .mcp.json at the repo root, so running Claude Code from inside a checkout picks up the greedysearch server automatically (you'll be prompted to approve project-scoped servers on first use).

To register it manually (e.g. from outside the repo, or in user scope):

claude mcp add greedysearch -- node /absolute/path/to/greedysearch-pi/bin/mcp.mjs

Or run the server directly for testing:

npm run mcp

Sample tools/call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "greedy_search",
    "arguments": { "query": "React 19 changes", "engine": "perplexity" }
  }
}

Documentation

Requirements

  • Chrome or Chromium
  • Node.js 20.11.0+

Contributing

See CONTRIBUTING.md and AGENTS.md for the extractor, recovery, and release checklists.

GreedySearch is released under the MIT License.

Contributors

Thanks goes to these wonderful people:

If you land a pull request or report an issue that gets fixed, we'll add you here.