# Dependency Manifest Audit (npm & PyPI) (`extezzu/dependency-manifest-audit-npm-pypi`) Actor

Paste a package.json or requirements.txt and get a per-dependency report: outdated, deprecated, stale, license, known vulnerabilities and a risk score.

- **URL**: https://apify.com/extezzu/dependency-manifest-audit-npm-pypi.md
- **Developed by:** [Dmytro Volodymyrovych](https://apify.com/extezzu) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 dependency checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## Dependency Manifest Audit: package.json & requirements.txt Health Check

Paste a `package.json` or `requirements.txt` and get a **per-dependency health report in seconds**: outdated versions, deprecated packages, stale projects, license info, known vulnerabilities and a 0-100 risk score. No login, no API key, no GitHub token needed.

Data comes only from official public registries: the **npm registry**, the **PyPI JSON API** and the open **OSV.dev** vulnerability database.

### What you get for every dependency

| Field | Meaning |
|---|---|
| `outdated` | `major`, `minor`, `patch`, `none` or `unknown` compared with the latest release |
| `deprecated` | npm deprecation flag, or PyPI "Inactive" classifier, with the message |
| `license` | License declared by the latest release, with a copyleft review flag |
| `daysSinceLastPublish`, `isStale` | Maintenance signal based on the latest release date |
| `vulnerabilityCount`, `vulnerabilityIds` | Known advisories (OSV.dev) for your requested version |
| `riskScore`, `riskLevel`, `riskFlags` | Combined 0-100 score, sorted so the riskiest packages come first |
| `repository`, `registryUrl` | Where to look next |

A run summary (counts of high/medium/low risk, deprecated, vulnerable, stale) is saved to the key-value store record `OUTPUT`.

### Use cases

- **Pre-acquisition and client due diligence**: quickly judge the health of a codebase's dependency tree.
- **Freelancers and agencies**: add a dependency report to a project hand-over or audit.
- **CI and scheduled monitoring**: run on a schedule through the Apify API or webhooks and alert when risk grows.
- **License reviews**: surface missing or copyleft licenses early.
- **AI agents**: call the Actor through the Apify API/MCP to check a manifest before suggesting upgrades.

### Input example

```json
{
  "packageJson": "{\"dependencies\":{\"express\":\"^4.17.1\",\"request\":\"^2.88.0\"}}",
  "requirementsTxt": "requests==2.25.0\nflask>=1.0",
  "packages": ["npm:chalk@4.1.2"],
  "checkVulnerabilities": true,
  "staleAfterDays": 730
}
```

You can also pass `manifestUrls` pointing to raw files (for example `raw.githubusercontent.com` links).

### Output example

```json
{
  "ecosystem": "npm",
  "name": "request",
  "requested": "^2.88.0",
  "latestVersion": "2.88.2",
  "outdated": "patch",
  "deprecated": true,
  "deprecationMessage": "request has been deprecated, see https://github.com/request/request/issues/3142",
  "license": "Apache-2.0",
  "daysSinceLastPublish": 2475,
  "isStale": true,
  "vulnerabilityCount": 0,
  "riskScore": 60,
  "riskLevel": "high",
  "riskFlags": ["deprecated", "stale-no-recent-release"]
}
```

### Pricing (pay per event)

You pay only for dependencies that were actually audited:

- **$3.00 per 1,000 dependencies audited** (event `dependency-checked`, $0.003 each)
- Skipped entries (git/file/workspace specifiers), packages that are not found and failed lookups are **free**.
- Set a maximum cost per run in the Apify Console; the Actor stops cleanly when the limit is reached (highest-risk dependencies are delivered and charged first; `OUTPUT` then shows `stoppedByMaxChargeLimit: true`).

### Notes and limits

- Version comparison uses the lowest version allowed by your range as the baseline, so results describe the "floor" of your range.
- `dependencies` and `peerDependencies` are always read; `devDependencies` and `optionalDependencies` only when `includeDevDependencies` is on. At most 2,000 dependencies and 20 manifest URLs per run (public http(s) hosts only).
- npm and PyPI are supported. Lock files and transitive dependencies are not resolved in this version.
- Vulnerability counts are `null` (not 0) when OSV.dev could not be reached or no concrete version is known; check `vulnerabilityLookup` in `OUTPUT`.
- Vulnerability lookups need a concrete baseline version; if OSV.dev is unavailable the run continues without them and says so in the summary.
- Only public registry metadata is accessed. No personal data is collected.

# Actor input Schema

## `packageJson` (type: `string`):

Paste the full contents of a package.json file (dependencies, devDependencies, optionalDependencies are read).

## `requirementsTxt` (type: `string`):

Paste the contents of a requirements.txt file. Pinned (==) and range specifiers are supported; -r, -e, URL and VCS lines are skipped.

## `manifestUrls` (type: `array`):

Optional. Public URLs of RAW package.json or requirements.txt files (for example raw.githubusercontent.com links). The file type is detected from the file name.

## `packages` (type: `array`):

Optional list of extra packages to check, one per entry, such as 'npm:express@4.17.1' or 'pypi:requests==2.25.0'. Version is optional.

## `includeDevDependencies` (type: `boolean`):

Also audit devDependencies and optionalDependencies from package.json.

## `checkVulnerabilities` (type: `boolean`):

Look up known vulnerabilities for the requested version using the free OSV.dev database. Only runs when a concrete version can be determined.

## `staleAfterDays` (type: `integer`):

Flag a package as stale when its latest release is older than this many days.

## `maxDependencies` (type: `integer`):

Safety cap on the number of dependencies analysed (and charged) in one run.

## Actor input object example

```json
{
  "packageJson": "{\n  \"name\": \"example-app\",\n  \"dependencies\": {\n    \"express\": \"^4.17.1\",\n    \"lodash\": \"4.17.15\",\n    \"request\": \"^2.88.0\"\n  },\n  \"devDependencies\": {\n    \"jest\": \"^26.6.3\"\n  }\n}",
  "manifestUrls": [],
  "packages": [],
  "includeDevDependencies": true,
  "checkVulnerabilities": true,
  "staleAfterDays": 730,
  "maxDependencies": 200
}
```

# Actor output Schema

## `results` (type: `string`):

One row per checked item, in the default dataset.

## `summary` (type: `string`):

Totals and counts for the run (OUTPUT record in the key-value store).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "packageJson": `{
  "name": "example-app",
  "dependencies": {
    "express": "^4.17.1",
    "lodash": "4.17.15",
    "request": "^2.88.0"
  },
  "devDependencies": {
    "jest": "^26.6.3"
  }
}`,
    "manifestUrls": [],
    "packages": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("extezzu/dependency-manifest-audit-npm-pypi").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "packageJson": """{
  \"name\": \"example-app\",
  \"dependencies\": {
    \"express\": \"^4.17.1\",
    \"lodash\": \"4.17.15\",
    \"request\": \"^2.88.0\"
  },
  \"devDependencies\": {
    \"jest\": \"^26.6.3\"
  }
}""",
    "manifestUrls": [],
    "packages": [],
}

# Run the Actor and wait for it to finish
run = client.actor("extezzu/dependency-manifest-audit-npm-pypi").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "packageJson": "{\\n  \\"name\\": \\"example-app\\",\\n  \\"dependencies\\": {\\n    \\"express\\": \\"^4.17.1\\",\\n    \\"lodash\\": \\"4.17.15\\",\\n    \\"request\\": \\"^2.88.0\\"\\n  },\\n  \\"devDependencies\\": {\\n    \\"jest\\": \\"^26.6.3\\"\\n  }\\n}",
  "manifestUrls": [],
  "packages": []
}' |
apify call extezzu/dependency-manifest-audit-npm-pypi --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,extezzu/dependency-manifest-audit-npm-pypi"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gLFLuIctEPSZ86xT0/builds/bWk3XYP0Ncy3BBjgo/openapi.json
