npm API guide

npmjs.com

Search npm for JavaScript packages, check their latest versions and licenses, and review download counts over a chosen period.

Actions and inputs

npm search

Find public registry packages by keyword.

Inputs Search query, optional result limit

package

Review a package’s latest version, dependencies, and publishing activity.

Inputs Package name

npm downloads

Check download counts for a package over a preset period or date range.

Inputs Package name, optional period or date range

risk

Review maintenance and adoption signals for a package.

Inputs Package name

Maintained packages

Create

Publish an initial release with npm tooling under a name or scope you control; review the contents and access level first.

Inputs Package files, name, version, access level, and publish confirmation

Read

Open the package page to review versions, distribution tags, and dependencies.

Inputs Package name and optional version

Update

Publish a new version to update code or packaged metadata; published versions cannot be overwritten.

Inputs Package name, new version, revised files, and publish confirmation

Delete

Deprecate a release you maintain to warn users without removing it; unpublishing is restricted by npm policy.

Inputs Package name, version or range, and deprecation message