NPM Package Info API - Version, License & Metadata Lookup
Returns metadata for an npm package including the latest version, description, license, homepage, repository URL, keywords, dependency count, total version count, and creation/modification timestamps. Useful for dependency auditing, license compliance, and developer tooling.
Scan all dependencies in a project's package.json to check their licenses. Flag packages using GPL, AGPL, or other copyleft licenses that may conflict with your project's licensing terms. Generate a compliance report listing every dependency and its license.
Dependency health monitoring
Track the modification date and version count of your project's dependencies. Packages that haven't been updated in over 2 years or have very few versions may be unmaintained. Alert your team when a critical dependency goes stale.
Developer tooling and documentation
Build internal tools that display package metadata inline. When a developer references a package in a code review or design doc, auto-link to the homepage, show the latest version, and display the dependency count to assess complexity.
Frequently asked questions
Does this work with scoped packages?
Yes. Pass scoped packages with the @ prefix (e.g., "@types/node", "@angular/core"). The full scope and package name are required.
What version is returned?
The version field returns the latest stable version tagged as "latest" in the npm registry. Pre-release versions (alpha, beta, rc) are not included unless they are the only published version.
What does dependencies_count include?
The dependencies_count reflects the number of direct production dependencies listed in the package's package.json. It does not include devDependencies or transitive (nested) dependencies.
Can I get data for a specific version?
This endpoint returns metadata for the latest version only. For version-specific data or the full version history, query the npm registry directly at registry.npmjs.org.
What happens if the package does not exist?
The endpoint returns a 404 error with a message indicating the package was not found. Double-check the package name, including the scope prefix for scoped packages.
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.