
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
npm-registry-analytics
Advanced tools
An opinionated client for the npm package download counts API written in TypeScript
An opinionated client for the npm package download counts API written in TypeScript.
npm i npm-registry-analytics@latest
import { NpmRegistryClient } from 'npm-registry-analytics';
// Create a new client
const client = new NpmRegistryClient();
// get download count for a package on a specific day
await client.getDay({
packages: ['@aws-lambda-powertools/logger'],
date: '2020-01-01', // Also accepts Date objects
});
// get download count for multiple packages during a week
await client.getWeek({
packages: ['@aws-lambda-powertools/logger', '@aws-lambda-powertools/core'],
// Uses the date to determine the week
// Also accepts Date objects, or 2020-W01
date: '2020-01-01',
});
// get daily downloads for a package during the last 30 available days
await client.getDailyDownloadsForLastMonth({
packages: ['@aws-lambda-powertools/logger'],
});
The client supports all the methods exposed by the npm API. Check out the API documentation for a full list of available methods.
This library is licensed under the MIT-0 License. See the LICENSE file.
FAQs
An opinionated client for the npm package download counts API written in TypeScript
We found that npm-registry-analytics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.