Package Download Statistics: Where the Numbers Come From and What They Miss

Download counts are the most quoted number in open source and one of the least understood. Before you put one on a slide, in a README badge or in a decision about which dependency to adopt, it helps to know exactly who produced the figure and what it is counting.

The official sources

Each registry publishes its own figures, and each measures something slightly different.

EcosystemSourceWhat it counts
npmThe npm downloads API, documented in npm Docs, and the weekly figure on each package pageTarball fetches from the public registry, per package and per day
PyPIThe public download dataset that PyPI publishes to Google BigQuery; community sites such as pypistats summarise itIndividual file downloads, with installer, Python version and platform where the client reports them
crates.ioDownload totals shown on each crate page and in the crates.io database dumpsCrate file downloads per version
GoNo equivalent public download counter from the module proxyPopularity is usually inferred from importers listed on pkg.go.dev instead

What inflates the totals

A download is a fetch, not a person. The same developer can trigger hundreds of fetches a day without knowing it:

The practical consequence is that download counts are useful for trends within one package (did adoption grow after the 2.0 release?) and nearly useless for comparing two unrelated packages.

Better questions to ask of the data

Instead of "how many downloads", try questions the data can actually answer:

  1. Which versions are people still on? Per-version counts tell you whether dropping support for an old major will hurt anyone. This is the most valuable use of download data for a maintainer.
  2. Which runtimes do installers report? The PyPI dataset includes the Python version of the installing client, which helps when deciding whether to drop an interpreter.
  3. How many packages depend on this one directly? Dependents lists on the registry or on pkg.go.dev are a better adoption signal than raw downloads.
  4. Is the trend stable? Look at a rolling weekly figure; daily numbers jump with weekends and holidays.

Publishing your own numbers honestly

If you quote downloads in a README or a talk, say which source and which period you used, and avoid implying they are users. A sentence such as "about N weekly downloads on npm, measured over the last month, including CI traffic" is honest and still informative. Do not combine numbers from different registries into one total; they are measured too differently to add up.

For the related question of which old versions you still need to support, see our notes on deprecation warnings.

Related pages