BYTETOOLS

npm Download Counts API

Free npm download counts API with no key: weekly, monthly and ranged download statistics for any package, plus per-day breakdowns. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

What is the npm Download Counts API?

The npm download counts API is a free, key-free API returning download statistics for any npm package — point-in-time totals for standard periods, or per-day breakdowns over an arbitrary date range.

The npm registry API tells you what a package is; this separate API tells you how much it is used. Download counts are the standard proxy for adoption when choosing between competing libraries.

One caveat is worth stating on any page that displays these numbers: npm download counts include CI pipelines, mirrors and automated tooling, so they substantially overstate the number of distinct humans using a package. They are good for relative comparison, poor as an absolute measure.

Quick facts

Base URL
https://api.npmjs.org/downloads
Authentication
No API key required.
Rate limit
No published hard limit; the endpoint is heavily cached.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the npm Download Counts API

Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.

1. Fetch weekly download counts

GET https://api.npmjs.org/downloads/point/last-week/react

curl
curl 'https://api.npmjs.org/downloads/point/last-week/react'
JavaScript (fetch)
const res = await fetch("https://api.npmjs.org/downloads/point/last-week/react");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.npmjs.org/downloads/point/last-week/react", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "downloads": 143700450,
  "start": "2026-08-12",
  "end": "2026-08-18",
  "package": "react"
}

Parameters

ParameterTypeRequiredDescription
point/<period>/<package>pathOptionalTotal downloads for a period. point/last-week/react
range/<period>/<package>pathOptionalPer-day breakdown across a period. range/last-month/react
<period>pathOptionallast-day, last-week, last-month, last-year or a date range. last-week
<scope>pathOptionalScoped packages need URL encoding. %40angular%2Fcore

Response fields

downloadsinteger|array
Total for point queries, or an array of per-day objects for range queries.
start / endstring
The date range covered.
packagestring
Package name.
(range) downloads[].daystring
Date of that day's count.
(range) downloads[].downloadsinteger
Downloads on that day.

What you can build with the npm Download Counts API

  • Show download counts as a popularity signal in documentation
  • Compare adoption between competing libraries
  • Chart a package's growth over time
  • Build package comparison or discovery tooling

Common errors and how to fix them

404 for a scoped package

The @ and / need encoding.

Fix: Use %40scope%2Fname in the path.

Counts seem implausibly high

CI pipelines and mirrors are included.

Fix: Treat downloads as a relative comparison, not a count of human users.

Range limited to 18 months

Historical data is capped.

Fix: Split longer analyses into multiple range requests.

npm Download Counts API — frequently asked questions

Is the npm downloads API free?

Yes, completely free with no API key.

Do download counts reflect real users?

Not directly. They include CI pipelines, mirrors and automated installs, so absolute numbers overstate human usage considerably. They are reliable for comparing packages relative to each other.

How do I query a scoped package?

URL-encode it — @angular/core becomes %40angular%2Fcore in the path.

What is the difference between point and range?

point returns a single total for a period; range returns a per-day breakdown, which is what you need for charting growth over time.

Tools that pair with this API

npm Download Counts is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.