# NPPES NPI Lookup (`eddmx/nppes-lookup-pilot`) Actor

Look up up to five NPI numbers in the official CMS/NPPES Registry. Export normalized registry fields and explicit lookup statuses, with source links and retrieval timestamps.

- **URL**: https://apify.com/eddmx/nppes-lookup-pilot.md
- **Developed by:** [M P](https://apify.com/eddmx) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## NPPES NPI Lookup

Look up one to five US National Provider Identifier (NPI) numbers in the official
CMS/NPPES Registry and export normalized registry records. Supply NPI numbers you
already have; this Actor does not search for providers by name or location.

Use the output for small registry-reference checks or to add public registry
fields to your own workflow. The source data is public, not exclusive. This tool
is not a credentialing service or a substitute for checking relevant licensing
boards and other authoritative records.

### Input

```json
{"npis":["1073731121"]}
```

`npis` is required: an array of one to five strings. Send strings, not JSON
numbers. Extra input fields, an empty list, more than five entries, non-string
entries, and strings longer than 32 characters reject the entire input.
A short string with an invalid NPI format or check digit instead produces an
`invalid_input` result without querying CMS.

Duplicate inputs produce separate output rows. They reuse the first lookup's
response within the run, including a not-found/error response. Duplicate rows
have `duplicateInput: true` and are separately billable.

### Output

Results appear in the run's default dataset in input order. Each completed lookup
is written immediately, before work starts on the next entry. You can export the
dataset using Apify Console. The supplied output example is a previously captured
successful lookup; its timestamp and source fields are not promises of current data.

Each row has `requestedNpi`, `status`, `error`, `record`, `source`, and `disclaimer`.
For successful results, `record` contains the NPI, enumeration type, individual
name components, credential text, registry status and dates, addresses, and
taxonomy codes/descriptions/primary flags. Optional missing source fields are
`null`; values are not inferred. For organization NPIs, enumeration type and
available addresses/taxonomies are returned; organization names are not mapped.

| Status | Meaning |
| --- | --- |
| `ok` | CMS returned one matching record with the required structure. |
| `not_found` | CMS returned a valid response with zero matches. |
| `invalid_input` | That string is not a valid NPI; no source request was sent. |
| `error` | The lookup failed; inspect the machine-readable `error` field. |

Possible error codes are `invalid_npi`, `http_error`, `api_error`, `timeout`,
`malformed_response`, `response_too_large`, and `network_error`. An error does not
establish that a provider or NPI is invalid. Source metadata includes the exact
request URL, API version, retrieval time and HTTP status when available. Invalid
NPI rows have `source: null`; failed connections/timeouts can have no HTTP status.

### Pricing and spending limits

$0.00005 Actor start at the current/default 512 MB memory configuration,
plus $0.001 per output row. Output rows include successful, not-found,
invalid-input, and error outcomes. Duplicate rows are also charged.

One start and one row cost $0.00105; one start and five rows cost $0.00505
at these configured event prices. The start event is memory-dependent: allocations
above 1 GB incur more start events. Consult the Console for the applicable price.

Apify automatically charges the start/default-dataset events; the Actor does not
issue custom charging calls. Apify enforces the run's maximum charge. For a PPE
run with the supported flat-priced events, this Actor reads the run's pricing and
existing event counts and stops before another lookup if its row would exceed
the remaining allowance. Set a sufficient maximum charge for all requested rows.
If it stops for spending/runtime limits, unprocessed inputs produce no invented
placeholder rows. Previously committed rows remain available. An input rejected
before dataset writes produces no result-row charges; a start charge may still
apply if the Actor already started.

### Reliability and limitations

- At most five inputs; sequential anonymous HTTPS requests to the official NPPES
  API only. No retries, redirects, user-supplied destinations, or paid proxies.
- Eight-second timeout per source request and 128 KiB source-response ceiling.
  Five distinct slow lookups have at most 40 seconds of source timeout.
- Storage/run-metadata calls have two-second deadlines. Run with at least the
  default 60-second timeout. Slow storage or platform problems can still fail the
  run; committed rows survive, but an interrupted write can have an uncertain outcome.
- A local runtime margin stops new lookups near the deadline. Lower user-selected
  timeouts, charge limits, cancellation, migration or infrastructure failures may
  result in fewer rows. Do not assume exit status alone proves a successful lookup.
- No automatic restarts or retries are requested by the deployment. Do not
  resurrect/restart a run to repair errors: this version does not implement
  cross-restart deduplication. A new run can produce and charge new rows.
- Not a bulk NPI database. No bulk files, persistent history, monitoring, alerts,
  browser automation, additional enrichment, or independent credential validation.
- Data can be incomplete, stale or incorrect; source availability is not guaranteed.

**NPI registration does not establish professional licensure, credentialing, or
suitability for medical care.** Registry credential text is reported as supplied,
not verified. This Actor offers no medical advice or suitability ranking.

### Source attribution and access

Source: Centers for Medicare & Medicaid Services (CMS), National Plan and Provider
Enumeration System (NPPES), NPI Registry API v2.1.

- [Official API documentation](https://npiregistry.cms.hhs.gov/api-page)
- [CMS public data dissemination](https://www.cms.gov/medicare/regulations-guidance/administrative-simplification/data-dissemination)
- Exact query: `https://npiregistry.cms.hhs.gov/api/?version=2.1&number=<NPI>&limit=1`

Only publicly disseminated registry data is queried. Review current CMS notices
and your own permitted uses. Public access is not a blanket permission for any
subsequent use. This product is not affiliated with or endorsed by CMS.

### Privacy and security

Do not submit patient information, passwords, or other secrets. Input consists
only of public NPI identifiers. Each valid NPI is sent to the official CMS/NPPES
endpoint; input and output are stored in your Apify run's default storage and
follow your account's access/retention settings. Public registry addresses can
contain personal information; handle exported records appropriately.

The Actor requires LIMITED_PERMISSIONS. It uses Apify's scoped runtime token only
for its own run metadata/input/dataset. That token is never sent to CMS. The
trusted deployment credential is not embedded in source, images, or inputs.
Errors do not include raw HTTP response bodies or credentials.

For support, include the run ID and a redacted error code through the Actor's
Apify support/issue interface; do not post credentials or sensitive datasets.

# Actor input Schema

## `npis` (type: `array`):

One to five NPI strings. Invalid identifiers are reported without a request.

## Actor input object example

```json
{
  "npis": [
    "1073731121"
  ]
}
```

# Actor output Schema

## `results` (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 = {
    "npis": [
        "1073731121"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eddmx/nppes-lookup-pilot").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 = { "npis": ["1073731121"] }

# Run the Actor and wait for it to finish
run = client.actor("eddmx/nppes-lookup-pilot").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 '{
  "npis": [
    "1073731121"
  ]
}' |
apify call eddmx/nppes-lookup-pilot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eddmx/nppes-lookup-pilot"
        }
    }
}
```

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/UNEFs2Zf31S80IENO/builds/ZzxELNXV07w8Tng8E/openapi.json
