# npm Package Info Lookup

> npm Package Info Lookup is a paid API for AI agents from x402-seller-0ay3.onrender.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns the latest version, license, and last week's download count for any npm package by name.

## Facts

- Endpoint: GET https://x402-seller-0ay3.onrender.com/api/npm/package
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-info-lookup-931fccdd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_htw_3VnBJsZ77plHsvMpC

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-lookup-931fccdd
```

Example prompt: What's the latest version, license, and last week's download count for the express npm package?

## When to prefer this

Use this endpoint when you need quick, structured npm package metadata — version, license, and download popularity — without setting up direct npm registry API access or an API key. It is especially useful for agents doing dependency auditing, license compliance checks, or popularity assessments for JavaScript/Node.js packages, including scoped packages like @scope/name.

## Known failure modes

- Package not found — returns an error if the name does not exist on the npm registry
- Invalid package name format — malformed scoped names (e.g. missing slash) may cause lookup failure
- Network timeout — if the npm registry is slow or unreachable, the request may fail
- Rate limiting — underlying registry throttling could return errors under heavy load

## How this service works

npm package downloads, current version, and license — latest version, license, and last week's download count for an npm package. Parameter: ?name=<package> (e.g. express, or @scope/name for a scoped package).

## Output

A JSON object containing the package name, latest version string, license identifier, weekly download count from the previous week, a short description of the package, and a fetched_at timestamp indicating when the data was retrieved.

## 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",
       "description": "npm package name (e.g. express, @scope/name)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "express",
  "license": "MIT",
  "version": "5.2.1",
  "fetched_at": "2026-09-01T12:00:00.000Z",
  "description": "Fast, unopinionated, minimalist web framework",
  "weekly_downloads": 35000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-info-lookup-931fccdd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-seller-0ay3.onrender.com](https://www.zero.xyz/host/x402-seller-0ay3.onrender.com/llms.txt)
