# NPI Registry Scraper - US Doctors, Clinics & Providers (`antishock/npi-registry-healthcare-providers-scraper`) Actor

Extract US healthcare providers from the official CMS NPI Registry: doctors, dentists, nurses, clinics, hospitals and pharmacies with phone numbers, practice addresses, specialties, credentials and license data. Filter by state, city, specialty or name. No API key required.

- **URL**: https://apify.com/antishock/npi-registry-healthcare-providers-scraper.md
- **Developed by:** [Ryan Zinburg](https://apify.com/antishock) (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 $1.00 / 1,000 result exporteds

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 - US Doctors, Clinics & Healthcare Providers

Extract verified healthcare provider data from the official **NPPES NPI Registry** run by the U.S. Centers for Medicare & Medicaid Services (CMS). Search by state, city, specialty, organization or provider name and export doctors, dentists, nurses, hospitals, clinics, pharmacies and labs with phone numbers, practice addresses, license details and NPI numbers.

Public government source, no API key needed, no rate-limit surprises.

### What you get per provider

| Field | Example |
|---|---|
| `npi` | 1234567890 |
| `name` | Jane A Miller |
| `providerType` | Individual or Organization |
| `primarySpecialty` | Family Medicine |
| `allSpecialties` | \["Family Medicine", "Internal Medicine"] |
| `phone` / `fax` | 619-533-4100 |
| `addressLine1`, `city`, `state`, `postalCode` | practice location |
| `licenseNumber`, `licenseState` | state license |
| `credential` | MD, DO, RN, DDS |
| `authorizedOfficial` | contact person for organizations |
| `profileUrl` | link to the public NPI record |

### Search filters

- **state** - two-letter code, e.g. `CA`, `NY`, `TX`
- **city** - e.g. `San Diego`
- **specialty** - taxonomy description, e.g. `Dentist`, `Physical Therapist`, `Pharmacy`
- **organizationName** - e.g. `Mercy Hospital`
- **firstName** / **lastName** - for individual practitioners
- **postalCode** - ZIP code
- **providerType** - individuals (NPI-1), organizations (NPI-2) or both
- **maxResults** - up to 1200 per run

Combine filters freely. At least one filter is required.

### Example input

```json
{
  "state": "CA",
  "city": "San Diego",
  "specialty": "Dentist",
  "providerType": "NPI-1",
  "maxResults": 200
}
```

### Use cases

- **Medical sales and medtech outreach** - build targeted lists of clinics and practices by specialty and region
- **Healthcare recruiting** - find practitioners by license state, credential and specialty
- **Provider network management** - verify NPI numbers, credentials and practice addresses for payer networks
- **Market research** - map provider density per specialty across states and cities
- **Data enrichment** - resolve an NPI number to a full provider profile
- **Compliance and credentialing** - cross-check license state and taxonomy before contracting

### Why this source

The NPI Registry is the authoritative U.S. provider directory. Every healthcare provider that bills insurance must be listed, and CMS updates it continuously. Unlike scraped directory sites, the data is public by law, structured and free of anti-bot blocking.

### Notes and limits

- The API caps a single search at **1200 results**. Narrow by city, ZIP or specialty to go deeper.
- Deactivated providers are included; check the `status` field.
- Phone numbers come from the practice location address, falling back to the authorized official for organizations.
- Results are deduplicated by NPI within a run.

# Actor input Schema

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

Two-letter US state code, e.g. CA, NY, TX.

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

City of the practice location, e.g. San Diego.

## `specialty` (type: `string`):

Taxonomy description, e.g. Dentist, Family Medicine, Physical Therapist, Pharmacy.

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

Name of a hospital, clinic, lab or pharmacy. Wildcards with \* are supported.

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

First name of an individual practitioner.

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

Last name of an individual practitioner.

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

US ZIP code of the practice location.

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

Individuals (NPI-1), organizations (NPI-2) or both.

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

How many providers to save. The registry caps a single search at 1200.

## Actor input object example

```json
{
  "state": "CA",
  "city": "San Diego",
  "providerType": "NPI-1",
  "maxResults": 100
}
```

# Actor output Schema

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

Scraped records in the default dataset.

# 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 = {
    "state": "CA",
    "city": "San Diego",
    "providerType": "NPI-1",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("antishock/npi-registry-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 = {
    "state": "CA",
    "city": "San Diego",
    "providerType": "NPI-1",
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("antishock/npi-registry-healthcare-providers-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 '{
  "state": "CA",
  "city": "San Diego",
  "providerType": "NPI-1",
  "maxResults": 100
}' |
apify call antishock/npi-registry-healthcare-providers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,antishock/npi-registry-healthcare-providers-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/U9120EcaaIctQaSBq/builds/GXOTdRly7Q1BC4VVA/openapi.json
