# npm Registry Search (x402 Keyless)

> npm Registry Search (x402 Keyless) is a paid API for AI agents from x402-v2-mint-npm-search.vercel.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Searches the npm package registry by keyword and returns package name, version, description, weekly downloads, and links — no API key required, billed per call via x402.

## Facts

- Endpoint: POST https://x402-v2-mint-npm-search.vercel.app/v1/npm-search?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-registry-search-x402-keyless-42cae57e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L3ArLt68JD7eT3YLf91__

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 npm-registry-search-x402-keyless-42cae57e -d '<json body>'
```

Example prompt: Search npm for packages related to 'jwt authentication' and show me the top 5 results with their weekly downloads and descriptions.

## When to prefer this

Prefer this endpoint when you need keyless, pay-per-use npm package search without managing an npm API token. Ideal for AI agents that need on-demand package discovery without pre-registered credentials. Use when you want structured package metadata (name, version, downloads, links) rather than raw npm website scraping.

## Known failure modes

- 400 with charged:false when the search text is empty or produces no valid results
- 400 if size exceeds the maximum of 20
- Payment settlement failure via x402 protocol before the search executes
- Network timeout if the npm registry is slow or unavailable
- Truncated results if fewer packages exist than the requested size

## How this service works

Search the npm registry (keyless). POST {text, size?≤20} → name, version, description, weekly downloads, links. Empty/invalid after settle → 400 charged:false.

## Output

Returns a list of up to 20 npm packages per query, each with: package name, current version, short description, weekly download count, and relevant links (e.g. npm page, homepage, repository). Returns 400 with charged:false if the query yields no results or is invalid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "integer",
   "maximum": 20,
   "minimum": 1
  },
  "text": {
   "type": "string",
   "maxLength": 200,
   "minLength": 1
  },
  "request_id": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-registry-search-x402-keyless-42cae57e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-npm-search.vercel.app](https://www.zero.xyz/host/x402-v2-mint-npm-search.vercel.app/llms.txt)
