# NPI Number Lookup & Registry: Healthcare Provider Data (`data-done-right/npi-registry-scraper`) Actor

Look up US healthcare providers in the official CMS NPPES NPI Registry: bulk NPI lookup or search by specialty, name, organization, city, state and ZIP. Get taxonomy, license, practice address, phone, identifiers and endpoints. Big searches are split by ZIP code to pass the 1,200-result API cap.

- **URL**: https://apify.com/data-done-right/npi-registry-scraper.md
- **Developed by:** [Data Done Right](https://apify.com/data-done-right) (community)
- **Categories:** Lead generation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.70 / 1,000 providers

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 & Scraper: US Healthcare Providers

**NPI Registry Lookup & Scraper** gets US healthcare provider data straight from the **official CMS NPPES NPI Registry API** (`npiregistry.cms.hhs.gov`). Look up a list of NPI numbers in bulk, or search for providers by specialty (taxonomy), name, organization name, city, state or ZIP code, and export clean rows to JSON, CSV or Excel. It is built for healthcare sales and marketing teams, credentialing and revenue-cycle staff, data teams and researchers. No API key, no login, no HTML scraping.

The registry API returns at most **1,200 providers per query**. This Actor splits big searches into ZIP-code prefixes automatically, so you can export, for example, every counselor in Vermont (about 2,600 providers, 148 API calls, a few seconds) in one run.

### What data can you extract

One row per provider (individual **NPI-1** or organization **NPI-2**), with only the fields CMS publishes:

- **Identity**: `npi`, `enumerationType`, `entityType`, `name`, first, middle and last name, prefix, suffix, `credential`, `gender` (as published), sole proprietor flag, organization name, subpart and parent organization
- **Authorized official** (organizations): name, title, credential and phone, as published
- **Status and dates**: `status`, `enumerationDate`, `lastUpdated`, `certificationDate`
- **Primary taxonomy**: `primaryTaxonomyCode`, `primaryTaxonomyDescription`, `primaryTaxonomyLicense`, `primaryTaxonomyState`
- **All taxonomies**: code, description, license number, license state, primary flag, group
- **Practice location address** with phone and fax, **mailing address** with phone and fax, and **other practice locations**
- **Other names** (former names, doing-business-as), **other identifiers** (e.g. Medicaid IDs), **endpoints** (Direct messaging and FHIR/CONNECT URLs) where present
- `registryUrl` (the provider's page on the NPI Registry) and `searchQuery` (which search found it)

### How to look up NPI numbers in bulk

Paste NPI numbers into **NPI numbers (bulk lookup)**, one per line. Each number is checked first (10 digits plus the official check digit), so typos never cost you a request. NPIs that are not in the registry (deactivated or never issued) are listed in the `NOTES` record of the run's key-value store.

```json
{
  "npiNumbers": ["1912063058", "1003000126"]
}
```

In the Console, clear the example search fields (Dentist / VT / Montpelier) and raise **Max providers** to at least the number of NPIs, or the run stops at the example limit of 10.

### How to search the NPI Registry by specialty and location

Fill in any of **Specialty (taxonomy description)**, **States**, **Cities**, **ZIP codes**, **Last name**, **First name**, **Organization name** and **Provider type**. Every combination of specialty x state x city x ZIP code is searched, and a provider found by two searches is returned once.

```json
{
  "taxonomyDescriptions": ["Dentist"],
  "states": ["VT"],
  "cities": ["Montpelier"],
  "enumerationType": "BOTH",
  "maxResults": 10
}
```

Every dentist and orthodontist organization in two states, primary specialty only:

```json
{
  "taxonomyDescriptions": ["Dentist", "Orthodont"],
  "states": ["NH", "ME"],
  "enumerationType": "NPI-2",
  "primaryTaxonomyOnly": true,
  "maxResults": 20000
}
```

How the registry search behaves (worth knowing):

- **A state alone is not enough.** The registry rejects state-only or provider-type-only searches. Add a specialty, name, city or ZIP code.
- **Specialty matching is by words, not codes.** "Dentist" also matches "Dentist, General Practice", and secondary specialties match too. Use **Match primary specialty only** or the **Taxonomy code filter** (e.g. `1223G0001X`) to tighten it.
- **City, state and ZIP match any address** (practice location or mailing) unless you pick an address in **Address used for city / state / ZIP**. That is why a Montpelier search can return a provider whose main practice is in a nearby town.
- Wildcards: `smi*`, `mayo*` or `100*` work after at least 2 characters.

### How to export all providers past the 1,200 limit

Leave **Go past the 1,200-result limit (split by ZIP code)** on (the default). When a search fills the API's 1,200-result window, it is re-run per ZIP prefix (`00*` to `99*`, then 3, 4 and 5 digits, then ZIP+4) until every part fits. Each part costs one or a few fast API calls; empty parts return instantly. **Max providers** and **Max API requests** cap the run.

### How to monitor new and updated NPI records

Turn on **Only new or updated since my last run** and schedule the Actor (for example weekly). The first run returns everything with `changeType: "baseline"`. Later runs return only providers whose NPI record was added (`new`) or changed (`updated`, by the registry's last-updated time) since they were last delivered. If a run stops at **Max providers**, the next run continues with the providers not yet delivered instead of repeating them (still labelled `baseline` until one full pass is done). The memory is kept per search in a named key-value store, `npi-registry-state`. You can also use **Updated since** (a date) to filter by `lastUpdated` in a single run.

### Output example

```json
{
  "npi": "1912063058",
  "enumerationType": "NPI-1",
  "entityType": "Individual",
  "name": "SALLY ANN BISHKO",
  "firstName": "SALLY", "middleName": "ANN", "lastName": "BISHKO", "namePrefix": "Dr.", "nameSuffix": null,
  "credential": "D.D.S.",
  "gender": "F",
  "soleProprietor": "YES",
  "status": "Active",
  "enumerationDate": "2006-12-30",
  "lastUpdated": "2007-07-09",
  "primaryTaxonomyCode": "1223G0001X",
  "primaryTaxonomyDescription": "Dentist, General Practice",
  "primaryTaxonomyLicense": "847",
  "primaryTaxonomyState": "VT",
  "taxonomies": [{"code": "1223G0001X", "description": "Dentist, General Practice", "license": "847", "state": "VT", "primary": true, "group": null}],
  "practiceAddress1": "535 STONE CUTTERS WAY", "practiceAddress2": null, "practiceCity": "MONTPELIER", "practiceState": "VT",
  "practicePostalCode": "05602-3795", "practiceCountryCode": "US", "practicePhone": "802-223-2244", "practiceFax": "802-223-1283",
  "mailingAddress1": "535 STONE CUTTERS WAY", "mailingCity": "MONTPELIER", "mailingState": "VT", "mailingPostalCode": "05602-3795",
  "otherPracticeLocations": [],
  "otherNames": [],
  "identifiers": [{"code": "05", "description": "MEDICAID", "identifier": "0002483", "issuer": null, "state": "VT"}],
  "endpoints": [],
  "registryUrl": "https://npiregistry.cms.hhs.gov/provider-view/1912063058",
  "searchQuery": "taxonomy_description=Dentist; state=VT; city=Montpelier"
}
```

Organizations also carry `organizationName`, `organizationalSubpart`, `parentOrganizationName` and `authorizedOfficial*` fields. Empty values are `null`, so CSV columns stay stable.

### Use cases

- **Healthcare lead lists**: every dentist, pharmacy, physical therapist or clinic in a state, city or ZIP area, with practice phone and address.
- **Provider data validation and credentialing**: check a list of NPIs for status, primary taxonomy and license number.
- **Directory and CRM enrichment**: add specialty, credential and practice address to your provider records.
- **Market research**: count providers by specialty and region; track newly enumerated providers with the monitoring mode.

### Data source and terms

All data comes from the public NPPES NPI Registry published by the Centers for Medicare & Medicaid Services (CMS). The Actor returns only fields CMS publishes and adds no enrichment, no guessing and no emails. NPPES data is public by law, but some of it is personal data about individual providers: use it lawfully (for example, follow telemarketing and anti-spam rules for outreach). The registry is not affiliated with this Actor.

### Limits (honest)

- The registry API does not return deactivated NPIs (in our tests every record was active); a deactivated NPI is reported as "not found" in `NOTES`.
- Splitting works on US ZIP codes. Searches limited to foreign addresses (country code other than US) return the first 1,200 matches only. Records with no US ZIP at all are not reachable through splitting.
- When more than 1,200 matches fall in a single 5-digit ZIP, the Actor takes the first 1,200 and then splits by ZIP+4. Providers listed with only a 5-digit ZIP beyond those 1,200 can be missed; this is noted in `NOTES`.
- The API has no date filter, so **Updated since** and **Only new** still read the whole search (you only pay for delivered rows).
- CMS updates the registry continuously; results reflect the moment of the run.

### How much does it cost

Pay per result: one `provider` event per provider row delivered, about **$1.70 per 1,000 providers**, plus the standard Apify start fee. Invalid NPIs, providers filtered out and duplicates are free. Set **Max providers** to cap the cost; if your spending limit is reached, the run stops cleanly and says so.

### FAQ

#### Is there a free NPI Registry API?

Yes. CMS runs the NPPES NPI Registry API, which is free and needs no key. It returns 200 records per call and at most 1,200 per query. This Actor handles the paging, the 1,200 cap, validation and flattening for you.

#### How do I look up an NPI number?

Paste one or many 10-digit NPIs into **NPI numbers (bulk lookup)**. You get the provider's name, specialty, license, address and phone, or a note if the NPI is not in the registry.

#### Can I download the whole NPI registry?

CMS publishes the full NPPES file as a monthly bulk download (several GB). Use that for all 8M+ records. This Actor is for targeted exports by specialty, location or NPI list, refreshed live from the API.

#### Can I search NPI by taxonomy code?

The registry API searches by taxonomy description (words) only. Search by words, then use the **Taxonomy code filter** to keep exact codes such as `207Q00000X` (Family Medicine).

#### Is it legal to scrape the NPI Registry?

The Actor uses the official public API, not page scraping, and NPPES data is published by CMS for public use. You remain responsible for how you use it, especially for marketing to individuals.

#### Does the output include emails?

No. CMS does not publish provider emails, and the Actor does not guess them. You get the practice and mailing phone and fax numbers as published, plus Direct messaging endpoints where providers registered them.

### Related tools

- **Companies House API: UK Company, Officer & PSC Data**: the same kind of official-register export for UK companies.
- **Google Sheets Import & Export: Apify Data, No Login**: send your provider list to a Google Sheet.
- **Send Data to Slack, Discord, Email, Notion & Postgres**: push new providers from the monitoring mode to your team or database.

# Actor input Schema

## `npiNumbers` (type: `array`):

10-digit NPI numbers to look up, one per line. Invalid numbers (wrong length or check digit) and NPIs not in the registry are listed in the NOTES record. You can combine this with a search below.

## `taxonomyDescriptions` (type: `array`):

Provider specialty as words, e.g. Dentist, Family Medicine, Physical Therapist, Pharmacy. The registry matches part of the description and also matches secondary specialties. Taxonomy codes are not accepted here (use the taxonomy code filter below).

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

2-letter state codes, e.g. CA, TX, NY. A state alone is not enough for the registry: combine it with a specialty, name, city or ZIP code. Every combination of specialty x state x city x ZIP code is searched.

## `cities` (type: `array`):

City names, e.g. Austin. Leave empty for a whole state (big searches are split automatically by ZIP code).

## `postalCodes` (type: `array`):

5-digit ZIP codes (also match ZIP+4), or a prefix with a wildcard such as 100\* (at least 2 digits before the \*).

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

Provider last name. A trailing \* works after 2 letters, e.g. smi\*.

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

Provider first name. A trailing \* works after 2 letters.

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

Organization (NPI-2) name, e.g. Mayo Clinic. A trailing \* works after 2 letters.

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

Individuals (NPI-1, e.g. physicians, dentists, nurses) or organizations (NPI-2, e.g. clinics, hospitals, pharmacies).

## `addressPurpose` (type: `string`):

Which address the location filters apply to. Any = practice location or mailing address (registry default).

## `countryCode` (type: `string`):

2-letter country code for providers with a foreign address, e.g. DE. Leave empty for the US.

## `maxResults` (type: `integer`):

Stop after this many providers in total. Also caps cost.

## `deepSearch` (type: `boolean`):

The registry returns at most 1,200 providers per query. When a search hits that limit, it is split automatically into ZIP-code prefixes (2 to 9 digits) until every part fits. Turn off to get only the first 1,200 per search.

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

Keep only providers with one of these taxonomy codes, e.g. 1223G0001X. Applied after the search, so you still need a search above.

## `primaryTaxonomyOnly` (type: `boolean`):

The registry also matches secondary specialties. Turn on to keep only providers whose PRIMARY taxonomy matches your specialty words (or taxonomy codes).

## `updatedSince` (type: `string`):

YYYY-MM-DD. Keep only records last updated on or after this date.

## `onlyNew` (type: `boolean`):

Remembers each search and NPI list. The first run returns everything (changeType baseline); later runs return only providers added or updated since then (changeType new / updated). A run stopped by Max providers continues where it stopped next time. Great for scheduled monitoring.

## `maxApiRequests` (type: `integer`):

Safety cap on search calls to the NPI Registry API per run (each returns up to 200 providers). Bulk NPI lookups (one call per NPI) come on top.

## Actor input object example

```json
{
  "taxonomyDescriptions": [
    "Dentist"
  ],
  "states": [
    "VT"
  ],
  "cities": [
    "Montpelier"
  ],
  "enumerationType": "BOTH",
  "addressPurpose": "ANY",
  "maxResults": 10,
  "deepSearch": true,
  "primaryTaxonomyOnly": false,
  "onlyNew": false,
  "maxApiRequests": 5000
}
```

# Actor output Schema

## `results` (type: `string`):

All result items of this run (the default dataset), as JSON, CSV, Excel and more.

## `records` (type: `string`):

Key-value store records: the run summary, notes on any problems, and any files.

# 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 = {
    "taxonomyDescriptions": [
        "Dentist"
    ],
    "states": [
        "VT"
    ],
    "cities": [
        "Montpelier"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-done-right/npi-registry-scraper").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 = {
    "taxonomyDescriptions": ["Dentist"],
    "states": ["VT"],
    "cities": ["Montpelier"],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("data-done-right/npi-registry-scraper").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 '{
  "taxonomyDescriptions": [
    "Dentist"
  ],
  "states": [
    "VT"
  ],
  "cities": [
    "Montpelier"
  ],
  "maxResults": 10
}' |
apify call data-done-right/npi-registry-scraper --silent --output-dataset

```

## MCP server setup

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

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/fi6ZeUUWUH1AYmkF9/builds/1o0z0fG1aDPy9Pu4Y/openapi.json
