# NPI Registry Scraper — US Healthcare Providers (`rdx1s/nppes-npi-registry-scraper`) Actor

Extract US doctors, dentists, nurses & healthcare organizations from the official CMS NPPES NPI Registry. Search by name, specialty, state, city or NPI number — get NPI, credentials, license, specialty, address & phone. No API key. Ideal for healthcare lead generation.

- **URL**: https://apify.com/rdx1s/nppes-npi-registry-scraper.md
- **Developed by:** [RDX 1S](https://apify.com/rdx1s) (community)
- **Categories:** Developer tools, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 Providers

Turn the official **CMS NPPES NPI Registry** into clean, structured data — every
US doctor, dentist, nurse, therapist, pharmacy, hospital and clinic. Search by
name, specialty, location, or NPI number and export **35+ fields** per provider
to CSV, JSON, or Excel.

✅ **No API key. No rate limits. No login.** The NPI Registry is public record
published by CMS — this Actor just makes it usable.

### What you can do with it

- **Build a targeted provider list** — e.g. *every cardiologist in California*
  or *every pediatric dentist in New York*, with license #, specialty, phone,
  fax and address.
- **Verify a roster of NPIs** — paste a list of 10-digit NPI numbers and get
  back current status, license, specialty and contact details (credentialing,
  claims, provider-network checks).
- **Enrich CRM / lead data** — match providers and pull specialty, credential,
  phone, fax, mailing address, and Medicaid / NCPDP identifiers.
- **Feed an AI agent** — call it as a tool over **MCP**, or wire it into
  **n8n, Make and Zapier** to keep a provider database fresh automatically.

### Example input

```json
{
  "searchType": "individual",
  "specialties": ["Cardiology"],
  "state": "CA",
  "activeOnly": true,
  "maxResults": 500
}
````

### Sample output (one record, trimmed)

```json
{
  "npi": "1982227625",
  "fullName": "TARIQ AL-SALEH",
  "credential": "PHARMD",
  "statusText": "Active",
  "primarySpecialty": "Pharmacist, Ambulatory Care",
  "licenseNumber": "RPH12345",
  "licenseState": "CA",
  "city": "EL CAJON",
  "state": "CA",
  "phone": "619-923-5880",
  "fax": "619-923-5881",
  "medicaidId": "PHB213120",
  "nppesUrl": "https://npiregistry.cms.hhs.gov/provider-view/1982227625"
}
```

### What you get (35+ fields)

- **Identity:** NPI, full name (+ prefix/suffix), credential, sex, status.
- **Specialties:** primary specialty + license #/state, **plus every secondary
  taxonomy** with its own license and state.
- **Contact:** practice phone & **fax**, full location address, **mailing
  address**, and every additional practice location.
- **Identifiers:** Medicaid / NCPDP and other payer IDs — the join keys to
  claims and pharmacy data.
- **Trust:** human-readable status and a one-click link to the official NPI
  Registry profile. Optional health-IT `endpoints` for telehealth use-cases.

### Works with AI agents & automation

Every Apify Actor is exposed as a tool over the **Model Context Protocol
(MCP)**, so AI agents can call this scraper directly. It also runs from
**n8n, Make, Zapier**, the Apify API, or on a schedule.

### Good to know

- Source: public CMS NPPES NPI Registry — no PII beyond what CMS publishes.
- A single query segment returns up to ~1,200 rows; for bigger pulls, narrow by
  state / specialty / city (the Actor paginates within each segment). A `state`
  filter alone isn't enough — combine it with a name, organization, specialty,
  or city.

### Input reference

| Field              | Type    | Description                                                                 |
|--------------------|---------|-----------------------------------------------------------------------------|
| `searchType`       | string  | `individual` (NPI-1), `organization` (NPI-2), or `all`. Default `individual`. |
| `lastName`         | string  | Individual providers: last name. Trailing wildcard allowed, e.g. `sm*`.     |
| `firstName`        | string  | Individual providers: first name. Trailing wildcard allowed.                |
| `organizationName` | string  | Organizations: name, e.g. `HOSPITAL`. Trailing wildcard allowed.            |
| `specialties`      | array   | Filter by taxonomy/specialty, e.g. `Cardiology`, `Nurse Practitioner`. Each is searched separately and merged. |
| `state`            | string  | Two-letter state code (e.g. `NY`). Must be combined with another criterion. |
| `city`             | string  | City name, e.g. `Miami`.                                                    |
| `postalCode`       | string  | ZIP code. Trailing wildcard allowed, e.g. `900*`.                           |
| `npiNumbers`       | array   | Look up specific providers directly by 10-digit NPI number.                 |
| `maxResults`       | integer | Max number of records to collect (default 100).                            |
| `activeOnly`       | boolean | Keep only providers with an active NPI status.                              |
| `includeEndpoints` | boolean | Add the FHIR / health-IT endpoints array (default off).                     |
| `includeRaw`       | boolean | Add the full raw NPPES record to each result (default off).                 |

### Run locally

```bash
pip install -r requirements.txt
apify run
```

# Actor input Schema

## `searchType` (type: `string`):

Search individual providers (NPI-1), organizations (NPI-2), or both.

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

Individual providers: last name. Trailing wildcard allowed, e.g. 'sm\*'.

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

Individual providers: first name. Trailing wildcard allowed.

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

Organizations: name, e.g. 'HOSPITAL'. Trailing wildcard allowed.

## `specialties` (type: `array`):

Filter by provider taxonomy / specialty, e.g. 'Cardiology', 'Pediatric Dentistry', 'Nurse Practitioner'. Each is searched separately and results merged.

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

Two-letter state code, e.g. NY, CA, TX. Note: a state alone is not enough — combine it with a name, organization, specialty, or city.

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

City name, e.g. 'Miami'.

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

ZIP / postal code. Trailing wildcard allowed, e.g. '900\*'.

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

Look up specific providers directly by 10-digit NPI number (ideal for verifying a known list).

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

Maximum number of records to collect.

## `activeOnly` (type: `boolean`):

Keep only providers with an active NPI status.

## `includeEndpoints` (type: `boolean`):

Add the FHIR / Direct / health-IT endpoints array (for telehealth & interoperability use-cases).

## `includeRaw` (type: `boolean`):

Add the full raw NPPES record to each result.

## Actor input object example

```json
{
  "searchType": "individual",
  "lastName": "smith",
  "specialties": [],
  "npiNumbers": [],
  "maxResults": 100,
  "activeOnly": false,
  "includeEndpoints": false,
  "includeRaw": false
}
```

# Actor output Schema

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

Providers and organizations pulled from the NPPES NPI Registry.

# 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 = {
    "lastName": "smith"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rdx1s/nppes-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 = { "lastName": "smith" }

# Run the Actor and wait for it to finish
run = client.actor("rdx1s/nppes-npi-registry-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 '{
  "lastName": "smith"
}' |
apify call rdx1s/nppes-npi-registry-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rdx1s/nppes-npi-registry-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NPI Registry Scraper — US Healthcare Providers",
        "description": "Extract US doctors, dentists, nurses & healthcare organizations from the official CMS NPPES NPI Registry. Search by name, specialty, state, city or NPI number — get NPI, credentials, license, specialty, address & phone. No API key. Ideal for healthcare lead generation.",
        "version": "1.0",
        "x-build-id": "osgsibQFcFa7iL963"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rdx1s~nppes-npi-registry-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rdx1s-nppes-npi-registry-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/rdx1s~nppes-npi-registry-scraper/runs": {
            "post": {
                "operationId": "runs-sync-rdx1s-nppes-npi-registry-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/rdx1s~nppes-npi-registry-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-rdx1s-nppes-npi-registry-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": {
                    "searchType": {
                        "title": "Search type",
                        "enum": [
                            "individual",
                            "organization",
                            "all"
                        ],
                        "type": "string",
                        "description": "Search individual providers (NPI-1), organizations (NPI-2), or both.",
                        "default": "individual"
                    },
                    "lastName": {
                        "title": "Last name",
                        "type": "string",
                        "description": "Individual providers: last name. Trailing wildcard allowed, e.g. 'sm*'."
                    },
                    "firstName": {
                        "title": "First name",
                        "type": "string",
                        "description": "Individual providers: first name. Trailing wildcard allowed."
                    },
                    "organizationName": {
                        "title": "Organization name",
                        "type": "string",
                        "description": "Organizations: name, e.g. 'HOSPITAL'. Trailing wildcard allowed."
                    },
                    "specialties": {
                        "title": "Specialties",
                        "type": "array",
                        "description": "Filter by provider taxonomy / specialty, e.g. 'Cardiology', 'Pediatric Dentistry', 'Nurse Practitioner'. Each is searched separately and results merged.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "state": {
                        "title": "State",
                        "type": "string",
                        "description": "Two-letter state code, e.g. NY, CA, TX. Note: a state alone is not enough — combine it with a name, organization, specialty, or city."
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "City name, e.g. 'Miami'."
                    },
                    "postalCode": {
                        "title": "ZIP code",
                        "type": "string",
                        "description": "ZIP / postal code. Trailing wildcard allowed, e.g. '900*'."
                    },
                    "npiNumbers": {
                        "title": "NPI numbers",
                        "type": "array",
                        "description": "Look up specific providers directly by 10-digit NPI number (ideal for verifying a known list).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of records to collect.",
                        "default": 100
                    },
                    "activeOnly": {
                        "title": "Active only",
                        "type": "boolean",
                        "description": "Keep only providers with an active NPI status.",
                        "default": false
                    },
                    "includeEndpoints": {
                        "title": "Include health-IT endpoints",
                        "type": "boolean",
                        "description": "Add the FHIR / Direct / health-IT endpoints array (for telehealth & interoperability use-cases).",
                        "default": false
                    },
                    "includeRaw": {
                        "title": "Include raw data",
                        "type": "boolean",
                        "description": "Add the full raw NPPES record to each result.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
