# npm-downloads

> npm-downloads is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns npm download counts for a package — last day, week, and month totals plus a 30-day daily time series — from the public npm downloads API.

## Facts

- Endpoint: GET https://intel.rallylive.ca/data/npm-downloads
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-downloads-dc9e4fae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OyxmJHkQXAw05nG_2G_p1

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-downloads-dc9e4fae
```

Example prompt: What are the npm download stats for the 'chalk' package — I want to see last day, last week, last month totals and the 30-day daily trend to decide if it's still popular.

## When to prefer this

Use this endpoint when you need quick, reliable npm download statistics for dependency evaluation, open-source health checks, or trend analysis. Prefer it over scraping npmjs.com manually or building your own npm API client. It is especially useful when an agent needs both aggregate counts (day/week/month) and a daily time series in a single call at low cost ($0.01 per lookup).

## Known failure modes

- Package not found on npm — returns an error or empty data for non-existent or misspelled package names
- npm API unavailability — upstream npm registry downtime causes lookup failure
- Rate limiting or network error from the upstream npm downloads API
- Missing or malformed package name parameter causes a bad request error

## How this service works

npm download counts for a package: last day, week and month totals plus a 30-day daily series, from the public npm downloads API. Popularity and trend signals for dependency decisions. $0.01 per package.

## Output

Returns structured data including total download counts for the past day, past week, and past month, plus a 30-day daily time series array — giving both point-in-time popularity metrics and trend signals for the specified npm package.

## 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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-downloads-dc9e4fae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
