I wanted to understand the amount of traffic npm generates weekly for its packages. After some difficulty finding an immediate answer, I compiled a list of popular npm packages and queried various APIs to determine their weekly download counts and the sizes of their respective tarballs (.tgz files) when performing an npm install. Although the traffic may not compare to that of streaming services, it still seems significant. Here are the insights I gathered:
- An overview of over 5,000 unique npm packages.
- Data source for weekly download counts from npm’s API.
- API endpoint for tarball URLs to understand download sizes.
- Methodology using curl to get actual download sizes for each package.