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

Export US healthcare providers from the official NPI Registry (NPPES) by specialty, state, city or ZIP code, beyond the 1,200-result API limit. Clean, deduplicated CSV/JSON.

- **URL**: https://apify.com/neobuster/npi-registry-scraper.md
- **Developed by:** [Neobuster Studio](https://apify.com/neobuster) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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 Scraper — export US healthcare providers by specialty and location

Export doctors, dentists, therapists, clinics, pharmacies and every other US healthcare provider from the official **NPI Registry (NPPES)** to CSV, Excel or JSON. Search by specialty, state, city or ZIP code, and get **all** matching providers, beyond the registry's 1,200-result limit. **$2 per 1,000 providers.**

### What you get

- **Healthcare marketing & sales lists:** every cardiologist in California, every dental clinic in a ZIP area, with practice address, phone and fax.
- **Recruiting:** find nurse practitioners, physical therapists or pharmacists in the cities you hire in.
- **Market research & data enrichment:** count providers by specialty and region, or check NPI numbers, license numbers and registration dates.
- **More complete than the official search:** the NPI Registry API returns at most 1,200 results per search. This Actor detects when a search is capped and automatically splits it by ZIP code area and provider type, then removes duplicates.
- **Cleaner than the raw API:** one flat row per provider, practice address separated from mailing address, and an option to match the **primary** specialty only (the raw registry also returns providers who list the specialty as a minor secondary one).

### Sample output

| npi | name | credential | primaryTaxonomy | practiceCity | practiceState | practicePostalCode | practicePhone |
|---|---|---|---|---|---|---|---|
| 1891199329 | 2020HEALTH | | Internal Medicine, Cardiovascular Disease | LOS ANGELES | CA | 90048-6101 | 310-556-2020 |

<details>
<summary>Full JSON record</summary>

```json
{
  "npi": "1891199329",
  "entityType": "organization",
  "name": "2020HEALTH",
  "firstName": null,
  "lastName": null,
  "organizationName": "2020HEALTH",
  "credential": null,
  "primaryTaxonomy": "Internal Medicine, Cardiovascular Disease",
  "primaryTaxonomyCode": "207RC0000X",
  "licenseNumber": null,
  "licenseState": null,
  "allTaxonomies": "Internal Medicine, Cardiovascular Disease",
  "practiceAddress": "8635 W 3RD ST",
  "practiceAddress2": "SUITE 1050W",
  "practiceCity": "LOS ANGELES",
  "practiceState": "CA",
  "practicePostalCode": "90048-6101",
  "practiceCountry": "US",
  "practicePhone": "310-556-2020",
  "practiceFax": "310-788-8477",
  "mailingAddress": "PO BOX 516, BEVERLY HILLS, CA 90213-0516",
  "status": "active",
  "enumerationDate": "2014-10-13",
  "lastUpdated": "2014-10-13",
  "registryUrl": "https://npiregistry.cms.hhs.gov/provider-view/1891199329"
}
```

</details>

### How to use

1. Enter a **specialty** (e.g. `Cardiovascular Disease`, `Dentist`, `Physical Therapist`) and/or **cities** or **ZIP codes**. Add **states** to narrow the area.
2. Set **Maximum results** (use `0` for everything that matches).
3. Click **Start**, then download the results as CSV, Excel or JSON from the **Storage** tab.

You need at least one filter besides state (specialty, city, ZIP code or name): the NPI Registry does not allow searching a whole state without one.

### Pricing

**$2 per 1,000 providers** (pay per event: `provider`). You pay only for unique providers delivered to your dataset.
Example: all ~5,900 cardiologists (Cardiovascular Disease) practicing in California and Texas ≈ **$11.80**.

### Fair billing

- You are charged only for **unique, valid providers delivered** to your dataset. Duplicates and records that fail validation are never charged.
- Results are delivered and charged in small batches while the run progresses. If a run stops early (an error, an abort, or your maximum cost per run), you keep, and pay only for, the results already delivered.
- If the Actor detects that the data source has changed (more than 5% of records fail validation), it stops **before** delivering more and the run fails, so you are not charged for broken data.
- If Apify restarts or you resurrect a run, providers already delivered in that run are not charged again.
- Your **maximum cost per run** setting is always respected.
- If you think you were charged incorrectly, open an issue in the **Issues** tab with the run ID. We confirm within 48 hours, state the cause and list the affected runs, so you can use it as evidence when asking Apify support for compensation.

### Use with AI agents (MCP)

This Actor works as a tool for AI agents (Claude, Cursor, Copilot…) through the Apify MCP server at `https://mcp.apify.com`. Every input field has a description, and the default input returns 20 providers in a few seconds, so agents can try it quickly and cheaply.

### Data & compliance

- **Source:** the official NPPES NPI Registry API of the US Centers for Medicare & Medicaid Services (CMS), `https://npiregistry.cms.hhs.gov`. CMS publishes this data openly under the Freedom of Information Act (FOIA).
- The Actor collects **publicly available data only**. It never logs in, never creates accounts and never bypasses paywalls.
- It does **not** collect sensitive personal data, and it does **not** perform email enrichment. It does not export the names of organizations' authorized officials.
- **You are responsible** for having a legal basis when you store or process the data and for using it in line with applicable law. **Do not use this data for unsolicited marketing (spam)** or in violation of the CAN-SPAM Act, the TCPA or state privacy laws.
- Removal requests: open an issue or contact us via the developer profile. We respond within 24 hours.

### FAQ & limitations

- **Why do I get fewer results with "Match primary specialty only" on?** The registry matches a specialty anywhere in a provider's list. With the option on (default), you get only providers whose main specialty matches. Turn it off to get the raw registry behaviour.
- **Why is a provider outside my ZIP/state missing?** By default the area filters apply to the **practice** address. The registry also matches mailing addresses; turn off "Filter on practice address only" to include those.
- **Very large searches:** if a single 5-digit ZIP code still has more than 1,200 matches for one provider type, the registry caps it. The run's status message tells you when this happens; add a specialty or name filter to get everything.
- **What if nothing matches?** The run still succeeds, with a message that says so (and which filter removed the results, if any). You are not charged for any result.
- **Why does a name search return someone with a different last name?** The NPI Registry also matches **former names** (for example a maiden name) recorded for the provider; the result shows the current name.
- **Can I combine a person's name with an organization name?** No. The NPI Registry searches individuals (NPI-1) and organizations (NPI-2) separately, so the Actor asks you to use one or the other.
- **How fresh is the data?** Each run queries the live NPI Registry, which CMS updates daily.

### Changelog

See [CHANGELOG.md](CHANGELOG.md).

# Changelog

This Actor's version history is a separate document: https://apify.com/neobuster/npi-registry-scraper/changelog.md

# Actor input Schema

## `taxonomyDescription` (type: `string`):

Provider specialty as written in the NUCC taxonomy, e.g. "Cardiovascular Disease", "Family Medicine", "Dentist", "Physical Therapist", "Pharmacy". Matching is case-insensitive and partial ("cardio" matches every cardiology specialty).

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

2-letter US state codes, e.g. CA, NY, TX. Leave empty for all states. Each state is searched separately.

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

City names, e.g. "Los Angeles". A trailing \* matches prefixes ("San\*" matches San Diego, San Jose…; at least 2 letters before \*). Combine with states to avoid same-name cities in other states.

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

5-digit ZIP codes (e.g. 90210), or a 2–4 digit prefix to cover an area (e.g. 902 = all ZIP codes starting with 902).

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

Individuals (NPI-1: doctors, nurses, therapists…), organizations (NPI-2: clinics, hospitals, pharmacies…), or both.

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

Individual provider's first name (searches individuals only, NPI-1). A trailing \* matches prefixes (at least 2 letters before \*). Cannot be combined with organizationName.

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

Individual provider's last name (searches individuals only, NPI-1). A trailing \* matches prefixes (at least 2 letters before \*). Cannot be combined with organizationName.

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

Organization name, e.g. "Kaiser\*" (searches organizations only, NPI-2). A trailing \* matches prefixes (at least 2 letters before \*). Cannot be combined with firstName/lastName.

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

If on, keep only providers whose PRIMARY specialty matches. If off, also include providers who list it as a secondary specialty (the raw NPI Registry behaviour; e.g. "Cardiology" would also return pharmacists with a cardiology sub-specialty).

## `practiceLocationOnly` (type: `boolean`):

If on, state / city / ZIP filters apply to the practice location. If off, a provider also matches when only their mailing address is in the area (the raw NPI Registry behaviour).

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

Stop after this many providers. Use 0 for no limit. You pay only for providers delivered.

## Actor input object example

```json
{
  "taxonomyDescription": "Cardiovascular Disease",
  "states": [
    "CA"
  ],
  "enumerationType": "ALL",
  "primaryTaxonomyOnly": true,
  "practiceLocationOnly": true,
  "maxResults": 20
}
```

# Actor output Schema

## `providers` (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 = {
    "taxonomyDescription": "Cardiovascular Disease",
    "states": [
        "CA"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("neobuster/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 = {
    "taxonomyDescription": "Cardiovascular Disease",
    "states": ["CA"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("neobuster/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 '{
  "taxonomyDescription": "Cardiovascular Disease",
  "states": [
    "CA"
  ],
  "maxResults": 20
}' |
apify call neobuster/npi-registry-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neobuster/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/P87wlqP9iLABeJs4q/builds/FAq7C7riN5bl7BLQf/openapi.json
