Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM download count by package version?

Tags:

npm

I know there's a public API for getting NPM download counts, as well as tools built on top of it like npm-stat and npmtrends. However, I'd like to get more granular and see downloads for a particular package by version. I don't see this documented in the API docs anywhere. Is it possible?

like image 409
ericgio Avatar asked Mar 16 '26 11:03

ericgio


1 Answers

Per version download counts are now available from the npm registry.

Download count for specific versions of a package are only available for the previous 7 days. They have a unique API end point

GET https://api.npmjs.org/versions/{package}/last-week

Note: for scoped packages, the / needs to be percent encoded. (@slack/client -> @slack%2Fclient).

They're also displayed in the Versions tab of the package's home page.

like image 155
Nick McCurdy Avatar answered Mar 18 '26 09:03

Nick McCurdy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!