# Organization NPI Roster Audit (`natstandridge/organization-npi-roster-audit`) Actor

Compare batches of US organization NPI roster entries with CMS NPPES. Returns npi, discrepantFields, comparisons and registryUrl for legal name, primary taxonomy or practice state/ZIP differences. $0.01 per delivered discrepancy. Matching entries are free.

- **URL**: https://apify.com/natstandridge/organization-npi-roster-audit.md
- **Developed by:** [Nathaniel Standridge](https://apify.com/natstandridge) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 organization roster discrepancies

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

## Organization NPI Roster Audit

Compare a batch of organization roster entries with CMS NPPES and pay **$0.01 per delivered discrepancy**. Each finding includes the original roster row, NPI, discrepant fields, expected and observed values, and a link to the CMS record. A network directory team can use the findings to review differences in legal business name, primary taxonomy or practice state and ZIP. The free run summary covers matching entries, unresolved lookups and duplicate inputs.

### Try a two-entry roster

```json
{
  "roster": [
    {"npi": "1821326570", "legalName": "MAYO CLINIC", "practiceState": "MN", "practiceZip5": "55905"},
    {"npi": "1881018208", "legalName": "Mayo Clinic", "primaryTaxonomyCode": "261QM1300X"}
  ],
  "maxFindings": 10,
  "seenFindingIds": []
}
```

When verified on November 19, 2026, CMS listed `MN 55905` for mailing and `MN 55902` for practice on the first NPI. The example prompted one review of the practice area. The second entry matched on both supplied fields. The same input always checks the current registry.

### How roster comparisons work

| Supplied field | Rule |
| --- | --- |
| `npi` | Each entry requires a ten-digit NPI with its check digit. Only active organization records (Type 2) can yield findings. |
| `legalName` | Compares the registered legal business name using Unicode normalization, case folding and whitespace normalization. Punctuation, legal suffixes and wording remain significant. Use the registered name when a practice also uses a trade name. |
| `primaryTaxonomyCode` | Compares the ten-character code marked primary in NPPES. A code listed only as secondary can produce a discrepancy. |
| `practiceState` and `practiceZip5` | Supply the pair together. The same US primary or additional practice location must have both values. A match only in the mailing record is labeled `mailing_only`. The check resolves to the five-digit ZIP area. |

Each run accepts 0–50 entries. Give each NPI at least one expected field. Exact equivalent checks collapse to their first position. Multiple sites for one NPI can be checked in one run, using one registry lookup. Use organization directory data in this input.

### Outputs and billing

The default dataset contains one row per distinct entry with a verified difference, even when several fields disagree. `rosterEntry` identifies the original one-based position. `comparisons` contains `field`, `expected`, `observed` and `status` for every requested check. For practice areas, `observed` lists all recorded US practice state/ZIP pairs. Review the linked CMS record before editing a directory.

The run's `OUTPUT` key lists coverage for every unique entry. It identifies individual NPIs, records absent from the registry response, inactive organizations, and fields that could not be compared. Source failures and missing source fields are free. A lookup that yields an individual NPI exposes only that outcome and the supplied number. With a zero spending allowance, lookup is skipped. If the remaining budget cannot cover the selected findings, the run leaves the entire remaining batch unwritten. An omitted or empty `roster` produces a complete summary with zero lookups and zero findings. The default `maxFindings` is 10.

For periodic review, save `deliveredFindingIds` from `OUTPUT` and pass the relevant prior IDs in `seenFindingIds` (up to 1,000). This suppresses the same finding while the comparison is unchanged. Entries beyond `maxFindings` are marked in the summary and can be picked up on the next run by passing the previously delivered IDs.

NPPES contains provider-reported directory data. CMS separates primary practice locations, additional practice locations and mailing records. For licensure, credentialing and network participation decisions, use the relevant independent sources. [CMS NPPES registry](https://npiregistry.cms.hhs.gov/) · [CMS NPPES data dissemination](https://download.cms.gov/nppes/NPI_Files.html)

### Run from an agent or workflow

**Apify MCP.** Add the Actor through `https://mcp.apify.com/?actors=natstandridge/organization-npi-roster-audit` using your Apify MCP authentication. Call the Actor tool with the JSON above. The dataset contains the review queue and the Actor output links include its coverage summary.

**n8n or Make.** Use an HTTP Request node in n8n or an HTTP “Make a request” module in Make (make.com). Set the method to POST, choose JSON, and paste the two-entry input above. Save your Apify credential in the module's authentication settings and send it as a Bearer header. This endpoint returns the dataset array.

```text
https://api.apify.com/v2/acts/natstandridge~organization-npi-roster-audit/run-sync-get-dataset-items
```

**Python SDK.** Install `apify-client` and provide your own token through the environment. The synchronous client waits for completion.

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("natstandridge/organization-npi-roster-audit").call(
    run_input={"roster": [
        {"npi": "1821326570", "practiceState": "MN", "practiceZip5": "55905"}
    ]}
)
for finding in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(finding["npi"], finding["discrepantFields"], finding["registryUrl"])
summary = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("OUTPUT")
print(summary["value"]["coverage"])
```

# Actor input Schema

## `roster` (type: `array`):

Up to 50 organization entries. Each object needs a 10-digit npi and at least one expected value: legalName, primaryTaxonomyCode, or both practiceState and practiceZip5. Supply the legal business name and a US practice area. Duplicate checks are collapsed. An omitted or empty roster returns a free summary.

## `maxFindings` (type: `integer`):

Maximum new discrepancy rows to select in roster order. Additional findings are reported as finding_limit in the free summary.

## `seenFindingIds` (type: `array`):

Skip prior observationId values when polling the same roster. Supply up to 1,000 lowercase SHA-256 values; an empty list includes all current discrepancies.

## Actor input object example

```json
{
  "roster": [
    {
      "npi": "1821326570",
      "legalName": "MAYO CLINIC",
      "practiceState": "MN",
      "practiceZip5": "55905"
    },
    {
      "npi": "1881018208",
      "legalName": "Mayo Clinic",
      "primaryTaxonomyCode": "261QM1300X"
    }
  ],
  "maxFindings": 10,
  "seenFindingIds": []
}
```

# Actor output Schema

## `findings` (type: `string`):

No description

## `summary` (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 = {
    "roster": [
        {
            "npi": "1821326570",
            "legalName": "MAYO CLINIC",
            "practiceState": "MN",
            "practiceZip5": "55905"
        },
        {
            "npi": "1881018208",
            "legalName": "Mayo Clinic",
            "primaryTaxonomyCode": "261QM1300X"
        }
    ],
    "maxFindings": 10,
    "seenFindingIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("natstandridge/organization-npi-roster-audit").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 = {
    "roster": [
        {
            "npi": "1821326570",
            "legalName": "MAYO CLINIC",
            "practiceState": "MN",
            "practiceZip5": "55905",
        },
        {
            "npi": "1881018208",
            "legalName": "Mayo Clinic",
            "primaryTaxonomyCode": "261QM1300X",
        },
    ],
    "maxFindings": 10,
    "seenFindingIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("natstandridge/organization-npi-roster-audit").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 '{
  "roster": [
    {
      "npi": "1821326570",
      "legalName": "MAYO CLINIC",
      "practiceState": "MN",
      "practiceZip5": "55905"
    },
    {
      "npi": "1881018208",
      "legalName": "Mayo Clinic",
      "primaryTaxonomyCode": "261QM1300X"
    }
  ],
  "maxFindings": 10,
  "seenFindingIds": []
}' |
apify call natstandridge/organization-npi-roster-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,natstandridge/organization-npi-roster-audit"
        }
    }
}
```

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/XExUOziUwNKYRx7p3/builds/qI3tymsuuvTB7ffOH/openapi.json
