# NPI Registry Scraper - US Healthcare Provider Data (`evpp/npi-registry`) Actor

Extract US healthcare provider records from the NPI Registry as clean JSON: NPI, names, organizations, taxonomies, practice addresses, phones, and enumeration metadata.

- **URL**: https://apify.com/evpp/npi-registry.md
- **Developed by:** [Evp Labs](https://apify.com/evpp) (community)
- **Categories:** Other, Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.58 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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 Scraper - US Healthcare Provider Data

Search the official **U.S. National Provider Identifier (NPI) registry** - over **8 million** doctors, dentists, nurses, therapists, pharmacies, hospitals, and group practices - and get clean, structured JSON: provider names, specialties, state licenses, practice addresses, phones, and registry links.

Under the hood the Actor calls the **CMS NPPES public API** (`npiregistry.cms.hhs.gov/api/?version=2.1`), the same endpoint that powers the official [NPI Registry search](https://npiregistry.cms.hhs.gov/). **No API key, no browser, no proxy** - a run of 1,000 providers takes seconds. Think of it as a hosted **NPI lookup API** with bulk export and a GUI.

### Why scrape the NPI registry?

- **Healthcare lead generation** - build targeted lists of dentists in California, chiropractors in Austin, or pharmacies by ZIP, complete with phone numbers and addresses for outreach.
- **Medical device & pharma sales** - segment providers by taxonomy specialty and geography, then export to CSV/Excel for your CRM.
- **Credentialing & provider data verification** - look up NPIs, enumeration dates, license numbers, and last-updated timestamps straight from the authoritative federal source.
- **Provider search API for AI agents** - MCP/agent-ready endpoint: call the Actor programmatically and let agents answer "find pediatricians in Denver" with real registry data.
- **Practice-management vendors** - enrich customer onboarding with verified NPI numbers, taxonomies, and addresses.

### What data does it extract?

| Field | Type | Description |
|---|---|---|
| `npi` | string | National Provider Identifier (10-digit) |
| `entityType` | string | `NPI-1` (individual) or `NPI-2` (organization) |
| `firstName` | string | Provider first name (individuals) |
| `lastName` | string | Provider last name (individuals) |
| `organizationName` | string | Organization/group name (NPI-2) |
| `credential` | string | Credential on file (e.g. `DDS`, `MD`) |
| `primaryTaxonomy` | string | Primary specialty description (NUCC taxonomy) |
| `taxonomyCode` | string | Primary taxonomy code (e.g. `1223G0001X`) |
| `license` | string | State license number on the primary taxonomy |
| `licenseState` | string | State that issued the license |
| `address1` | string | Practice location street (mailing address used as fallback) |
| `city` | string | Practice city |
| `state` | string | Practice state (2-letter) |
| `postalCode` | string | ZIP code (9-digit when available) |
| `phone` | string | Telephone number on file |
| `lastUpdated` | string | Record last-updated date (YYYY-MM-DD) |
| `enumerationDate` | string | NPI issue date (YYYY-MM-DD) |
| `registryUrl` | string | Link to the record on npiregistry.cms.hhs.gov |

Records are normalized for readability (ALL-CAPS registry values are title-cased, credentials/LLC/acronyms preserved) and empty fields are omitted.

### How to use it

1. Open the Actor and click **Start** - the defaults scrape 15 dentists in California in a few seconds.
2. Add filters: `lastName` (supports `*` wildcard), `organizationName`, `taxonomy` (e.g. `pharmacy`, `family medicine`), `city`, `state`, `postalCode`, or `enumerationType`.
3. Raise **maxItems** to collect more - up to 1,200 per query (see limits below).
4. Download as JSON, CSV, Excel, or pull via the Apify API / integrations.

### Quick start input

Target source: `npiregistry.cms.hhs.gov`. Paste this JSON into the Actor input tab for a fast first run, or use it as the body of the Apify API run call:

```json
{
    "firstName": "",
    "lastName": "",
    "organizationName": "",
    "taxonomy": "dentist",
    "city": "",
    "state": "CA",
    "postalCode": "",
    "enumerationType": "",
    "maxItems": 10
}
```

The default input is intentionally small. Raise `maxItems` only after validating the first healthcare provider records.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `firstName` | string | *(empty)* | Provider first name, NPI-1 only. Min 2 chars, trailing `*` wildcard supported |
| `lastName` | string | *(empty)* | Provider last name, NPI-1 only. Trailing `*` wildcard supported |
| `organizationName` | string | *(empty)* | Organization name, NPI-2 only. Trailing `*` wildcard supported |
| `taxonomy` | string | `dentist` | Specialty description (e.g. `chiropractor`) or taxonomy code (e.g. `1223G0001X`) |
| `city` | string | *(empty)* | City of the provider's address |
| `state` | string | `CA` | 2-letter state code |
| `postalCode` | string | *(empty)* | 5- or 9-digit ZIP code |
| `enumerationType` | string | `Any` | `NPI-1` individuals, `NPI-2` organizations, or both |
| `maxItems` | integer | `15` | Max records to return (up to 1,200 per query) |
| `proxyConfiguration` | object | disabled | Not needed - the public API is called directly |

Tips:

- **Wildcards:** name fields accept a trailing `*` for starts-with matching (`Smi*`, `Kaiser*`).
- **Entity rules:** `firstName`/`lastName` only match individuals (NPI-1); `organizationName` only matches organizations (NPI-2).
- **Exact NPI lookup:** to fetch a single known NPI, use the API parameter `number` - or simply open `https://npiregistry.cms.hhs.gov/provider-view/<npi>`.

### Output

One flat JSON item is produced per healthcare provider. Download the dataset as JSON, CSV, Excel, or HTML, or consume it through the Apify API.

#### Real sample output (latest live dataset)

```json
{
    "npi": "1760813802",
    "entityType": "NPI-2",
    "organizationName": "101 Dental Group",
    "primaryTaxonomy": "Dentist, General Practice",
    "taxonomyCode": "1223G0001X",
    "license": "54634",
    "licenseState": "CA",
    "address1": "7259 Owensmouth Ave",
    "city": "Canoga Park",
    "state": "CA",
    "postalCode": "913031530",
    "phone": "818-999-9900",
    "lastUpdated": "2013-11-27",
    "enumerationDate": "2013-11-27",
    "registryUrl": "https://npiregistry.cms.hhs.gov/provider-view/1760813802"
}
```

### API limits worth knowing

- The CMS API returns at most **200 records per page** and caps `skip` pagination at roughly **1,200 records per query**.
- To pull large segments (e.g. every dentist in the US), shard by `state`, then by `city` or `postalCode`, or iterate last-name prefixes - the Actor handles pagination and retries inside each query.
- Queries with no filters, or very broad wildcard-only filters, are rejected by the API.
- Name fields need at least 2 characters.

The Actor retries with exponential backoff on HTTP 429/5xx and pauses ~400 ms between calls.

### Use with AI agents (MCP), n8n, Make, and Python

- **AI agents / MCP:** add `https://mcp.apify.com/?tools=evpp/npi-registry` to your MCP client, then ask the agent to scrape the NPI Registry data or export the latest dataset.
- **n8n / Make / Zapier:** run Actor `evpp/npi-registry` with the quick-start input, then map dataset items into Google Sheets, a CRM, a webhook, or a monitoring workflow.
- **Python:** install the client with `pip install apify-client` and run:

```python
import json
from apify_client import ApifyClient

client = ApifyClient()
run_input = json.loads('''{"firstName":"","lastName":"","organizationName":"","taxonomy":"dentist","city":"","state":"CA","postalCode":"","enumerationType":"","maxItems":10}''')
run = client.actor("evpp/npi-registry").call(run_input=run_input)
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(items[0])
```

The same dataset is available as JSON, CSV, Excel, XML, RSS, and HTML through the Apify API.

### How much does it cost?

This Actor uses **pay-per-event** pricing: **$2.25 per 1,000 results** (one `apify-default-dataset-item` event per provider pushed). You are charged only for data delivered, not compute. A 1,200-record max pull costs about **$3.00**.

### FAQ

**Where does the data come from?** From NPPES, the official CMS database that assigns NPIs to every U.S. healthcare provider. It is public federal data, refreshed monthly.

**Is this legal?** The NPI registry is public government data explicitly published for lookup and verification. Our Actors are ethical and do not extract private data - only what providers reported to CMS for public disclosure. Results may contain personal data (provider names, work phones); personal data is protected by GDPR and other regulations, so only use it with a legitimate purpose. If you're unsure, consult your lawyers.

**Why does my query return fewer than `maxItems`?** Either the API matched fewer records for your filters, or the ~1,200-record pagination ceiling was hit - narrow the geography or specialty and run again.

**Can I get emails?** The NPI registry does not publish email addresses. Items include phone numbers and addresses only.

Questions or issues? Use the **Issues** tab, or call the Actor programmatically via the **API** tab.

# Actor input Schema

## `firstName` (type: `string`):

Provider's first name (NPI-1 individuals only). Minimum 2 characters. Supports a trailing \* wildcard for starts-with matching (e.g. "Jenn\*").

## `lastName` (type: `string`):

Provider's last name (NPI-1 individuals only). Minimum 2 characters. Supports a trailing \* wildcard (e.g. "Smi\*").

## `organizationName` (type: `string`):

Organization name (NPI-2 entities: hospitals, clinics, group practices). Supports a trailing \* wildcard (e.g. "Kaiser\*").

## `taxonomy` (type: `string`):

Provider specialty description matched against the NUCC taxonomy (e.g. dentist, chiropractor, family medicine, pharmacy). Also accepts a taxonomy code such as 1223G0001X.

## `city` (type: `string`):

City of the provider's practice or mailing address.

## `state` (type: `string`):

Two-letter U.S. state or territory code for the provider's address (e.g. CA, NY, TX).

## `postalCode` (type: `string`):

ZIP code of the provider's address. 5-digit or 9-digit ZIP.

## `enumerationType` (type: `string`):

Restrict results to individuals (NPI-1) or organizations (NPI-2). Leave as Any to return both.

## `maxItems` (type: `integer`):

Maximum number of provider records to push to the dataset. The Actor stops as soon as this many items are collected. Note: the NPI API caps pagination at ~1,200 records per query - split larger pulls by state, city, or last name.

## `proxyConfiguration` (type: `object`):

Proxy settings for outbound requests. Not needed for this Actor: it calls the CMS public JSON API directly. Keep disabled.

## Actor input object example

```json
{
  "firstName": "John",
  "lastName": "Smith",
  "organizationName": "Kaiser",
  "taxonomy": "dentist",
  "city": "Los Angeles",
  "state": "CA",
  "postalCode": "90210",
  "enumerationType": "",
  "maxItems": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped NPI provider records

# 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 = {
    "firstName": "",
    "lastName": "",
    "organizationName": "",
    "taxonomy": "dentist",
    "city": "",
    "state": "CA",
    "postalCode": "",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("evpp/npi-registry").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 = {
    "firstName": "",
    "lastName": "",
    "organizationName": "",
    "taxonomy": "dentist",
    "city": "",
    "state": "CA",
    "postalCode": "",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("evpp/npi-registry").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 '{
  "firstName": "",
  "lastName": "",
  "organizationName": "",
  "taxonomy": "dentist",
  "city": "",
  "state": "CA",
  "postalCode": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call evpp/npi-registry --silent --output-dataset

```

## MCP server setup

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

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/Vg23MqYzh0FaTVRDJ/builds/bYtHReJ6l3Lqn9kv0/openapi.json
