# greeneris-data NPM Package Lookup

> greeneris-data NPM Package Lookup is a paid API for AI agents from data.greeneris.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Fetches live npm registry metadata and weekly download statistics for any npm package by name

## Facts

- Endpoint: GET https://data.greeneris.io/v1/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/greeneris-data-npm-package-lookup-2d75d0a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OGUAuGzMMXeM8cz7mIwhA

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 greeneris-data-npm-package-lookup-2d75d0a6
```

Example prompt: Can you look up the npm package details for 'react' — I want to know the latest version, weekly downloads, license, and its dependencies?

## When to prefer this

Use this endpoint when you need live, authoritative npm package metadata including download statistics, license, version, and dependency count. Prefer this over scraping npm.js.org directly or using stale cached data. Particularly useful for AI agents performing due diligence on JavaScript dependencies, auditing open-source licenses, or checking package popularity before recommending a library.

## Known failure modes

- Package not found on npm registry — returns an error or empty result
- Invalid or misspelled package name — no match returned
- npm registry temporarily unavailable — upstream timeout or error
- Payment not made — HTTP 402 returned with machine-readable quote before data is served

## How this service works

One merged call instead of two: latest-version metadata from the official npm registry plus last-week download count from api.npmjs.org (both live). Query: ?pkg=react (scoped names like @scope/name accepted). Returns version, license, deps_count + dependency names, engines, weekly_downloads. No personal maintainer data. 1h cache.

## Output

Returns a JSON object with the package name, latest version, license, description, homepage, list of dependencies, dependency count, Node.js engine requirements, and weekly download count with the download period start/end dates — all sourced live from the npm registry and api.npmjs.org.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pkg"
     ],
     "properties": {
      "pkg": {
       "type": "string",
       "description": "npm package name, e.g. react or @types/node"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": "npm registry + api.npmjs.org downloads (live)",
  "engines": {
   "node": ">=0.10.0"
  },
  "license": "MIT",
  "package": "react",
  "version": "19.2.7",
  "homepage": "https://react.dev/",
  "deps_count": 0,
  "description": "React is a JavaScript library for building user interfaces.",
  "dependencies": [],
  "downloads_period": {
   "end": "2026-07-11",
   "start": "2026-07-05"
  },
  "weekly_downloads": 153316909
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/greeneris-data-npm-package-lookup-2d75d0a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.greeneris.io](https://www.zero.xyz/host/data.greeneris.io/llms.txt)
