# pkgpulse /api/pick — npm Package Comparison & Health Scorer

> pkgpulse /api/pick — npm Package Comparison & Health Scorer is a paid API for AI agents from pkgpulse.letom1176.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Compares 2–5 npm packages by health score, weekly downloads, and typosquat risk, then recommends the best choice with a scored rubric

## Facts

- Endpoint: GET https://pkgpulse.letom1176.workers.dev/api/pick
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pkgpulse-api-pick-npm-package-comparison-health-scorer-00132e9d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wkbcyLvE1zqK7CQ-s3aqp

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-api-pick-npm-package-comparison-health-scorer-00132e9d
```

Example prompt: Can you compare axios, got, and undici and tell me which one is healthiest to depend on — give me their health scores and a clear recommendation?

## When to prefer this

Choose this endpoint when an AI coding agent needs to programmatically decide between multiple npm packages based on objective health metrics, download popularity, and security signals — especially when you want a scored, rubric-based recommendation rather than a raw registry lookup. It is ideal for automated dependency auditing workflows, PR review bots, or scaffolding tools that must pick a single best package from a candidate set.

## Known failure modes

- Missing 'names' query parameter returns an error
- Fewer than 2 or more than 5 package names returns a validation error
- Package name not found on npm registry returns partial or null score
- Payment not completed via x402 returns HTTP 402 Payment Required
- Malformed package name (typo or invalid character) may return null health data

## 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 a comparison array of each package with its health score and weekly downloads, plus a recommendation object naming the top pick with its verdict (e.g. 'healthy'), runner-up package name and score gap, and a close-call boolean flag.

## 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": [
      "names"
     ],
     "properties": {
      "names": {
       "type": "string",
       "description": "2-5 comma-separated npm package names"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "question": "Which of [axios, got, undici] should an agent depend on?",
  "comparison": [
   {
    "name": "axios",
    "score": 88,
    "weekly_downloads": 45000000
   }
  ],
  "recommendation": {
   "name": "axios",
   "score": 88,
   "verdict": "healthy",
   "runner_up": {
    "gap": 4,
    "name": "undici",
    "score": 84
   },
   "close_call": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pkgpulse-api-pick-npm-package-comparison-health-scorer-00132e9d/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)
