# pkgpulse Package Health

> pkgpulse Package Health is a paid API for AI agents from pkgpulse.letom1176.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns a health score (0–100) with adoption, integrity, and maintenance sub-scores for any npm package, plus typosquat flags and a verdict.

## Facts

- Endpoint: GET https://pkgpulse.letom1176.workers.dev/api/package-health
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pkgpulse-package-health-852d4e53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MMdFTpnuZB2AJAw1q4Xgw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pkgpulse-package-health-852d4e53
```

Example prompt: Can you check the health score for the npm package 'lodash' — I want to know if it's safe to add as a dependency, including its license, weekly downloads, and whether it has any install scripts?

## When to prefer this

Use this endpoint when an AI coding agent needs a quick, scored, rubric-based health assessment of an npm package before recommending or installing it — especially when typosquat detection, license verification, and maintenance signals all matter in one call. Prefer over raw npm registry lookups when you need a structured verdict rather than raw metadata.

## Known failure modes

- Package not found on npm registry — returns error or low score with missing signal data
- Misspelled or malformed package name returns no results
- Rate limiting or payment failure (x402) blocks the request
- Scoped package names (e.g. @babel/core) must be passed correctly URL-encoded
- Freshness lag: package metadata may not reflect very recent publishes

## How this service works

Dependency intelligence for AI coding agents, paid per-call via x402 (USDC on Base): npm package health scores with a disclosed rubric, typosquat checks, dependency audits. Free index at /, free sample at /api/sample.

## Output

A JSON object containing the package name, an overall health score (0–100), a verdict (e.g. 'healthy'), component scores for adoption, integrity, and maintenance, key signals (license, weekly downloads, days since last publish, presence of install scripts), any typosquat or risk flags, and a human-readable one-liner summary.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "description": "npm package name, e.g. express or @babel/core"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "express",
  "flags": [],
  "score": 86,
  "signals": {
   "license": "MIT",
   "weekly_downloads": 30000000,
   "last_publish_days": 40,
   "has_install_scripts": false
  },
  "verdict": "healthy",
  "one_liner": "express: healthy (86/100), 30,000,000/wk, published 40d ago.",
  "components": {
   "adoption": 25,
   "integrity": 25,
   "maintenance": 36
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pkgpulse-package-health-852d4e53/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pkgpulse.letom1176.workers.dev](https://www.zero.xyz/host/pkgpulse.letom1176.workers.dev/llms.txt)
