# npm Package Info API (x402.forgemesh.io)

> npm Package Info API (x402.forgemesh.io) is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Returns the latest published version, metadata, license, dependencies, deprecation notice, and dist details for any npm package by name.

## Facts

- Endpoint: POST https://x402.forgemesh.io/npm-package-info
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-info-api-x402-forgemesh-io-9637e463
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AKlAiFFy4kdlGQNAwcAEE

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-package-info-api-x402-forgemesh-io-9637e463 -d '<json body>'
```

Example prompt: Before I install it, can you pull up the latest npm package info for 'express' — I want to see the version, license, whether it's deprecated, and what dependencies it declares?

## When to prefer this

Use this endpoint when a coding agent needs a fast, pre-install sanity check on any npm package — especially to confirm the latest version, verify the license is acceptable, detect deprecation warnings, or inspect declared dependencies before adding to a project. Prefer this over manual npm registry lookups when automating dependency audits or building pipelines that gate installs on metadata checks.

## Known failure modes

- Package not found on npm registry — 404 or empty result
- Invalid package name format — validation error
- Scoped package name not URL-encoded — parsing failure or 404
- Payment not processed — x402 payment required error
- Stale data returned — results cached for up to 1 hour, may not reflect packages published in the last hour
- Network timeout reaching npm registry upstream

## How this service works

npm package info API: the latest published version of any npm package with its publish metadata, license, declared dependencies, deprecation notice if any, and dist details — the pre-install check coding agents should always run. Scoped packages: URL-encode the slash. Cached 1 hour.

## Output

A JSON object containing the latest published version number, publish timestamp and metadata, SPDX license identifier, declared dependencies (dependencies, devDependencies, peerDependencies), any deprecation notice, and dist fields (tarball URL, integrity hash, file count, etc.) for the requested npm package.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "package": {
   "type": "string",
   "description": "package name, e.g. express"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "express",
   "license": "MIT",
   "version": "4.21.2",
   "dependencies": {
    "accepts": "~1.3.8"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-info-api-x402-forgemesh-io-9637e463/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
