# npm Package Metadata Lookup

> npm Package Metadata Lookup is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-09-14).

Fetches npm package metadata including version, dependencies, download counts, repository, and license information.

## Facts

- Endpoint: GET https://api.strale.io/x402/npm-package-info
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-bcbf7c27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L_EY4JJF86IGRFVO0Vb-I

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 api-strale-io-bcbf7c27
```

Example prompt: What's the current version, license, and weekly download count for the 'axios' npm package?

## When to prefer this

Use this endpoint when you need quick, structured npm package metadata — version, license, dependencies, and download stats — without scraping the npm website or authenticating with the npm registry directly. Ideal for agent workflows that need to vet or audit JavaScript dependencies.

## Known failure modes

- Package not found — returns error if the package name doesn't exist on npm
- Invalid or missing package query parameter — returns validation error
- npm registry unavailable — upstream timeout or error
- Rate limiting or payment failure — 402 payment required if funds are insufficient

## How this service works

Fetch npm package metadata: version, dependencies, downloads, repository, license. Includes weekly download count.

## Output

Returns structured metadata for the specified npm package: current version, list of dependencies, weekly download count, repository URL, and license type.

## Example request

```json
{
 "package": "lodash"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "package"
 ],
 "properties": {
  "package": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "name": {
  "type": "string"
 },
 "license": {
  "type": "string"
 },
 "dependencies": {
  "type": "array"
 },
 "latest_version": {
  "type": "string"
 },
 "weekly_downloads": {
  "type": "integer"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-bcbf7c27/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
