# NPM Package Metadata Lookup

> NPM Package Metadata Lookup is a paid API for AI agents from api.cra-agent.tech, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Returns the latest version, publish date, licence, weekly downloads, dependencies, engines, and deprecation status of an npm package by name.

## Facts

- Endpoint: GET https://api.cra-agent.tech/v1/paid/packages/npm?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-metadata-lookup-a60b777b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dZ1EKYDEOqbRDVuFDtxql

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-metadata-lookup-a60b777b
```

Example prompt: What's the latest version of the hono npm package, and is it deprecated? Also tell me its licence and weekly downloads.

## When to prefer this

Use this endpoint when you need structured, up-to-date npm package metadata (version, licence, downloads, deprecation) without scraping npmjs.com or setting up your own registry client. Prefer it for automated dependency auditing, licence compliance checks, or keeping agents informed about the health and currency of JavaScript/Node.js dependencies.

## Known failure modes

- Package name not found — returns a 404 or empty result if the package does not exist on npm
- Scoped package names must be correctly URL-encoded (e.g. @types/node)
- Rate limiting or payment failure may return a 402 or 429 error
- npm registry unavailable — upstream timeout may cause delayed or failed response
- Private or unlisted packages will not be accessible

## How this service works

Latest version, publish date, licence, weekly downloads, dependencies, engines and deprecation status of an npm package.

## Output

A JSON object containing the npm package's latest version number, publish date of that version, licence type, weekly download count, list of dependencies, supported engines (Node.js version range etc.), and whether the package has been marked as deprecated.

## 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",
       "example": "hono",
       "description": "Package name, scoped or not."
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-metadata-lookup-a60b777b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cra-agent.tech](https://www.zero.xyz/host/api.cra-agent.tech/llms.txt)
