# Audit npm dependencies for deprecated and risky packages

**Use case:** 

Checks a list of npm packages (request, moment, node-sass, express and axios here) and flags deprecation notices, install scripts, stale releases, missing repository links, license and maintainer count, with weekly downloads and latest version. A quick health check for a package.json. Paste your own dependency names.

## Input

```json
{
  "packages": [
    "npm:request",
    "npm:moment",
    "npm:node-sass",
    "npm:express",
    "npm:axios"
  ],
  "ecosystem": "both",
  "searchKeywords": [],
  "maxSearchResults": 10,
  "includeDownloads": true,
  "minWeeklyDownloads": 0,
  "releaseHistoryLimit": 10,
  "includeDependencyList": false,
  "includeMaintainerEmails": false,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "ecosystem": {
    "label": "Registry",
    "format": "text"
  },
  "name": {
    "label": "Package",
    "format": "text"
  },
  "version": {
    "label": "Version",
    "format": "text"
  },
  "deprecated": {
    "label": "Deprecated",
    "format": "boolean"
  },
  "deprecationMessage": {
    "label": "Deprecation message",
    "format": "text"
  },
  "hasInstallScripts": {
    "label": "Install scripts",
    "format": "boolean"
  },
  "installScripts": {
    "label": "Scripts",
    "format": "array"
  },
  "hasProvenance": {
    "label": "Provenance",
    "format": "boolean"
  },
  "daysSinceLastRelease": {
    "label": "Days since release",
    "format": "number"
  },
  "latestReleaseDate": {
    "label": "Latest release",
    "format": "date"
  },
  "lastPublisher": {
    "label": "Last publisher",
    "format": "text"
  },
  "maintainersCount": {
    "label": "Maintainers",
    "format": "number"
  },
  "license": {
    "label": "License",
    "format": "text"
  },
  "dependenciesCount": {
    "label": "Dependencies",
    "format": "number"
  },
  "repositoryUrl": {
    "label": "Repository",
    "format": "link"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The npm and PyPI Package Scraper: Downloads, Versions, Licenses Actor is ready to run with the inputs already set for "Audit npm dependencies for deprecated and risky packages". [Sign up or log in](https://console.apify.com/create-task-from-example/fd3SAHt3ZfMGVO0yf) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Audit npm dependencies for deprecated and risky packages" task

The npm and PyPI Package Scraper: Downloads, Versions, Licenses Actor will start running based on the input automatically. You can also change all the input fields, like package names, ecosystem, and more, to match your specific use case.

### 3. Receive the "Audit npm dependencies for deprecated and risky packages" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as registry, package, version, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Audit npm dependencies for deprecated and risky packages" task via API](https://apify.com/zhtech/npm-pypi-package-scraper.md).

## FAQ

### What does the npm dependency audit task return?

The npm dependency audit task saves one row per package: latest version and date, deprecation message, install scripts, days since last release, license, maintainer count, repository link and weekly and monthly downloads.

### How do I audit my own project?

In the npm dependency audit task, replace the five packages with the names from your package.json, one per line with the npm: prefix. PyPI packages work too with the pypi: prefix.

### Does the npm dependency audit task check for CVEs?

The npm dependency audit task flags health signals such as deprecation, install scripts and stale releases from the registry. Use npm audit or a vulnerability database alongside it for known CVEs.

### Can I run the npm dependency audit task on a schedule?

The npm dependency audit task can run daily on an Apify schedule or from CI through the Apify API, so a new deprecation or version on your watch list shows up right away.

### How much does the npm dependency audit task cost?

The npm dependency audit task uses pay per event pricing: a small start fee plus a fixed price per package saved, with no charge for compute time. Small runs like this fit the Apify free plan credit.

## About this Actor

This example demonstrates how to use [npm and PyPI Package Scraper: Downloads, Versions, Licenses](https://apify.com/zhtech/npm-pypi-package-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/zhtech/npm-pypi-package-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/zhtech/npm-pypi-package-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
