npm Package Health avatar

npm Package Health

Pricing

from $3.00 / 1,000 package health reports

Go to Apify Store
npm Package Health

npm Package Health

Check up to 1,000 npm packages per run for deprecation, known vulnerabilities, licence, maintainers, download volume and staleness, with a risk score for each. Also works as an MCP tool for AI agents.

Pricing

from $3.00 / 1,000 package health reports

Rating

0.0

(0)

Developer

Tankster AI

Tankster AI

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

6 hours ago

Last modified

Categories

Features

Limited permissionsSingle-tenantServer interface

Share

npm Package Health and Vulnerability Checker

Is this npm package safe to depend on? This Actor answers with one health report per package, built only from public data: whether the version you use is deprecated, when the package was last published, how many maintainers it has, its licence and source repository, whether it ships TypeScript types, its weekly downloads, the known vulnerabilities of that exact version from OSV.dev (with IDs, severity and the versions that fix them), and a simple risk score that lists every point it adds.

Use it two ways:

  • 📋 Batch run: paste up to 1,000 package names and get one dataset row per package, ready to export as JSON, CSV or Excel.
  • 🤖 MCP server for AI agents: your coding agent calls check_package or check_packages before it adds or upgrades a dependency.

What does each report contain?

FieldWhat it means
version, latestVersion, isLatestThe version checked (the one you named, a dist-tag's version, or the latest) and the latest
deprecated, deprecationMessagenpm's deprecation flag and message for the checked version
latestDeprecated, latestDeprecationMessageThe same for the latest version: in practice, whether the whole package is deprecated
versionPublishedAt, latestPublishedAt, lastPublishedAt, daysSinceLastPublishPublish dates; the last publish counts any version, prereleases included
maintainersCountMaintainers listed in the npm registry
license, repositoryUrlThe licence the checked version declares (license, or the older licenses field) and the source repository
types, typesPackagebundled (the package declares its own types), definitelytyped (an @types package exists) or none
weeklyDownloadsDownloads in the last 7 days npm has data for
vulnerabilities, vulnerabilityCount, vulnerabilityCounts, maliciousKnown vulnerabilities of this version from OSV.dev: ID, aliases (CVE), summary, severity, CVSS v3 score, the version that fixes the range this version is in, a link, and the advisory's source (its database and licence)
vulnerabilityDataNoticeCredit and licences for the advisory data, on every report that has any (see Data sources and licences)
riskScore, riskLevel, riskFactorsThe risk score below, with each factor's points and reason

A package that cannot be checked gets an error item instead, with status: "error", an error code and a plain message: invalid_name, invalid_version, not_found, unpublished, version_not_found, no_versions, packument_too_large, answer_too_large (an OSV or downloads answer over 16 MiB), internal_error (the Actor failed on this package; retry), upstream_unavailable (retry later) or upstream_bad_response. Error items are free.

Inputs that resolve to the same version (react, react@latest and react@19.3.1, when 19.3.1 is the latest) are one report and one charge. In a batch run the later ones are listed in the OUTPUT record's duplicates; in check_packages they come back as status: "duplicate" items, free.

How to run a batch

Put package names in Packages, one per line. Add @version for an exact version or a dist-tag (lodash@4.17.21, next@canary); leave it out for the latest. Version ranges such as ^1.2.0 are not accepted, because a report is about one version. Duplicates are checked once.

{ "packages": ["react", "express@4.17.1", "lodash@4.17.20", "request", "typescript"] }

The dataset has one item per unique package, in the order you gave them. The Overview view shows one row per package; the Vulnerabilities view shows one row per advisory. The run's OUTPUT record summarises how many packages were reported and how many were error items.

Example report (shortened)

{
"status": "ok",
"input": "lodash@4.17.20",
"name": "lodash",
"version": "4.17.20",
"latestVersion": "4.18.1",
"deprecated": false,
"maintainersCount": 1,
"license": "MIT",
"types": "definitelytyped",
"typesPackage": "@types/lodash",
"weeklyDownloads": 211307245,
"vulnerabilityCount": 4,
"vulnerabilities": [{
"id": "GHSA-35jh-r3h4-6jhm",
"aliases": ["CVE-2021-23337"],
"summary": "Command Injection in lodash",
"severity": "high",
"cvssScore": 7.2,
"fixedVersions": ["4.17.21"],
"url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm"
}],
"riskScore": 61,
"riskLevel": "high",
"riskFactors": [
{ "factor": "known_vulnerabilities", "points": 56, "detail": "Known vulnerabilities in this version: 2 high, 2 moderate" },
{ "factor": "single_maintainer", "points": 5, "detail": "One maintainer" }
]
}

How the risk score works

The score is the sum of these points, capped at 100. Every point added is listed in riskFactors with its reason, so you can check it or apply your own rules to the raw fields.

FactorPoints
malicious: an advisory says this version contains malicious code100
known_vulnerabilities: per critical / high / moderate / low / unknown-severity advisory35 / 20 / 8 / 2 / 8 (at most 60 in total)
package_deprecated: the latest version is deprecated30
version_deprecated: the checked version is deprecated with its own message (not the same message as the deprecated latest, which package_deprecated already counts)20
stale_2_years: no version published for over 2 years15
stale_4_years: no version published for over 4 years (instead of the above)25
no_maintainers: no maintainers listed10
single_maintainer: one maintainer5
no_license: no licence declared10
no_repository: no source repository declared5
low_downloads: under 1,000 downloads last week5

Levels: below 25 is low, below 50 medium, below 75 high, and 75 or more critical. The score is a triage aid built from public metadata and known advisories. It is not a security audit, and a low score does not prove a package is safe.

Severity comes from the advisory's label (GitHub's critical, high, moderate, low). When an advisory has no label but has a CVSS v3 vector, the Actor computes the base score and rates it with the CVSS bands. Otherwise it is unknown.

How to connect an AI agent (MCP)

This Actor also runs in Standby mode as an MCP server. Point your MCP client at:

https://<username>--npm-package-health.apify.actor/mcp
Authorization: Bearer <your Apify API token>

Apify Console shows the exact URL in the Actor's Server tab. For example, in Claude Code:

claude mcp add --transport http npm-health https://<username>--npm-package-health.apify.actor/mcp --header "Authorization: Bearer <your Apify API token>"

Two tools, both read-only:

  • 🔍 check_package: one package, as name or name@version. Returns the report above.
  • 📦 check_packages: up to 50 packages in one call. Returns one result per unique package, in order.

Pricing

You pay per package reported (pay per event):

EventPriceWhen
package-report$0.003One package reported: a dataset item in a batch run, or a report returned by an MCP tool

So 1,000 package reports cost $3 in report events, plus platform usage.

  • Free: error items (an invalid name, a package or version that does not exist, a source that is unavailable), and any refused call.
  • Platform usage: runs use 512 MB of memory by default. A batch of the five example packages takes a few seconds. In Standby, your server runs in your own Apify account (single-tenant), so you also pay for its runs while they are up, including while they wait for requests until the idle timeout stops them. To change the idle timeout or the memory, open the Actor in Apify Console, select Save as a new task, change the task's Settings, and connect your MCP client to the task's hostname instead of the Actor's.
  • Run start: if the Actor's pricing includes Apify's standard start event, it costs $0.00005 per run start at this Actor's memory (one event per start up to 1 GB).

Spending limits

  • Batch runs: set the run's maximum cost. Before each package is looked up, the Actor checks that the limit can pay for its report. When it cannot, the run stops: the packages not yet checked are listed in the OUTPUT record (notChecked) and the status message, and nothing more is looked up or charged. The budget goes to the first packages in your list.
  • MCP calls: the limit applies per run. Standby may start more runs (when one run is busy, after an idle timeout, or to replace a run), and each new run has its own limit. When the run you reach has spent its limit, paid calls are refused with spending_limit and nothing is charged. A check_packages call needs budget for every package in it; if it asks for more, it is refused and says how many the run can still take.
  • Your account's monthly usage hard limit caps spending across all runs.

When something is wrong on Apify's side

  • Charge not confirmed: once the Actor has sent a charge, Apify may apply it even if its answer is lost. So if Apify does not confirm a charge within a few seconds, the MCP reports are delivered with a billingNotice of charge_unconfirmed: the call may have been charged. If you were charged for something you did not receive, contact us with the run ID. A batch run stops instead of continuing; the report being saved when it happened is in the dataset, and the OUTPUT record names it (chargeUnconfirmed).
  • Billing unavailable: if the Actor cannot even start a charge, no charge is sent: the reports are withheld with billing_unavailable and not charged. Retry in a minute.
  • Pricing or setup misconfigured: if the Actor's pricing does not price the package-report event, or the Actor is not single-tenant, paid calls are refused with pricing_misconfigured or tenancy_misconfigured and nothing is charged. A batch run also refuses to start, charging nothing, if the pricing charges for every dataset item (which would charge the free error items).

Where the data comes from

Only public, logged-out sources, through their documented public APIs, with no API keys:

  • npm registry (registry.npmjs.org): the package's metadata, and the @types package's latest version.
  • npm downloads API (api.npmjs.org): weekly downloads. Up to 128 unscoped packages share one bulk request, the documented limit.
  • OSV.dev (api.osv.dev): known vulnerabilities for one package version, every page of the answer.

The Actor sends an identifying User-Agent, limits how many requests it makes to each source at once, retries failures with backoff, waits as long as a source asks with Retry-After (or gives up if that is more than 20 seconds), and reuses each answer for 5 minutes within a run. Each package costs at most two registry requests, one OSV request (more only when OSV pages a very long answer), and a share of one downloads request (one whole request for a scoped package).

Data sources and licences

  • npm registry and downloads API: used under the npm Open-Source Terms, which allow the public APIs and rule out unreasonable volumes, naming 5,000,000 requests a month by any single individual, organization or group as clearly too many. That line applies to this Actor's whole operation, all users' runs together, not to one run. So each run sends at most 10,000 requests to npm (registry and downloads API together; a 1,000-package batch needs about 2,200), and a package checked after that gets a free, retryable upstream_unavailable item. We watch the total across runs and will contact npm before it comes near the line.
  • OSV.dev: the vulnerability data. OSV.dev aggregates several databases, each under its own licence, as listed on its data sources page. npm advisories come from:
    • the GitHub Advisory Database, © GitHub, Inc., licensed CC-BY 4.0 (GHSA- IDs);
    • OpenSSF Malicious Packages, licensed Apache-2.0 (MAL- IDs).
  • What this Actor changes: advisory IDs, aliases and summaries are reproduced unmodified. Severity labels are read from the advisory, and so are CVSS vectors. The CVSS base score, the fixed versions that apply to your version, and the risk score are derived by this Actor. Each vulnerability's source names its database, licence and link. Every report that carries advisory data repeats this credit in vulnerabilityDataNotice.

Limits

  • 1,000 packages per batch run and 50 packages per check_packages call.
  • Types are read from package.json fields (types, typings, a types export condition) and DefinitelyTyped. When DefinitelyTyped's @types package is a stub saying the package ships its own types (as for TypeScript), the types count as bundled. A package that ships .d.ts files without declaring them, and has no such stub, shows none or definitelytyped.
  • Vulnerabilities are what OSV.dev knows for that exact version. A clean result means no known advisory, not proof of safety.
  • Downloads cover the last 7 days npm has data for (usually up to yesterday, UTC). A package npm has no download data for shows 0.
  • Package metadata over 64 MiB is not read, and the package gets a packument_too_large error item. Most packages are far smaller, but a few with thousands of versions are not: in November 2026, renovate's metadata was about 76 MB (over the limit), vite's about 39 MB and Next.js's about 31 MB. Metadata over 8 MiB is read one package at a time, so large ones cannot exhaust the run's memory together.

FAQ

Does it need my npm token or any account? No. It reads only public data, and it never logs in anywhere.

Why is my version "not found"? The registry has no such version or dist-tag. npm removes malicious versions, so an old version can disappear (for example event-stream@3.3.6).

Can I check a private package? No. Private packages need a login, and this Actor never uses one.

Why does a package with no known vulnerabilities still score above 0? Other factors add points too: deprecation, no publish for years, one maintainer, no licence or repository, or low downloads. riskFactors lists them.