# CodePulse API – NPM Registry Lookup

> CodePulse API – NPM Registry Lookup is a paid API for AI agents from codepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Looks up an NPM package by name and returns its current version, description, and registry support status with a confidence rating.

## Facts

- Endpoint: POST https://codepulse-api.hahavoid0.workers.dev/registry/npm
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/codepulse-api-npm-registry-lookup-27c3f9c6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3KjQ0LcUVw-k8fI6obymh

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 codepulse-api-npm-registry-lookup-27c3f9c6 -d '<json body>'
```

Example prompt: Look up the npm registry entry for the 'hono' package and tell me its current version and description.

## When to prefer this

Choose this endpoint when you need a quick, programmatic lookup of an npm package's current published version and description without needing to scrape npmjs.com yourself. It's ideal for agents that need to verify dependency versions, research unfamiliar packages, or enrich package.json analysis. At $0.005 USDC per call with no API key required, it suits pay-per-use agent workflows. Not suitable if you need full package metadata (dependencies, license tree, download stats) — use the npm registry API directly for that.

## Known failure modes

- Package not found on npm registry — returns unsupported or empty result
- Misspelled package name yields no match or low-confidence result
- Registry data may be slightly stale relative to the actual npm registry (data_as_of field indicates freshness)
- Network or worker timeout on the upstream registry call
- Payment failure via x402/USDC if wallet balance is insufficient

## How this service works

Retrieves version history, dependencies, and author details from the official NPM registry.

## Output

Returns a JSON object containing the package's current version, a short description, a boolean 'supported' flag indicating npm registry support, a confidence level (e.g. 'high'), and a data_as_of timestamp indicating when the data was last updated. Also includes any warnings and a disclaimer about informational use only.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "package"
     ],
     "properties": {
      "package": {
       "type": "string",
       "description": "NPM package name"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "version": "4.0.0",
   "description": "Hono framework"
  },
  "warnings": [],
  "supported": true,
  "confidence": "high",
  "data_as_of": "2026-06",
  "disclaimer": "Informational support only. Not legal, tax, medical, veterinary, or financial advice. Verify with the cited official source or a qualified professional before acting."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/codepulse-api-npm-registry-lookup-27c3f9c6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from codepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/codepulse-api.hahavoid0.workers.dev/llms.txt)
