npm Downloads Data API
Served from the CDN (2026-11-11). This endpoint's canonical address is https://cdn.dsh.so//data/npm-downloads.json; the bytes come straight from Cloudflare R2. https://www.dsh.so/DATA_PATH still answers, but only as a 307 redirect to the same object — use the CDN address in new code. (Browser note: the CDN follows the bucket's CORS rules, which admit the www.dsh.so / dsh.so origins; curl and server-side clients are unaffected.)
One request returns the top 100 DSH plugins by npm downloads over the npm last-week (rolling 7-day) window — the same data behind the homepage “npm downloads this week” board. week and total are the combined figures of two independently counted sources: the npm official registry plus the npmmirror (China) mirror — each item also carries the split in official / mirror.
| URL | Description | Update |
|---|---|---|
https://cdn.dsh.so/data/npm-downloads.json | Top-100 ranked list — the 100 most-downloaded plugins in the current last-week window, one entry each. week / total are the npm official + npmmirror mirror combined figures. | rebuilt on each deploy; official values come from the latest daily npm snapshot, mirror values from the latest mirror collection |
https://cdn.dsh.so/data/npm-downloads.schema.json | JSON Schema for the feed format. | stable |
JSON endpoints allow cross-origin reads: Access-Control-Allow-Origin: *. No API key or registration is required.
| Field | Type | Semantics |
|---|---|---|
generatedAt | string (ISO) | Build timestamp — preserve it alongside any cached copy |
snapshotDate | string (YYYY-MM-DD) | null | Date of the npm snapshot the week values come from; null when no snapshot exists (then items is empty) |
window | object | days: 7 (npm official last-week rolling window), start / end (YYYY-MM-DD) — end equals snapshotDate. This describes the official side of week only; the mirror side of the same field comes from a window about 5 days fresher (see sources.mirror) |
sources | object | official / mirror, each with provider, api and semantics — the two counted streams behind the combined figures |
scope | object | Inclusion criteria: listableOnly, ecosystemAppsExcluded, newlyIndexedExcludedDays: 7 |
count | number | Number of ranked entries (≤ limit) |
limit | number | 100 — the feed provides the top 100 entries only |
items[] | array | Ranked entries, sorted by week descending (fields below) |
items[].rank | number | 1-based position in the ranking (1–100) |
items[].id | string | Plugin id (matches plugins.json ids and artifact slugs) |
items[].name | string | Display name |
items[].packageName | string | npm package name the downloads are counted on |
items[].week | number | Combined downloads over the last-week window = npm official last-week rolling 7-day window + the npmmirror mirror window (about 5 days fresher). Rolling windows overlap across snapshot dates — never sum week values across snapshots. Split: official.week / mirror.week |
items[].total | number | null | Combined cumulative downloads = official total + mirror total, each = baseline + daily accumulation over its own window (official keeps ~18 months, mirror 2 years) — a combined figure is the sum of each source's own cumulative. null only when neither source ever collected a baseline — never reported as 0. Split: official.total / mirror.total |
items[].official | object | { week, total } — the npm official (registry.npmjs.org) slice of this row; a field is null when official data is missing (never 0) |
items[].mirror | object | { week, total } — the npmmirror (registry.npmmirror.com) mirror slice. The mirror is an independently counted stream (not a proxy of the official numbers, so adding the two is not double counting), its window is about 5 days fresher than the official one, and it publishes no counting-rule statement — its counting semantics are defined by the mirror operator. null = mirror 404 / not collected yet, never 0 |
items[].stars | number | GitHub star count |
items[].url | string | Absolute plugin detail page URL |
license | object | Provenance and reuse terms — aggregated from the public npm registry, attribution required |
Honesty rule: the feed uses the same shared derivation as the homepage board (src/data/trending.ts) — it can never disagree with the site. Plugins indexed inside the 7-day window are excluded: a fresh entry's downloads are “being discovered”, not weekly traction. Ecosystem apps (which cannot be installed as plugins) are excluded too. On the mirror side, “no data” is expressed as null, never as 0: a combined figure is null only when both sources are missing.
Fetch the top-100 ranking (or open https://cdn.dsh.so/data/npm-downloads.json in a browser):
The feed is capped at the top 100. Per-plugin details (verification, security, install) join with /plugins-index.json or /plugin/@author/plugin.json on id.
The ranking is rebuilt on every deploy from the daily npm official Downloads API and npmmirror mirror snapshots collected by the dsh.so pipelines. Fields are add-only: existing fields will not be removed or renamed. Free to reference with attribution to dsh.so; new fields are announced in the changelog.