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.
| Ecosystem | Source | What it counts |
|---|---|---|
| npm | The npm downloads API, documented in npm Docs, and the weekly figure on each package page | Tarball fetches from the public registry, per package and per day |
| PyPI | The public download dataset that PyPI publishes to Google BigQuery; community sites such as pypistats summarise it | Individual file downloads, with installer, Python version and platform where the client reports them |
| crates.io | Download totals shown on each crate page and in the crates.io database dumps | Crate file downloads per version |
| Go | No equivalent public download counter from the module proxy | Popularity 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:
- Continuous integration. Every pipeline run without a warm cache re-downloads the dependency tree. A single busy project can outweigh thousands of individual users.
- Mirrors and proxies. Corporate caches download once and then serve many machines, which deflates counts for packages used mainly inside companies.
- Transitive installs. A tiny helper pulled in by a popular framework gets every one of the framework's downloads, though almost nobody chose it directly.
- Bots and scanners. Security scanners and research crawlers fetch packages too.
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:
- 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.
- 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.
- 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.
- 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.