# NPI Doctor Directory Scraper — Specialty Phone & Address (`intelscrape/npi-doctor-directory-scraper`) Actor

Pull US doctors and healthcare providers from the official CMS NPPES NPI Registry API. Filter by specialty, state, city, ZIP, name, or NPI. Export NPI, credentials, specialty, phone, practice address, and registry URL. Demo mode supported.

- **URL**: https://apify.com/intelscrape/npi-doctor-directory-scraper.md
- **Developed by:** [IntelScrape](https://apify.com/intelscrape) (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 $2.00 / 1,000 provider listings

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?

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 Doctor Directory Scraper

![Actor Banner](https://api.apify.com/v2/key-value-stores/PyvJzfQg02FD3RYhd/records/npi-doctor-directory-scraper-banner.png)

NPI Doctor Directory Scraper pulls US doctors, nurses, clinics, and other healthcare providers from the official CMS NPPES NPI Registry API. Filter by specialty, state, city, ZIP, name, organization, or exact NPI numbers and export contact-ready directory rows.

### Features

- Official public CMS NPPES API (`npiregistry.cms.hhs.gov`) — no brittle HTML scraping
- NPI-first doctor directory fields: NPI, name, credential, specialty, phone, practice address, license, registry URL
- Specialty + geography filters and batch NPI lookup
- Demo mode fixtures for smoke tests without live calls
- Pay-per-event: actor start + dataset item via `pushData`

### Input

| Field | Description |
| --- | --- |
| `taxonomyDescription` | Specialty (e.g. Family Medicine, Cardiology) |
| `state` | 2-letter state code |
| `city` / `postalCode` | Optional location filters |
| `firstName` / `lastName` / `organizationName` | Optional name filters |
| `npiNumbers` | Batch 10-digit NPI lookup |
| `enumerationType` | NPI-1, NPI-2, or both |
| `maxItems` | Cap results (default 50) |
| `demoMode` | Use bundled fixtures |

### Output

Each dataset row includes `npi`, `name`, `credential`, `specialty`, `phone`, `address`, `city`, `state`, `postalCode`, `url`, and related fields.

### SoftCTA mesh (1.0.7)

Each provider row includes a `softCta` object with next-step links to IntelScrape money bots relevant to NPI leads — Phone Number Validator, Skip Trace PRO, TruePeopleSearch, Maps Email, Website Leads, Contact Info, Email Finder, BBB Directory, Business License, B2B Leads, Trustpilot, Yelp, UCC Lien, and MCA Leads (links only; no extra PPE). Marker: `SOFTCTA_DEEPEN_NPI_1_0_7`.

### Data source

Centers for Medicare & Medicaid Services (CMS) National Plan and Provider Enumeration System — public government registry. No patient data.

### Keywords

NPI doctor directory scraper, NPPES healthcare provider leads, CMS NPI registry export, US physician contact list, doctor specialty directory USA

# Actor input Schema

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

Provider specialty text matched against CMS taxonomy description (e.g. Family Medicine, Cardiology, Dentist).

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

2-letter US state code (e.g. CA, TX, NY).

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

Optional city filter.

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

Optional ZIP or ZIP prefix.

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

Optional individual provider first name.

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

Optional individual provider last name.

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

Optional organization / clinic / hospital name search.

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

Optional list of 10-digit NPI numbers for direct lookup. Overrides search filters when set.

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

NPI-1 individuals, NPI-2 organizations, or both.

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

Maximum provider rows to push (CMS search cap is ~1200 per query).

## `demoMode` (type: `boolean`):

Load bundled fixture NPI doctor listings (no live CMS call). Still produces dataset items for PPE smoke tests.

## Actor input object example

```json
{
  "taxonomyDescription": "Family Medicine",
  "state": "CA",
  "enumerationType": "",
  "maxItems": 50,
  "demoMode": false
}
```

# Actor output Schema

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

Provider rows pushed to 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 = {
    "taxonomyDescription": "Family Medicine",
    "state": "CA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("intelscrape/npi-doctor-directory-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": "Family Medicine",
    "state": "CA",
}

# Run the Actor and wait for it to finish
run = client.actor("intelscrape/npi-doctor-directory-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": "Family Medicine",
  "state": "CA"
}' |
apify call intelscrape/npi-doctor-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,intelscrape/npi-doctor-directory-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/xZ9SkPZmplTrELBJ3/builds/Tg6qgVaDCp1y7v2oZ/openapi.json
