npm Downloads Data API
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.
| URL | Description | Update |
|---|---|---|
/data/npm-downloads.json | Top-100 ranked list — the 100 most-downloaded plugins in the current last-week window, one entry each. | rebuilt on each deploy; week values come from the latest daily npm snapshot |
/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 |
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 | Downloads over the last-week rolling 7-day window. Rolling windows overlap across snapshot dates — never sum week values across snapshots |
items[].total | number | null | Cumulative downloads (baseline + daily accumulation); null when no baseline was ever collected — never reported as 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.
Fetch the top-100 ranking (or open /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 Downloads API 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.