# jsDelivr CDN Stats for npm Packages

> jsDelivr CDN Stats for npm Packages is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-21).

Returns jsDelivr CDN usage statistics for a given npm package over the past 30 days, including total hits, daily breakdown, peak day, bandwidth, and package rank.

## Facts

- Endpoint: GET https://saylorinnovations.com/api/dev/cdn-stats?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/jsdelivr-cdn-stats-for-npm-packages-0c5ca584
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tkRAxsIiotj1WRGrz9Ybe

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-0c5ca584
```

Example prompt: Can you pull the jsDelivr CDN stats for the npm package 'lodash' — I want to see total hits, daily breakdown, bandwidth, and how it ranks among all packages over the last 30 days?

## When to prefer this

Use this endpoint when you need CDN-specific delivery metrics for an npm package served via jsDelivr, including bandwidth and global rank — distinct from npm download counts. Prefer this over npm registry stats when the question is specifically about CDN performance, peak traffic days, or jsDelivr rank positioning rather than raw install counts.

## Known failure modes

- Unknown or misspelled package name returns no data or null fields
- Scoped packages (e.g. @scope/name) may fail if not URL-encoded correctly
- Very new packages with no CDN traffic may return zeros or nulls across most fields
- jsDelivr upstream API downtime may result in stale or missing data
- Rate limiting or payment failure returns a 402 or error response

## How this service works

jsDelivr CDN usage for an npm package over 30 days - total and daily hits, peak day, rank among all packages and npm, bandwidth and daily series

## Output

A JSON object containing: the npm package name, total CDN hits over the last 30 days, average daily hits, peak day (date and hits), an array of daily hit counts per date, bandwidth consumed in GB, rank among all jsDelivr packages, rank among npm packages specifically, the period covered, and the data source attribution. Some fields may be null if data is unavailable.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "package"
     ],
     "properties": {
      "package": {
       "type": "string",
       "description": "npm package name such as react or @scope/name"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "package",
      "hits_total",
      "daily"
     ],
     "properties": {
      "note": {
       "type": "string",
       "description": "Caveat or context for reading the result"
      },
      "daily": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": "string",
          "description": "Date (YYYY-MM-DD)"
         },
         "hits": {
          "type": [
           "number",
           "null"
          ],
          "description": "Requests on that day"
         }
        },
        "additionalProperties": true
       },
       "description": "Daily values"
      },
      "period": {
       "type": "string",
       "description": "Period the figures cover"
      },
      "source": {
       "type": "string",
       "description": "Data source the values come from"
      },
      "package": {
       "type": "string",
       "description": "npm package name the stats are for"
      },
      "peak_day": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "date": {
         "type": [
          "string",
          "null"
         ],
         "description": "Date (YYYY-MM-DD)"
        },
        "hits": {
         "type": [
          "number",
          "null"
         ],
         "description": "Requests on the busiest day"
        }
       },
       "description": "Day with the highest value",
       "additionalProperties": true
      },
      "checked_at": {
       "type": "string",
       "description": "Time the check was run (UTC)"
      },
      "hits_tot
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/jsdelivr-cdn-stats-for-npm-packages-0c5ca584/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
