# npm Package Metadata - Downloads, Deprecation & Deps (`digivibetech/npm-registry-package-metadata`) Actor

npm package metadata from the official registry API: latest version, license, weekly downloads, deprecation, Node engine, types, size, deps. Paste package.json to audit a project. No author or maintainer fields. $0.00045 per package.

- **URL**: https://apify.com/digivibetech/npm-registry-package-metadata.md
- **Developed by:** [DigiVibeTech](https://apify.com/digivibetech) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.45 / 1,000 package fetcheds

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

## npm Package Metadata - Downloads, Deprecation & Deps

**npm Package Metadata** — npm package metadata from the official registry API: latest version, license, weekly downloads, deprecation, Node engine, types, size, deps.

> **Try it free:** press **Start** — the prefilled input runs a small real job (up to 20 × package fetched, about $0.009 in events). Apify's free plan includes monthly platform credit, so a first test costs you nothing. You can also set a maximum cost per run.

- **What you get:** `name`, `latest`, `license`, `weeklyDownloads`, `isDeprecated`, `nodeEngine`
- **Who it's for:** developers, security and open-source program offices
- **Price:** $0.00045 per package fetched
- **Data source:** Uses the official npm registry and downloads APIs; maintainer personal fields are not returned.

### What is npm Package Metadata?

Look up **npm packages** in the official [npm public registry](https://registry.npmjs.org) API, or paste a `package.json` / `package-lock.json` and audit a project in one run (up to `maxPackages` packages, default 100, max 5000). For each package you get one clean record: latest version, license, **weekly and monthly downloads**, **deprecation message**, Node `engines`, bundled TypeScript types, unpacked size, file count, dependency maps and counts. For project files you also see whether your version is **behind latest**.

**Price:** $0.00045 per package returned (event `package-fetched`, charged once for each package saved to the dataset). There is no start fee. Packages that are not found, invalid names, skipped dependencies and errors are free. Billing stops at `maxPackages`, or earlier when your run's maximum cost would be exceeded; packages left over are listed in `ERRORS` and not charged.

### ✅ Why this one

- **Project audit in one paste**: drop in `package.json` or `package-lock.json` and registry dependencies are checked up to `maxPackages` (default 100) against the latest version. `file:`, `link:`, `workspace:`, `npm:` alias, git, GitHub and URL dependencies are skipped, listed in `ERRORS` and not charged.
- **More than `npm view`**: downloads from the official npm downloads API, deprecation, Node engine, types, size and dependency counts come in one table, plus a **PACKAGES.csv** you can open in a spreadsheet.
- **No author or maintainer fields**: the author and maintainer fields are not returned (only a maintainer count). Email patterns are removed from text and URLs, and phone patterns from descriptions, keywords and deprecation messages. Package names, scopes and homepage/repository URLs can include a publisher's username. Not a PII-free guarantee.

### 📸 Real-run screenshots

Apify Console views of a 10 November 2026 cloud run of the example input below.

![Apify Console output table of the 10 November 2026 run: 10 packages with latest version, license, weekly downloads, deprecated flag, Node engine and bundled types](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/npm-proof-01-console-run-output-l26.png)

![Apify Console Project audit view of that run: in project, project version, latest version, behind latest and deprecated flags; the 6 package.json dependencies show their project version and the 4 other packages show not in project](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/npm-proof-02-console-project-audit-l26.png)

![Apify Console run page of that run: status Succeeded, the status message with 10 packages returned, 2 deprecated, 5 behind latest and 1 not charged, and the run log](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/npm-proof-03-console-run-log-l26.png)

### ⬇️ What data you get

One dataset item per result. Key fields:

| Field |
|---|
| `name` |
| `latest` |
| `license` |
| `weeklyDownloads` |
| `isDeprecated` |
| `nodeEngine` |
| `hasTypes` |
| `unpackedSize` |
| `dependencyCount` |
| `modified` |

### 🎯 Use cases

- Audit a package.json for deprecated or unlicensed dependencies
- Compare weekly downloads of alternative packages
- Track new versions of key packages

### ▶️ How to use

1. Open the actor; the input is prefilled with a small real example.
2. Replace it with your own input and set `maxVersionsListed` to control the cost.
3. Press **Start**. Results appear in the **Output** tab (Overview view).
4. Download JSON, CSV or Excel, call the results via API, or schedule the actor.

### ⚙️ Input

| Field | Description |
|---|---|
| `packages` | Package names (`express`, `@types/node`, …). Required; it can hold just one name when you paste a project file |
| `packageJsonText` | Optional: paste `package.json` or `package-lock.json`. A lockfile gives the installed version; for `package.json` the lowest version the range allows is used (`^4.18.2` → 4.18.2) |
| `version` | Optional: one exact version for every package. You get that version's fields; `latest`, `versionCount`, `versionsListed`, `created` and `modified` stay empty, `isOutdated` is false, and downloads are for the whole package |
| `includeDependencies` | Include dependency maps and `dependencyCount` (default true) |
| `includeDownloads` | Add weekly and monthly downloads (default true; no extra charge) |
| `maxVersionsListed` | The N highest version numbers in `versionsListed` (default 50, max 500) |
| `maxPackages` | Hard cap on billed packages (default 100, max 5000); packages over the cap go to `ERRORS`, not charged |
| `onlyNew` + `modifiedSince` | Skip packages not modified after an ISO date or timestamp; skipped packages are not charged |
| `abbreviated` | Prefer abbreviated packuments (smaller; no description, license, homepage, repository, keywords, maintainer count, types flag or created date) |

#### Example input

```json
{
  "packages": [
    "react",
    "axios",
    "chalk",
    "zod",
    "no-such-package-zz-xyz-123"
  ],
  "packageJsonText": "{\"name\": \"shop-api\", \"version\": \"1.0.0\", \"dependencies\": {\"express\": \"^4.18.2\", \"lodash\": \"4.17.20\", \"uuid\": \"^8.3.2\"}, \"devDependencies\": {\"request\": \"^2.88.0\", \"left-pad\": \"1.3.0\", \"moment\": \"^2.29.4\"}}",
  "maxVersionsListed": 5
}
```

The pasted `package.json` lists `express ^4.18.2`, `lodash 4.17.20` and `uuid ^8.3.2` as dependencies, and `request ^2.88.0`, `left-pad 1.3.0` and `moment ^2.29.4` as devDependencies.

### ⬆️ Output

`name`, `packageDescription`, `license`, `homepage`, `repository`, `keywords`, `distTags`, `latest`, `versionCount`, `versionsListed`, `created`, `modified`, `maintainerCount`, `deprecated`, `isDeprecated`, `engines`, `nodeEngine` (`not declared` when the package sets no Node engine), `hasTypes`, `unpackedSize`, `fileCount`, `dependencyCount`, `weeklyDownloads`, `monthlyDownloads`, the dependency maps, and the project fields `inProject`, `projectSpec`, `projectVersion`, `projectDependencyType`, `isOutdated`, `projectVersionDeprecated`. Project fields are on every package: a package that is not in your pasted project file has `inProject` false, `not in project` in `projectSpec`, `projectVersion` and `projectDependencyType`, and `isOutdated` false. `isOutdated` is true only when your project version is older than latest; a range with no fixed version (such as `1.x` or `latest`) shows `no fixed version`. `projectVersionDeprecated` is the deprecation message of your project version, or null. Also `pinnedVersion`, `source`, `attribution` and `fetchedAt`.

Key-value store: **PACKAGES** (CSV, one line per package), **SUMMARY** (billed, not found, invalid names, skipped, not processed, deprecated, behind latest, license mix) and **ERRORS** (inputs that were not charged, with the reason). The run's status message shows the number of packages returned and charged.

#### Example output

This is a real record for the example input above, fetched on 10 Nov 2026. The `dependencies` map is cut where marked, and `keywords`, `distTags`, `devDependencies`, `peerDependencies`, `optionalDependencies`, `pinnedVersion` and `attribution` are left out here.

```json
{
  "recordType": "npm-package",
  "name": "request",
  "packageDescription": "Simplified HTTP request client.",
  "license": "Apache-2.0",
  "homepage": "https://github.com/request/request#readme",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/request/request.git"
  },
  "latest": "2.88.2",
  "versionCount": 126,
  "versionsListed": [
    "2.85.0",
    "2.86.0",
    "2.87.0",
    "2.88.0",
    "2.88.2"
  ],
  "created": "2011-01-22T00:36:12.640Z",
  "modified": "2026-07-17T17:10:13.431Z",
  "maintainerCount": 4,
  "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
  "isDeprecated": true,
  "engines": {
    "node": ">= 6"
  },
  "nodeEngine": ">= 6",
  "hasTypes": false,
  "unpackedSize": 209281,
  "fileCount": 17,
  "dependencyCount": 20,
  "weeklyDownloads": 14069250,
  "monthlyDownloads": 51683599,
  "dependencies": {
    "qs": "~6.5.2",
    "aws4": "^1.8.0",
    "uuid": "^3.3.2",
    "extend": "~3.0.2",
    "...": "16 more"
  },
  "inProject": true,
  "projectSpec": "^2.88.0",
  "projectVersion": "2.88.0",
  "projectDependencyType": "devDependencies",
  "isOutdated": true,
  "projectVersionDeprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
  "source": "https://registry.npmjs.org/request",
  "fetchedAt": "2026-11-10T09:16:55.517619+00:00"
}
```

`PACKAGES.csv` excerpt from the same fetch:

```csv
name,projectVersion,latest,isOutdated,license,isDeprecated,deprecated,weeklyDownloads,monthlyDownloads,nodeEngine,hasTypes,unpackedSize,fileCount,dependencyCount,modified
express,4.18.2,5.3.0,True,MIT,False,,196494336,672492867,>= 18,False,76638,10,28,2026-11-07T17:35:30.254Z
lodash,4.17.20,4.18.1,True,MIT,False,,203621096,711710375,not declared,False,1413741,1051,0,2026-11-10T00:34:37.848Z
request,2.88.0,2.88.2,True,Apache-2.0,True,"request has been deprecated, see https://github.com/request/request/issues/3142",14069250,51683599,>= 6,False,209281,17,20,2026-07-17T17:10:13.431Z
left-pad,1.3.0,1.3.0,False,WTFPL,True,use String.prototype.padStart(),2152007,8255009,not declared,True,9752,10,0,2024-04-16T05:01:57.431Z
```

For this input, 10 packages are returned and charged. `no-such-package-zz-xyz-123` goes to `ERRORS` and is not charged.

### 💵 Pricing and cost estimate

| Event | Price |
|---|---|
| Package fetched | **$0.00045** |

#### Cost estimate

| Package fetcheds | Cost |
|---|---|
| 100 | $0.045 |
| 1,000 | $0.45 |
| 10,000 | $4.50 |

You pay only for these events: no subscription.

### 🔌 Integrations and API

Run it from **n8n, Make, Zapier, Clay** or any tool that can call an HTTP endpoint, connect a **webhook** to get notified when a run finishes, or let AI agents call it through the **Apify MCP server** (`mcp.apify.com`).

Run it and get the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/digivibetech~npm-registry-package-metadata/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"packages": ["express", "lodash"], "maxVersionsListed": 20}'
```

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("digivibetech/npm-registry-package-metadata").call(run_input={"packages": ["express", "lodash"], "maxVersionsListed": 20})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### ⚠️ Limits

- Uses **registry.npmjs.org** (packuments) and **api.npmjs.org/downloads** (point counts) only. Both are public npm APIs. It does not scrape www.npmjs.com and does not download tarballs.
- No vulnerability data: npm's terms do not allow passing npm security data on to others, so use `npm audit` for advisories.
- "Behind latest" compares versions only. It does not say whether an upgrade is safe or breaking.
- Very large packuments above 12 MB (packages with thousands of versions, such as `typescript`, about 16 MB on 10 Nov 2026) are reported in `ERRORS` and not charged. Try `abbreviated: true` for those (about 9 MB for `typescript`).
- With a `version` pin, the registry's version endpoint is used, so `latest`, version counts and dates are left empty and `isOutdated` is false.
- Polite client: at most 1 request per second per host, honest User-Agent with a contact URL, robots.txt respected.

### 🛡️ Data source, privacy and legality

Uses the official npm registry and downloads APIs; maintainer personal fields are not returned.

#### Privacy and data retention

- What is stored: public package metadata only. Author and maintainer fields are not returned (only a count). Email patterns are removed from text fields and URLs, and phone patterns from description, keywords and deprecation messages; filtering is pattern-based, not a PII-free guarantee. Package names, scopes and homepage/repository URLs can contain a publisher's username. If you paste a project file, only dependency names and version ranges are used. The file itself is kept only in your run input.
- Where it is stored: in your own Apify run storage (dataset plus key-value store: PACKAGES, SUMMARY, ERRORS). Apify keeps it for your plan's data retention period, and you can delete it at any time. See Apify's privacy policy: https://apify.com/privacy-policy
- DigiVibeTech gets no copy of your results. Our general privacy policy: https://digivibetech.com/privacy/
- Package contents remain under each package's own license. Not affiliated with npm, Inc. or GitHub.

### ❓ FAQ

#### How much does npm Package Metadata cost?

$0.00045 per package fetched. See the cost estimate table above. There is no monthly fee.

#### Can I try it for free?

Yes. Press Start with the prefilled input: it runs a small real job (up to 20 × package fetched, about $0.009 in events). Apify's free plan includes monthly platform credit, which covers a first test.

#### Is it legal to use npm Package Metadata?

Uses the official npm registry and downloads APIs; maintainer personal fields are not returned. Use the results lawfully (terms of the source, GDPR where it applies). This is not legal advice.

#### Can I use it through the API or an MCP server?

Yes. Every run is available through the Apify API and the official client libraries, and AI agents can call the actor through the Apify MCP server. See Integrations and API above.

#### Something does not work. Where do I get help?

Open an issue on the Issues tab or use [digivibetech.com/support](https://digivibetech.com/support/). Include the run ID so we can reproduce it.

### 📝 Changelog

#### 20 Nov 2026 — listing refresh

- README, listing text and input form restructured to the DigiVibeTech Apify quality standard v1. No feature or price change.

#### 1.0 — builds 1.0.1 to 1.0.5

- First build 2026-10-14, latest build 2026-11-10 (5 successful builds).

### 🧩 More DigiVibeTech actors

- [Bulk Image Converter & Compressor - WebP, AVIF, JPEG, PNG](https://apify.com/digivibetech/bulk-image-converter-compressor)
- [Bulk QR & Barcode Generator - PNG, SVG, Label PDFs](https://apify.com/digivibetech/bulk-qr-barcode-generator)
- [PDF OCR to Markdown - Scanned PDF & Image to Text for RAG](https://apify.com/digivibetech/document-to-markdown-ocr)
- [Bulk WHOIS & DNS Lookup - Domain Expiry, RDAP, SPF, DMARC](https://apify.com/digivibetech/domain-whois-rdap-dns)

*Maintained by DigiVibeTech. Questions or bugs: use the Issues tab or [digivibetech.com/support](https://digivibetech.com/support/); we reply within 2–5 business days.*

# Changelog

This Actor's version history is a separate document: https://apify.com/digivibetech/npm-registry-package-metadata/changelog.md

# Actor input Schema

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

npm package names to look up (unscoped e.g. express, or scoped e.g. @types/node).

## `packageJsonText` (type: `string`):

Paste a package.json or package-lock.json. Direct dependencies from the npm registry are checked up to maxPackages (default 100, max 5000), and flagged when behind the latest version. A lockfile gives the installed version (lockfile v1: every top-level locked package); for package.json the lowest version the range allows is used. file:, link:, workspace:, npm: alias, git, GitHub and URL dependencies are skipped, listed in ERRORS and not charged. Names already in 'packages' are checked once.

## `version` (type: `string`):

If set, fetch that exact version for every package (e.g. 4.18.2). You get that version's fields; latest, versionCount, versionsListed, created and modified stay empty, isOutdated is false, and downloads are for the whole package. A package without that version goes to ERRORS, not charged.

## `modifiedSince` (type: `string`):

ISO-8601 date or timestamp (e.g. 2026-01-01 or 2026-01-01T00:00:00Z; no time zone = UTC), compared to the packument modified field when onlyNew is true.

## `abbreviated` (type: `boolean`):

If true, request abbreviated packuments (smaller; no description, license, homepage, repository, keywords, maintainer count, types flag or created date). Default false for richer metadata. Email patterns (and phone patterns in free text) are stripped either way (pattern-based).

## `maxVersionsListed` (type: `integer`):

How many version numbers to include in versionsListed: the N highest versions in semver order (1–500).

## `maxPackages` (type: `integer`):

Hard cap on billed packages for this run (1–5000). Packages over the cap are listed in ERRORS and not charged.

## `onlyNew` (type: `boolean`):

When true and modifiedSince is set, skip packages whose modified timestamp is not newer. Skipped packages are not charged.

## `includeDependencies` (type: `boolean`):

When true, include dependencies / devDependencies / peerDependencies / optionalDependencies for the latest (or pinned) version.

## `includeDownloads` (type: `boolean`):

Add weekly and monthly downloads from the public npm downloads API (api.npmjs.org). 2 extra requests per package, no extra charge.

## Actor input object example

```json
{
  "packages": [
    "express",
    "lodash"
  ],
  "version": "",
  "modifiedSince": "",
  "abbreviated": false,
  "maxVersionsListed": 20,
  "maxPackages": 100,
  "onlyNew": false,
  "includeDependencies": true,
  "includeDownloads": true
}
```

# Actor output Schema

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

All result items (overview view)

## `errors` (type: `string`):

Inputs that could not be processed, with the reason

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

Counts of processed, billed and failed items

## `packagesCsv` (type: `string`):

One line per package: project version, latest, behind latest, license, deprecated, downloads, Node engine, types, size, deps

# 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 = {
    "packages": [
        "express",
        "lodash"
    ],
    "version": "",
    "modifiedSince": "",
    "maxVersionsListed": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("digivibetech/npm-registry-package-metadata").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 = {
    "packages": [
        "express",
        "lodash",
    ],
    "version": "",
    "modifiedSince": "",
    "maxVersionsListed": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("digivibetech/npm-registry-package-metadata").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 '{
  "packages": [
    "express",
    "lodash"
  ],
  "version": "",
  "modifiedSince": "",
  "maxVersionsListed": 20
}' |
apify call digivibetech/npm-registry-package-metadata --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,digivibetech/npm-registry-package-metadata"
        }
    }
}
```

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/xDHSUl55mT9q6meWJ/builds/qcscBLa0det3c2pum/openapi.json
