# NPI Registry Lookup: NPPES Providers by NPI, Name, Specialty (`thoob/npi-registry-lookup`) Actor

Looks up US healthcare providers in the official CMS NPPES registry by NPI number, name, organization, specialty, city, state or ZIP. Returns flat rows with taxonomy, license and addresses. No key needed. Billed only per provider record delivered.

- **URL**: https://apify.com/thoob/npi-registry-lookup.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 provider record delivereds

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

## NPI Registry Lookup

### What it does

You give it NPI numbers, search filters, or both. It calls the CMS NPPES NPI Registry API v2.1 and returns one clean row per provider. Every row includes `sourceUrl` (the provider page on the NPI Registry) and `retrievedAt` (when the data was fetched).

Invalid NPIs (wrong length or a failed check digit) are dropped with a warning before any request is made. Duplicate providers are written once.

### Input examples

Look up one NPI:

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

Search by taxonomy and state:

```json
{
  "searches": [
    { "taxonomy_description": "Behavior Technician", "state": "HI" }
  ]
}
```

Search filters: `number`, `first_name`, `last_name`, `organization_name`, `taxonomy_description`, `city`, `state`, `postal_code`, plus optional `enumeration_type` (`NPI-1` for individuals, `NPI-2` for organizations) and `limit` (1 to 200 per page). Each search needs at least one filter. `maxRecords` caps total rows (default 1000, 0 means no cap).

### Output fields

- `npi`, `type` (individual or organization), `name`, `credential`, `gender`, `status`
- `enumerationDate`, `lastUpdated`
- `primaryTaxonomyCode`, `primaryTaxonomy`, `licenseNumber`, `licenseState`
- `practiceAddress`, `practiceCity`, `practiceState`, `practicePostalCode`, `practicePhone`
- `mailingAddress`
- `taxonomies` (list of `code`, `desc`, `primary`)
- `sourceUrl`, `retrievedAt`, `confidence`, `jurisdiction` (US)

Values are copied from the API response. A field the registry does not have is `null`.

### Pricing

You are charged once per provider row delivered to the dataset. You are not charged for an NPI that is not found, for a duplicate provider, or for a request that ends in an API error.

### Limits

The NPPES API stops paging at skip 1000. With 200 results per page, that means at most 1,200 rows per search. If a search hits this ceiling, the run logs that more results may exist. To get more, split it into narrower searches, for example by city or postal code.

### Source and terms

Data comes from the public CMS NPPES NPI Registry API. No login, API key, or proxy is needed. The data is public information published by CMS. Check the CMS NPPES site for its current terms of use.

# Actor input Schema

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

10 digit NPI numbers to look up, one per line. Numbers that fail the NPI check digit are dropped with a warning.

## `searches` (type: `array`):

Search objects. Allowed keys: number, enumeration_type (NPI-1 individual, NPI-2 organization), first_name, last_name, organization_name, taxonomy_description, city, state, postal_code, limit (page size, 1 to 200, default 200). One search returns at most 1200 results because the API answers a skip above 1000 with the same page again.

## `maxRecords` (type: `integer`):

Cap on delivered, billed rows. 0 means no cap. The platform spend cap is honored regardless.

## Actor input object example

```json
{
  "npis": [
    "1245319599"
  ],
  "searches": [
    {
      "taxonomy_description": "Behavior Technician",
      "state": "HI",
      "limit": 20
    }
  ],
  "maxRecords": 1000
}
```

# Actor output Schema

## `providers` (type: `string`):

One row per provider record.

# 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": [
        "1245319599"
    ],
    "searches": [
        {
            "taxonomy_description": "Behavior Technician",
            "state": "HI",
            "limit": 20
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/npi-registry-lookup").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": ["1245319599"],
    "searches": [{
            "taxonomy_description": "Behavior Technician",
            "state": "HI",
            "limit": 20,
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("thoob/npi-registry-lookup").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": [
    "1245319599"
  ],
  "searches": [
    {
      "taxonomy_description": "Behavior Technician",
      "state": "HI",
      "limit": 20
    }
  ]
}' |
apify call thoob/npi-registry-lookup --silent --output-dataset

```

## MCP server setup

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

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/D6FR69JnFmJg4l5IM/builds/PQwo2Bwv4vvjFihVi/openapi.json
