# jsDelivr CDN Stats for npm Packages

> jsDelivr CDN Stats for npm Packages 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 jsDelivr CDN usage statistics for an npm package over the last month, including total hits, rank, bandwidth, daily hit series for the last 14 days, and top 10 versions by hit share.

## Facts

- Endpoint: GET https://intel.rallylive.ca/dev/jsdelivr-stats
- 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/jsdelivr-cdn-stats-for-npm-packages-e16e0ec4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EAEAjOdVTKCHj1OjmBTZ9

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 jsdelivr-cdn-stats-for-npm-packages-e16e0ec4
```

Example prompt: Can you pull the jsDelivr CDN stats for the npm package 'lodash' — I want to see total hits, bandwidth, its CDN rank, the daily hit trend for the last 14 days, and which versions are getting the most traffic?

## When to prefer this

Choose this endpoint when you need a CDN-based popularity signal for an npm package that is independent of npm download counts, which can be inflated by CI/CD pipelines. It is ideal for assessing browser/CDN adoption, identifying which versions are actively used in production, and spotting traffic trends over the past two weeks. Prefer this over npm download stats when evaluating front-end library adoption or CDN delivery patterns.

## Known failure modes

- Package not found on jsDelivr — returns empty or zero stats
- Invalid or malformed package name — may return an error or no data
- Package has zero CDN traffic — all metrics return zero
- Rate limiting or payment failure — request rejected with 402 or 429
- jsDelivr API upstream outage — endpoint may return 503 or timeout

## How this service works

jsDelivr CDN usage of an npm package over the last month: total hits, rank, bandwidth, daily hit series (last 14 days) and the top 10 versions by hits with their share. A popularity signal independent of npm download counts. $0.01 per package.

## Output

Returns a structured response with: total CDN hits over the last month, a popularity rank among all packages on jsDelivr, total bandwidth consumed, a daily hit series covering the last 14 days, and the top 10 package versions ranked by hit count along with their percentage share of total traffic.

## 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/jsdelivr-cdn-stats-for-npm-packages-e16e0ec4/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)
