# NPI Registry Scraper - Healthcare Provider Leads (`maydit/us-healthcare-providers-scraper`) Actor

Export US healthcare providers by specialty and location from the official NPPES NPI registry. Phone, fax, address per row. Smart geo match keeps every lead in your target area. CSV/JSON.

- **URL**: https://apify.com/maydit/us-healthcare-providers-scraper.md
- **Developed by:** [Brandt May](https://apify.com/maydit) (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 $5.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NPI Registry Scraper - US Healthcare Provider Leads

> Pull a clean, geo-targeted list of US doctors, dentists, clinics, and organizations straight from the official CMS NPPES NPI registry - phone, fax, and address on every row.

### What it does

This NPI registry scraper turns the official CMS NPPES NPI registry into a lead-gen-ready dataset. Query US healthcare providers by specialty, taxonomy code, name, city, state, or postal code, and export a healthcare provider database to CSV or JSON in minutes. Unlike a raw NPPES NPI registry API dump that returns dozens of credentialing fields, this actor uses **smart address matching**: any provider whose address does not match your target geography is dropped, so every exported row is a real provider inside your target area. Each record includes the provider's NPI number, name, credential, primary and full specialty list, phone, fax, and mailing address - the fields sales, recruiting, and market-research teams actually use.

### Who it's for

- **Healthcare sales & lead generation** teams building targeted provider call lists
- **Medical-device and pharma reps** prospecting by specialty and territory
- **Healthcare recruiters** sourcing physicians, NPs, and specialists by location
- **Market research & analytics** teams mapping provider density by state or ZIP
- **Health-tech and SaaS** companies enriching or building a provider directory

### What you get (output)

Every row is one provider (individual or organization) with these fields:

| Field | Description |
|---|---|
| `npi` | 10-digit National Provider Identifier |
| `providerType` | Individual (NPI-1) or Organization (NPI-2) |
| `name` | Provider or organization name |
| `credential` | Credential(s), e.g. MD, DO, DDS, NP |
| `gender` | Provider gender (individuals) |
| `primarySpecialty` | Primary specialty / taxonomy description |
| `taxonomyCode` | Primary NUCC taxonomy code |
| `allSpecialties` | Full list of the provider's specialties |
| `address` | Practice / mailing street address |
| `city` | City |
| `state` | State |
| `postalCode` | ZIP / postal code |
| `phone` | Practice phone number |
| `fax` | Practice fax number |
| `soleProprietor` | Sole-proprietor flag (individuals) |
| `enumerationDate` | Date the NPI was issued |
| `npiUrl` | Direct link to the provider's NPPES record |

### Input / how to query

Filter the NPI registry by any combination of:

- **Provider type** - individual providers (NPI-1) or organizations (NPI-2)
- **Specialty / taxonomy** - target by specialty description or NUCC taxonomy code
- **Name** - provider or organization name
- **City** - narrow to a single city
- **State** - pull an entire state's providers
- **Postal code** - drill down to a specific ZIP

Set your location filters and **smart address matching** removes any provider whose registered address falls outside the target geo, so you never have to clean out-of-area rows by hand. Results export as CSV, Excel, or JSON.

### Example use cases

- **Medical-device territory list** - export every orthopedic surgeon in a set of ZIP codes with phone and address, ready for the field team.
- **Pharma specialty targeting** - pull all cardiologists in a state, filtered by taxonomy code, for a sample-drop campaign.
- **Recruiter sourcing** - build a list of nurse practitioners in a metro area, complete with practice contact details.
- **Dental / clinic outreach** - generate a dentist and clinic lead list for a region, with fax and phone for direct outreach.
- **Market sizing** - count and map provider density by state or specialty to prioritize expansion.

### Recurring use & scheduling

The NPPES NPI registry is refreshed by CMS on a regular cycle as providers are added and updated. Use Apify **Schedules** to re-run this actor weekly or monthly and keep your provider database current. Point the run at the same dataset and dedupe on the `npi` field (the NPI is unique per provider) so repeated runs surface only new or changed records instead of duplicates - ideal for ongoing lead monitoring by specialty or territory.

### FAQ

#### How do I download a list of doctors by specialty and location?

Set the specialty (or taxonomy code) filter plus a city, state, or postal code, then run the actor. It returns every matching provider with contact details, ready to export to CSV, Excel, or JSON.

#### How do I export NPI registry data to CSV or Excel?

Every run produces a structured dataset you can download as CSV, Excel, or JSON directly from the run's Storage tab, or pull via the Apify API.

#### Where can I get healthcare provider phone numbers and addresses for sales?

This actor sources them from the official CMS NPPES NPI registry. Each row includes the provider's registered practice `phone`, `fax`, and mailing `address`, so your list is contact-ready.

#### Is there a free NPPES NPI registry API without a key?

The underlying CMS NPPES data is public and this actor reads it without any API key on your part. You run it on Apify and get a clean, filtered dataset instead of raw API pagination.

#### How do I build a physician mailing list by state?

Filter by state (optionally narrowing by specialty or ZIP), run the actor, and export the results. Each row carries the provider's name, credential, and full mailing address for direct mail.

#### How can I find providers by taxonomy code or specialty in a specific ZIP?

Combine the taxonomy/specialty filter with a postal code. Smart address matching drops any provider outside that ZIP, so the export contains only in-area providers.

#### How do I get NPI data for individual vs organization providers?

Use the provider-type filter: NPI-1 for individual providers, NPI-2 for organizations. The `providerType` field in the output labels each row so you can split or segment them.

#### Is scraping the CMS NPI registry legal?

The NPPES NPI registry is published by CMS as public data specifically for lookups and downloads. This actor reads that public information; as always, ensure your outreach complies with applicable marketing and privacy regulations.

#### How often is the NPPES NPI registry updated?

CMS updates NPPES regularly as providers enroll and revise their records. Schedule this actor to re-run on your preferred cadence to keep your dataset in sync.

### Data source & notes

- **Source:** Official CMS NPPES NPI Registry (National Plan and Provider Enumeration System) - public US government data, no API key required.
- **Coverage:** US individual providers (NPI-1) and organizations (NPI-2).
- **Fields:** Only the fields listed in the output table above are returned - this actor deliberately delivers the lead-relevant subset rather than every raw credentialing field.
- **Geo accuracy:** Smart address matching keeps results inside your specified location, so no manual cleanup of out-of-area rows.
- **Compliance:** Data is public, but you are responsible for using it in line with applicable marketing, calling, and privacy laws.

# Actor input Schema

## `providerType` (type: `string`):

Individual = clinicians (doctors, dentists, nurses, therapists). Organization = clinics, hospitals, group practices, pharmacies.
## `specialty` (type: `string`):

Provider specialty / taxonomy description, e.g. 'Cardiovascular Disease', 'Dentist', 'Physical Therapist', 'Dermatology', 'Pharmacy'. Leave empty for all.
## `state` (type: `string`):

Two-letter US state code, e.g. 'CA', 'TX', 'NY'. Strongly recommended to narrow results.
## `city` (type: `string`):

City name to narrow results, e.g. 'San Diego'.
## `postalCode` (type: `string`):

ZIP code (or ZIP prefix) to narrow results.
## `firstName` (type: `string`):

Filter individuals by first name (supports partial). Leave empty for all.
## `lastName` (type: `string`):

Filter individuals by last name (supports partial). Leave empty for all.
## `organizationName` (type: `string`):

Filter organizations by name (supports partial). Leave empty for all.
## `maxResults` (type: `integer`):

Upper bound on providers returned per run. Note: the NPI Registry API returns at most 1,200 results per unique query — narrow by specialty + state + city to get everyone in a niche.

## Actor input object example

```json
{
  "providerType": "individual",
  "specialty": "Physical Therapist",
  "state": "CA",
  "maxResults": 500
}
````

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("maydit/us-healthcare-providers-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("maydit/us-healthcare-providers-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call maydit/us-healthcare-providers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=maydit/us-healthcare-providers-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NPI Registry Scraper - Healthcare Provider Leads",
        "description": "Export US healthcare providers by specialty and location from the official NPPES NPI registry. Phone, fax, address per row. Smart geo match keeps every lead in your target area. CSV/JSON.",
        "version": "1.0",
        "x-build-id": "txBCliSAHoNTzcZ1O"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maydit~us-healthcare-providers-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maydit-us-healthcare-providers-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/maydit~us-healthcare-providers-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maydit-us-healthcare-providers-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/maydit~us-healthcare-providers-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maydit-us-healthcare-providers-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "providerType": {
                        "title": "Provider type",
                        "enum": [
                            "individual",
                            "organization"
                        ],
                        "type": "string",
                        "description": "Individual = clinicians (doctors, dentists, nurses, therapists). Organization = clinics, hospitals, group practices, pharmacies.",
                        "default": "individual"
                    },
                    "specialty": {
                        "title": "Specialty (taxonomy)",
                        "type": "string",
                        "description": "Provider specialty / taxonomy description, e.g. 'Cardiovascular Disease', 'Dentist', 'Physical Therapist', 'Dermatology', 'Pharmacy'. Leave empty for all."
                    },
                    "state": {
                        "title": "State",
                        "type": "string",
                        "description": "Two-letter US state code, e.g. 'CA', 'TX', 'NY'. Strongly recommended to narrow results."
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "City name to narrow results, e.g. 'San Diego'."
                    },
                    "postalCode": {
                        "title": "ZIP code",
                        "type": "string",
                        "description": "ZIP code (or ZIP prefix) to narrow results."
                    },
                    "firstName": {
                        "title": "First name",
                        "type": "string",
                        "description": "Filter individuals by first name (supports partial). Leave empty for all."
                    },
                    "lastName": {
                        "title": "Last name",
                        "type": "string",
                        "description": "Filter individuals by last name (supports partial). Leave empty for all."
                    },
                    "organizationName": {
                        "title": "Organization name",
                        "type": "string",
                        "description": "Filter organizations by name (supports partial). Leave empty for all."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Upper bound on providers returned per run. Note: the NPI Registry API returns at most 1,200 results per unique query — narrow by specialty + state + city to get everyone in a niche.",
                        "default": 500
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
