npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

download-counts

v2.20251201.0

Published

Monthly download counts for every npm package, as a big static object.

Readme

download-counts

The https://npmjs.org/package/download-counts package, updated with a new version once per month, just exports a single giant static object whose keys are package names and whose values are monthly download counts.

To check monthly download counts of individual packages:

> const downloadCounts = require('download-counts')
undefined
> downloadCounts.lodash
310086369
> downloadCounts.react
169846525
> downloadCounts.typescript
365742011
> downloadCounts.nonexistentpackage
undefined

To get the top n packages, just sort the package & count pairs by count, then take the top n. e.g.:

/** Print the top n packages by download count */
function printTopPackages(n) {
  for (const [name, count] of Object.entries(downloadCounts).sort(
    ([_, cnt1], [__, cnt2]) => cnt2 - cnt1
  ).slice(0, n)) {
    console.log(name, count);
  }
}
> printTopPackages(10)
semver 1819920988
ansi-styles 1714990182
debug 1587998302
chalk 1430249785
supports-color 1427520560
minimatch 1238345778
ms 1212057951
tslib 1140382329
strip-ansi 1114443532
ansi-regex 1028842864

History/Maintenance/Contributing/Debugging

A version of download-counts was written by @zeke in 2017, then abandoned. It was replaced by a new version by @ExplodingCabbage in 2025.

The build process for generating a new release runs once per month, and takes most of the month to run due to the npm API's very aggressive rate limiting. It runs in GitHub Actions (for free), where a scheduled job repeatedly calls a single script that, whenever it's called, advances the build a bit by fetching more download counts from the npm API and recording them in source control on a branch specific to that release.

Please report bugs (including the npm package not getting updated with new versions) as GitHub issues.

Hopefully all this will keep working for years and publishing new versions without needing any maintenance. If not, @ExplodingCabbage has maintainer access on GitHub and will try to fix it. He can be contacted at [email protected].

Failures in the build process will result in a failed GitHub Action, visible at https://github.com/nice-registry/download-counts/actions. The logged output there may be sufficient to debug; if not, you can checkout the latest build branch locally and run node buildAndRelease.js yourself. Credentials are only needed for pushing commits to GitHub and publishing to npm; the rest of what the script does does not require any creds. Change the remote origin to a fork you have push access to before testing in order to allow Git pushes to succeed.