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

@nullvariable/openclaw-kagi-search

v0.1.0

Published

Kagi Search API plugin for OpenClaw with balance monitoring

Readme

Kagi Search Plugin for OpenClaw

License: MIT

Web search via Kagi Search API for OpenClaw.

Features

  • Structured results — Returns titles, URLs, snippets, and publication dates
  • Balance monitoring — Warns when balance is low, blocks searches when critically low
  • Account personalization — Results inherit your Kagi account's blocked/promoted sites
  • Related searches — Optionally include Kagi's related search suggestions

Requirements

Installation

Option 1: Clone to extensions directory

git clone https://github.com/nullvariable/openclaw-kagi-search.git ~/.openclaw/extensions/kagi-search

Option 2: Via OpenClaw plugins (coming soon)

openclaw plugins install @nullvariable/openclaw-kagi-search

Configuration

Add to your OpenClaw config (~/.openclaw/openclaw.json or ~/.config/openclaw/config.json5):

{
  plugins: {
    entries: {
      "kagi-search": {
        enabled: true,
        config: {
          // Required: Get your API key from https://kagi.com/settings/api
          apiKey: "your-kagi-api-key",
          
          // Optional settings
          maxResults: 10,           // Default results per search (1-50)
          timeoutMs: 30000,         // Request timeout in ms
          
          // Balance monitoring thresholds
          balance: {
            warnThreshold: 1.00,    // Log warning when balance < $1.00
            blockThreshold: 0.25,   // Block searches when balance < $0.25
          },
          
          // Include related search suggestions in results
          includeRelatedSearches: false,
        },
      },
    },
  },
}

Environment Variable

Alternatively, set the API key via environment variable:

export KAGI_API_KEY="your-kagi-api-key"

Usage

The plugin registers a kagi_search tool that agents can use:

Search using kagi_search for "OpenClaw documentation"

Tool Parameters

| Parameter | Type | Required | Description | |-----------|---------|----------|------------------------------------------| | query | string | Yes | Search query | | limit | integer | No | Max results (1-50, default from config) |

Response Format

{
  "results": [
    {
      "title": "Result Title",
      "url": "https://example.com",
      "snippet": "Result snippet text...",
      "published": "2024-09-30T00:00:00Z"
    }
  ],
  "relatedSearches": ["related term 1", "related term 2"],
  "meta": {
    "balance": 9.975,
    "queryTimeMs": 213,
    "resultCount": 5
  }
}

Balance Monitoring

The plugin tracks your Kagi API balance and provides two thresholds:

| Threshold | Default | Behavior | |-----------|---------|----------| | warnThreshold | $1.00 | Logs a warning when balance drops below | | blockThreshold | $0.25 | Blocks all searches until balance is replenished |

Balance is updated after each search from the API response metadata.

Account Personalization

Kagi Search API results inherit your account settings:

  • Blocked sites — Sites you've blocked won't appear in results
  • Promoted sites — Sites you've promoted will be prioritized
  • Snippet length — Configurable under Kagi Settings → Search

This is intentional — your agent's searches reflect your preferences. See Kagi Personalization for more details.

Pricing

Kagi Search API costs $0.025 per query ($25 per 1,000 searches).

  • Check your balance: https://kagi.com/settings/api
  • API documentation: https://help.kagi.com/kagi/api/search.html

Comparison with Other Search Providers

| Feature | Brave | Perplexity | Kagi | |----------------------|-------------|-------------|--------------| | Result type | Structured | AI-synth | Structured | | Free tier | Yes | No | No | | Pricing | Pay-per-use | Pay-per-use | $0.025/query | | Personalization | No | No | Yes | | Related searches | No | No | Yes |

Documentation

License

MIT © Doug Cone