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.
Endpoint tested and returned HTTP 200 on 20 Aug 2026
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 20 Aug 2026, 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 'https://api.npmjs.org/downloads/point/last-week/react'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);import requests
res = requests.get("https://api.npmjs.org/downloads/point/last-week/react", timeout=20)
res.raise_for_status()
print(res.json()){
"downloads": 143700450,
"start": "2026-08-12",
"end": "2026-08-18",
"package": "react"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
point/<period>/<package> | path | Optional | Total downloads for a period. point/last-week/react |
range/<period>/<package> | path | Optional | Per-day breakdown across a period. range/last-month/react |
<period> | path | Optional | last-day, last-week, last-month, last-year or a date range. last-week |
<scope> | path | Optional | Scoped 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
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Percentage Calculator
Calculate what X% of a number is, what percent one number is of another, and percentage increase or decrease between two values — instantly and free.
Alternatives to npm Download Counts API
If npm Download Counts does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| GitHub REST API | GitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token. | No key | Yes | 19 Aug 2026 |
| JSONPlaceholder | Free fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples. | No key | Yes | 19 Aug 2026 |
| Postman Echo | Postman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example. | No key | No | 19 Aug 2026 |
| DummyJSON | Free fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples. | No key | Yes | 19 Aug 2026 |
| npm Registry API | Free npm registry API with no key: package metadata, all versions, dependencies, maintainers and dist-tags for any public package. Tested curl example. | No key | Yes | 19 Aug 2026 |
| NuGet | Free NuGet API with no key: search .NET packages, get versions, download counts, descriptions and authors from the official registry. Tested curl example. | No key | Yes | 19 Aug 2026 |
npm Download Counts is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.