# NPPES Healthcare Organization Change Monitor (`theleadforge/nppes-healthcare-organization-change-monitor`) Actor

Track new and reactivated healthcare organization NPIs from official CMS NPPES weekly data. Filter by state or taxonomy, or monitor up to 100 NPIs.

- **URL**: https://apify.com/theleadforge/nppes-healthcare-organization-change-monitor.md
- **Developed by:** [Mason](https://apify.com/theleadforge) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 qualifying organization changes

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## NPPES Healthcare Organization Change Monitor

Monitor organization lifecycle changes from the newest official CMS NPPES Weekly Version 2 release. The Actor supports a filtered weekly feed and an exact-NPI watchlist while excluding NPI-1 individuals and unnecessary personal fields.

### What it delivers

- `organization_npi_enumerated` — a new organization NPI whose enumeration date falls inside the official weekly period.
- `organization_npi_reactivated` — an organization NPI whose reactivation date falls inside the official weekly period.
- `organization_npi_deactivated` — watchlist mode only, and only when the Actor previously confirmed that NPI as an active NPI-2 organization through an exact official NPPES API lookup.

This Actor does not classify weekly-feed deactivations because CMS commonly strips deactivated weekly rows down to NPI and date, leaving no organization/individual discriminator.

### Modes

#### Weekly feed

Use `mode: "weeklyFeed"` to receive nationwide events or filter by exact two-letter state codes and/or exact NUCC taxonomy codes. Paid runs require a stable `monitorId`; use the same ID for scheduled weekly runs so replay protection remains continuous.

#### Watchlist

Use `mode: "watchlist"` with 1–100 NPIs. New entries are normalized, deduplicated, and checked sequentially against the official NPPES Read API. NPI-1 records, inactive/zero-result lookups, mismatches, throttled responses, and malformed responses fail closed before event delivery.

### Free preview

The default input returns exactly 10 deterministic nationwide enumeration/reactivation records from the current official release. It does not accept filters or watchlists, does not write replay state, and is non-billable. Rerunning the same release returns the same 10 event identities.

### Recurring use

The Actor discovers the newest official CMS archive on every run. Schedule paid monitors weekly for continuity. A new official release produces new deterministic event IDs and new qualifying paid results. Rerunning the same release with the same `monitorId` suppresses already delivered events and duplicate charges.

The Actor intentionally processes only the newest release. It does not guess future filenames or backfill missed archives.

### Output and privacy

Visible output is restricted to event identity, event type/date, NPI, organization name, one taxonomy code, city/state/ZIP5, official source period/provenance, and observation time. Qualified deactivation output is narrower and omits organization details.

The Actor does not publish NPI-1 individuals, phone numbers, authorized officials, other-name arrays, full street addresses, licenses, endpoints, or raw source rows. Taxonomy descriptions are omitted because the approved weekly source provides taxonomy codes but not descriptions.

NPI lifecycle data does not prove licensure, credentialing, payer enrollment, operation, legitimacy, or buying intent. Do not use the output as the sole basis for consequential healthcare, employment, credit, insurance, or eligibility decisions.

### Billing behavior

The production pricing event is `qualifying-organization-change`. The planned launch price is $0.01 per unique validated event, with Apify platform usage included. Empty, failed, stale, malformed, duplicate, replayed, and excluded results are non-billable.

Billing integrity order:

1. Persist the visible validated event.
2. Persist durable per-monitor delivery and global billing ledger claims.
3. Charge only after both writes succeed.
4. Never retry a charge whose durable global claim already exists.

Automatic `apify-default-dataset-item` pricing must remain disabled. The Actor fails closed in paid modes until the custom pay-per-event configuration exists.

### Official sources

- CMS NPI Files index: `https://download.cms.gov/nppes/NPI_Files.html`
- CMS NPPES Weekly Version 2 archive discovered from that index
- NPPES Read API v2.1: `https://npiregistry.cms.hhs.gov/api/`

No authentication, proxy, browser automation, CAPTCHA handling, or access-control workaround is used.

### Local development

```bash
npm install
npm run build
npm test
apify actor:run
```

Default runtime memory is 512 MB. The default preview is designed to complete within Apify's five-minute Store QA limit.

# Actor input Schema

## `mode` (type: `string`):

Use Weekly feed for nationwide/state/taxonomy signals, or Watchlist for up to 100 known organization NPIs.

## `preview` (type: `boolean`):

Returns the same deterministic 10 nationwide records for the current weekly release. Preview runs do not use replay state and are not charged.

## `monitorId` (type: `string`):

Stable ID used to preserve replay state across scheduled runs, for example my-national-feed or hospital-watchlist.

## `states` (type: `array`):

Optional two-letter state or territory codes. Leave empty for nationwide results.

## `taxonomyCodes` (type: `array`):

Optional exact NUCC healthcare provider taxonomy codes.

## `eventTypes` (type: `array`):

Weekly feed supports enumerated and reactivated. Watchlist additionally supports qualified deactivations.

## `watchlistNpis` (type: `array`):

One to 100 valid 10-digit organization NPIs. New entries are verified with an exact official NPPES API lookup.

## `maxEvents` (type: `integer`):

Safety limit for visible validated output. The hard ceiling is 25,000 events per run.

## Actor input object example

```json
{
  "mode": "weeklyFeed",
  "preview": true,
  "states": [],
  "taxonomyCodes": [],
  "eventTypes": [
    "organization_npi_enumerated",
    "organization_npi_reactivated"
  ],
  "watchlistNpis": [],
  "maxEvents": 25
}
```

# Actor output Schema

## `events` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "mode": "weeklyFeed",
    "preview": true,
    "maxEvents": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("theleadforge/nppes-healthcare-organization-change-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 = {
    "mode": "weeklyFeed",
    "preview": True,
    "maxEvents": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("theleadforge/nppes-healthcare-organization-change-monitor").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 '{
  "mode": "weeklyFeed",
  "preview": true,
  "maxEvents": 25
}' |
apify call theleadforge/nppes-healthcare-organization-change-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,theleadforge/nppes-healthcare-organization-change-monitor"
        }
    }
}

```

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/QatcdyvYVIeUaYkZE/builds/T7E226v5VKUr7Vexo/openapi.json
