# npm Package Release and Deprecation Monitor (`enfex/npm-package-release-deprecation-monitor`) Actor

Monitor explicit npm packages for latest-version and deprecation changes using fixed public registry endpoints.

- **URL**: https://apify.com/enfex/npm-package-release-deprecation-monitor.md
- **Developed by:** [Marcel K](https://apify.com/enfex) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 checked packages

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## npm Package Release & Deprecation Monitor

Monitor explicit npm packages for changes to their `latest` version and latest-version deprecation status. It is built for engineering teams, package maintainers, dependency-watch workflows, and CI/agent automations that need a small, structured change feed rather than a full npm metadata crawl.

> **Unofficial tool.** This Actor is not affiliated with, endorsed by, or sponsored by npm, Inc. It uses only the public npm registry endpoints described below.

### What it checks

For every explicit package name, the Actor reads only these fixed public registry endpoints:

- `https://registry.npmjs.org/-/package/<package>/dist-tags`
- `https://registry.npmjs.org/<package>/latest`

It reports whether the package is available, its latest version, whether that version is deprecated, and a bounded deprecation reason when supplied. It does **not** fetch or emit complete package metadata, maintainers, authors, email addresses, download figures, tarballs, assets, or package version history.

### Good use cases

- Monitor important production dependencies for new latest releases.
- Detect when the currently tagged `latest` version becomes deprecated.
- Feed bounded package-change events into a CI, Slack, ticket, or agent workflow.
- Maintain a lightweight watch list of up to 25 explicitly named packages.

### Input

| Field | Required | Description |
|---|---:|---|
| `packageNames` | Yes | One to 25 explicit npm package names. URLs, paths, registry hosts, and arbitrary source expressions are rejected. |
| `maxPackages` | No | Maximum distinct packages processed, from 1 to 25. Default: 10. |
| `includeUnchanged` | No | Set to `true` to include unchanged snapshots. Default: `false`; unchanged checks are omitted after a baseline exists. |
| `baselineKey` | No | Namespace for durable package snapshots. Use a stable value for repeated monitoring. |

#### Example input

```json
{
  "packageNames": ["react", "typescript", "@types/node"],
  "maxPackages": 3,
  "includeUnchanged": false,
  "baselineKey": "production-dependencies"
}
````

### Output

The default dataset contains only changed package snapshots (unless `includeUnchanged` is enabled) plus structured per-package errors. Key fields include:

| Field | Meaning |
|---|---|
| `packageName` | Normalized npm package identifier. |
| `latestVersion` | Version currently tagged as `latest`. |
| `latestDeprecated` | Whether the latest version declares itself deprecated. |
| `latestDeprecationReason` | Bounded reason when the public registry supplies one. |
| `changed` / `changeTypes` | Whether availability, latest version, or latest deprecation changed versus the stored baseline. |
| `snapshotHash` | Stable hash for automation and deduplication. |
| `warnings` | Structured, target-level source or validation warnings. |

### Current price

**$0.002 per checked package** (`checked-package`).

A package check is charged before its two bounded registry requests, including checks that are unchanged and therefore omitted from the default dataset. This keeps pricing aligned with actual work. The Actor enforces Apify's configured charge limit; at the maximum input of 25 packages, the expected customer charge is capped at **$0.05**.

### Recommended workflow

1. Start with a small, stable dependency list and a unique `baselineKey`.
2. Run once to create the baseline.
3. Schedule recurring runs with `includeUnchanged: false`.
4. Send only `changed: true` dataset items into your preferred alerting or automation destination.

### Limits and data handling

- Maximum 25 unique package names per run.
- Fixed npm registry hosts and paths only; no arbitrary URLs or credentials.
- Each source request is bounded to 8 seconds, 256 KiB, and two redirects.
- The Actor retains only normalized snapshots needed for change detection in a named key-value store; baseline record keys are hashed.
- Registry availability and rate limits can affect a run. Source failures are returned as structured warnings for the affected package without failing the whole watch list.

### Support

For reproducible issues, include the non-sensitive input shape, run ID, timestamp, and returned warning code. Do not include credentials or private dependency data in public reports.

# Actor input Schema

## `packageNames` (type: `array`):

One to 25 explicit npm package identifiers. URLs, paths, registry hosts, and arbitrary source expressions are rejected.

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

Maximum unique package names processed in this run. Hard-capped at 25.

## `includeUnchanged` (type: `boolean`):

When false, only changed package snapshots and structured errors are pushed after a baseline exists.

## `baselineKey` (type: `string`):

Namespace for stored package snapshots.

## Actor input object example

```json
{
  "packageNames": [
    "react"
  ],
  "maxPackages": 10,
  "includeUnchanged": false
}
```

# Actor output Schema

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

Default dataset items. Raw npm documents and maintainer, author, email, download, tarball, and body data are not emitted.

# 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 = {
    "packageNames": [
        "react"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("enfex/npm-package-release-deprecation-monitor").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 = { "packageNames": ["react"] }

# Run the Actor and wait for it to finish
run = client.actor("enfex/npm-package-release-deprecation-monitor").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "packageNames": [
    "react"
  ]
}' |
apify call enfex/npm-package-release-deprecation-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=enfex/npm-package-release-deprecation-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "npm Package Release and Deprecation Monitor",
        "description": "Monitor explicit npm packages for latest-version and deprecation changes using fixed public registry endpoints.",
        "version": "0.1",
        "x-build-id": "UNL9veynQ3XHCEuNP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/enfex~npm-package-release-deprecation-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-enfex-npm-package-release-deprecation-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/enfex~npm-package-release-deprecation-monitor/runs": {
            "post": {
                "operationId": "runs-sync-enfex-npm-package-release-deprecation-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/enfex~npm-package-release-deprecation-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-enfex-npm-package-release-deprecation-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "packageNames"
                ],
                "properties": {
                    "packageNames": {
                        "title": "Package names",
                        "minItems": 1,
                        "maxItems": 25,
                        "type": "array",
                        "description": "One to 25 explicit npm package identifiers. URLs, paths, registry hosts, and arbitrary source expressions are rejected.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPackages": {
                        "title": "Max packages",
                        "minimum": 1,
                        "maximum": 25,
                        "type": "integer",
                        "description": "Maximum unique package names processed in this run. Hard-capped at 25.",
                        "default": 10
                    },
                    "includeUnchanged": {
                        "title": "Include unchanged snapshots",
                        "type": "boolean",
                        "description": "When false, only changed package snapshots and structured errors are pushed after a baseline exists.",
                        "default": false
                    },
                    "baselineKey": {
                        "title": "Baseline key",
                        "type": "string",
                        "description": "Namespace for stored package snapshots."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
