# NPI Registry Scraper — US Healthcare Provider Leads (`scrapersdelight/npi-registry-scraper`) Actor

Scrape US healthcare providers from the official NPPES NPI Registry: NPI number, name, organization, specialty (taxonomy), license, phone, fax, practice & mailing address. Filter by city, state, ZIP, specialty or name. No login.

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

## Pricing

$0.50 / 1,000 per provider returneds

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 structured US healthcare provider records straight from the official
**NPPES NPI Registry** (Centers for Medicare & Medicaid Services). Every
licensed provider in the country has an NPI record here — doctors, dentists,
nurses, therapists, chiropractors, clinics, hospitals, pharmacies and more.

### What you get (one row per provider, deduplicated by NPI)

- **NPI number**, provider type (Individual / Organization), status
- **Name** (first / middle / last / credential) or **organization name**
- For organizations: **authorized official** name, title and phone (the decision-maker)
- **Primary specialty** (taxonomy) + full specialty list, **license number & state**
- **Phone, fax**, practice-location address and mailing address (street, city, state, ZIP)
- Other/DBA names, enumeration date, last-updated date, and the public profile URL

### How to use it

Combine any of the filters:

- **City** + **State** — e.g. New York, NY
- **ZIP / postal code** — e.g. 10016 (trailing `*` wildcard supported, e.g. `100*`)
- **Specialty (taxonomy)** — e.g. Dentist, Pediatrics, Nurse Practitioner
- **Provider type** — Individual (NPI-1) or Organization (NPI-2)
- **First / last / organization name** (trailing `*` wildcard supported)
- **NPI number** — direct lookup of one provider (ignores all other filters)

**At least one filter other than State is required** — the CMS API rejects a
state-only search.

#### The 1,200-result cap (important)

The CMS API returns at most **1,200 providers per filter combination**. To pull
an entire state, slice it: run once per specialty, or loop ZIP prefixes
(`100*`, `101*`, …). Beyond 1,200 the API repeats its final page, so this actor
stops there automatically and never bills you for duplicates.

### Data source, cost & legality

- Data comes from the **free, public, unauthenticated** NPPES API
  (`npiregistry.cms.hhs.gov/api`). No login, no anti-bot; Apify datacenter proxy
  (default) or no proxy both work.
- NPI data is published by CMS as a public record. You are responsible for using
  it in compliance with the NPPES data-dissemination terms and any applicable
  law (e.g. TCPA/CAN-SPAM for outreach). Provider records may contain personal
  data — handling it lawfully is the user's responsibility.

# Actor input Schema

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

Provider city, e.g. New York. Matches practice and mailing address city.

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

US state / territory (2-letter). Must be combined with another filter — a state-only search is rejected by the CMS API.

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

5-digit ZIP (a trailing \* wildcard is supported by the API, e.g. 100\*).

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

Provider specialty / taxonomy description, e.g. Dentist, Chiropractor, Pediatrics, Nurse Practitioner, Physical Therapist. Best way to slice a city or state into a targeted lead list.

## `npiType` (type: `string`):

Individuals (NPI-1) vs organizations (NPI-2). Leave as Both for everything.

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

Individual provider first name (a trailing \* wildcard works, e.g. Jo\*).

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

Individual provider last name (a trailing \* wildcard works).

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

Organization / practice name for NPI-2 records (a trailing \* wildcard works).

## `npiNumber` (type: `string`):

Look up one exact 10-digit NPI. When set, all other filters are ignored.

## `maxItems` (type: `integer`):

Stop after this many providers. The CMS API returns at most 1,200 per filter combination; set 0 to pull all 1,200.

## `proxyConfiguration` (type: `object`):

The NPI Registry is a free official CMS API with no anti-bot — Apify datacenter proxy (default) or no proxy both work. Residential is not needed.

## `requestDelayMs` (type: `integer`):

Pacing between paginated requests.

## Actor input object example

```json
{
  "city": "New York",
  "state": "NY",
  "npiType": "",
  "maxItems": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "requestDelayMs": 200
}
```

# Actor output Schema

## `providers` (type: `string`):

NPI, name, organization, specialty, license, phone, fax, practice & mailing address and profile URL.

# 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 = {
    "city": "New York",
    "state": "NY",
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapersdelight/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 = {
    "city": "New York",
    "state": "NY",
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapersdelight/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 '{
  "city": "New York",
  "state": "NY",
  "maxItems": 200
}' |
apify call scrapersdelight/npi-registry-scraper --silent --output-dataset

```

## MCP server setup

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