The npm registry at https://registry.npmjs.org serves package metadata as JSON, and https://api.npmjs.org serves download counts. Every example below runs as-is.
None for public packages. The downloads API rate-limits bursts — space requests out if you get a 429.
Full reference: https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md
The package.json of the latest release. Drop /latest for every version ever published (large).
curl https://registry.npmjs.org/react/latest
{
"name": "react",
"version": "19.3.0",
"description": "React is a JavaScript library for building user interfaces.",
"license": "MIT",
"main": "index.js"
}
Same search as npmjs.com, with download counts and a relevance score.
curl "https://registry.npmjs.org/-/v1/search?text=http%20client&size=3"
{
"objects": [
{
"package": {
"name": "@actions/http-client",
"version": "4.0.1",
"description": "Actions Http Client"
},
"downloads": {
"monthly": 58407642,
"weekly": 11977654
},
"score": {
"final": 659.15027
}
},
{
"package": {
"name": "@digitalbazaar/http-client",
"version": "4.4.0",
"description": "An opinionated, isomorphic HTTP client."
},
"downloads": {
"monthly": 623760,
"weekly": 140757
},
"score": {
"final": 454.77786
}
}
],
"total": 751233
}
Also last-day, last-month, last-year. Comma-separate packages for a bulk lookup (unscoped only).
curl https://api.npmjs.org/downloads/point/last-week/react
{
"downloads": 132703321,
"start": "2026-09-15",
"end": "2026-09-21",
"package": "react"
}
One count per day between two dates.
curl https://api.npmjs.org/downloads/range/2025-07-01:2025-07-03/express
{
"start": "2025-07-01",
"end": "2025-07-03",
"package": "express",
"downloads": [
{
"downloads": 8487887,
"day": "2025-07-01"
},
{
"downloads": 8220231,
"day": "2025-07-02"
},
{
"downloads": 7678535,
"day": "2025-07-03"
}
]
}