[Website/API] Report download numbers of package by version


(Jan Piotrowski) #1

Currently there is no way to get download numbers for a specific version (or all versions) of a package. This means you can not check if and by how much users are adopting your new versions. But that would be useful to understand your software’s usage better.

A package page on npmjs.com shows the downloads, and I can switch to other versions of the package via the “x Versions” tab - but even when looking at the details for a specific version I still see the overall download numbers. It would be great if this could add another graph that shows only the download for this specific version.

Additionally, it would of course be nice if the same data would also be available via an API that made it easier to download and compare those numbers.


One the API side this would probably best be implemented via https://github.com/npm/registry/blob/master/docs/download-counts.md. An additional, optional parameter {version} that can be added at the end could limit the reported data to that specific version.

How to request the data for all versions, but split by version, I can’t make a valid suggestion as there don’t seem to be any parameters for the API. A ?split_by_version=true could work there of course.


This feature request also exists as an issue here: https://github.com/npm/download-counts/issues/6