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

Scrape US doctors, nurses, clinics from the official NPPES NPI Registry. Filter by specialty, state, city. Export NPI, addresses, phone, credentials. The only NPI scraper on Apify.

- **URL**: https://apify.com/fervent\_bus/npi-registry-scraper.md
- **Developed by:** [Archit Khurana](https://apify.com/fervent_bus) (community)
- **Categories:** Lead generation, AI, 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Scrape **every US healthcare provider** from the official NPPES NPI Registry — the government's national database of 7+ million doctors, nurses, clinics, dentists, pharmacies, and other providers. Free public data, no login, no restrictions.

### What This Scraper Does

Extracts structured healthcare provider records from the [NPPES NPI Registry](https://npiregistry.cms.hhs.gov/) public API. Filter by specialty, state, city, name, or organization type.

### Who This Is For

- **Healthcare marketers** building targeted physician outreach lists
- **Medical device sales reps** prospecting for new accounts
- **Healthcare SaaS companies** building lead lists by specialty and geography
- **AI agents and MCP clients** querying provider data programmatically
- **Researchers** analyzing provider distribution by specialty and location
- **Recruiters** sourcing healthcare professionals
- **Insurers and billing companies** verifying provider credentials

### What Data You Get

Every result includes:

| Field | Description |
|-------|-------------|
| `npi` | 10-digit National Provider Identifier |
| `enumerationType` | NPI-1 (individual) or NPI-2 (organization) |
| `firstName` / `lastName` / `credential` | Provider name and credentials (MD, DO, NP, PA) |
| `organizationName` | Clinic or hospital name |
| `locationAddress1` / `locationCity` / `locationState` / `locationZip` | Practice location |
| `locationPhone` / `locationFax` | Contact numbers |
| `primaryTaxonomyDesc` | Specialty (e.g. Internal Medicine, Cardiology) |
| `primaryTaxonomyLicense` | State license number |
| `allTaxonomies` | All specialties for the provider |
| `status` | Active (A) or Deactivated (D) |
| `enumerationDate` | Date NPI was assigned |
| `lastUpdated` | Date record was last updated |

### Search Queries This Ranks For

- "NPI registry scraper"
- "NPPES healthcare provider data extraction"
- "doctor directory scraper USA"
- "US physician contact list scraper"
- "NPI lookup bulk export"
- "CMS provider data scraper Apify"
- "healthcare lead generation USA government database"
- "nurse practitioner directory scraper"
- "medical clinic database USA"
- "NPI number bulk download scraper"

### Example Input

```json
{
  "taxonomyDescription": "Cardiology",
  "state": "TX",
  "enumerationType": "NPI-1",
  "maxResults": 100
}
```

### Example Output

```json
[
  {
    "npi": "1043567890",
    "enumerationType": "NPI-1",
    "isIndividual": true,
    "status": "A",
    "firstName": "JAMES",
    "lastName": "WILSON",
    "credential": "MD",
    "gender": "M",
    "organizationName": null,
    "locationAddress1": "1200 MAIN ST",
    "locationCity": "HOUSTON",
    "locationState": "TX",
    "locationZip": "770021234",
    "locationPhone": "713-555-0100",
    "locationFax": "713-555-0101",
    "primaryTaxonomyCode": "207RC0000X",
    "primaryTaxonomyDesc": "Cardiology",
    "primaryTaxonomyLicense": "TX12345",
    "allTaxonomies": [
      {"code": "207RC0000X", "desc": "Cardiology", "primary": true, "state": "TX", "license": "TX12345"}
    ],
    "enumerationDate": "2010-03-15",
    "lastUpdated": "2023-11-01",
    "otherNames": [],
    "scrapedAt": "2025-08-16T12:00:00+00:00"
  }
]
```

### Tags

`healthcare`, `lead-generation`, `usa`, `government-data`, `directory`, `b2b`, `ai-agent`, `mcp`

### Notes

- Data is sourced from the official US government NPPES NPI Registry API
- All data is 100% public domain — published by CMS (Centers for Medicare & Medicaid Services)
- The only NPI Registry scraper available on Apify
- Works with Claude, ChatGPT, and MCP agents for AI-powered healthcare lead generation
- No API key or authentication required for the underlying data source
- Rate-limited responsibly: 3 retries per request, polite pagination

## Auto-build enabled

# Actor input Schema

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

Filter by provider specialty or taxonomy description. Examples: 'Internal Medicine', 'Cardiology', 'Dentist', 'Nurse Practitioner', 'Pharmacy'. Leave empty to search by name or location only.

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

US state abbreviation to filter by. Examples: CA, NY, TX, FL. Leave empty for all states.

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

City name to filter by. Optional.

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

Filter by ZIP code. Optional.

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

Filter by provider first name. Optional.

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

Filter by provider last name. Optional.

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

Filter by organization name. Optional.

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

NPI-1 for individual providers, NPI-2 for organizations/clinics. Leave empty for both.

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

Maximum number of provider records to scrape. Default is 50. Use 200+ for bulk exports.

## Actor input object example

```json
{
  "taxonomyDescription": "Internal Medicine",
  "state": "CA",
  "maxResults": 10
}
```

# Actor output Schema

## `npiRegistryUrl` (type: `string`):

Link to the provider's public NPI Registry profile

# 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": "Internal Medicine",
    "state": "CA",
    "city": "",
    "postalCode": "",
    "firstName": "",
    "lastName": "",
    "organizationName": "",
    "enumerationType": "",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("fervent_bus/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 = {
    "taxonomyDescription": "Internal Medicine",
    "state": "CA",
    "city": "",
    "postalCode": "",
    "firstName": "",
    "lastName": "",
    "organizationName": "",
    "enumerationType": "",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("fervent_bus/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 '{
  "taxonomyDescription": "Internal Medicine",
  "state": "CA",
  "city": "",
  "postalCode": "",
  "firstName": "",
  "lastName": "",
  "organizationName": "",
  "enumerationType": "",
  "maxResults": 10
}' |
apify call fervent_bus/npi-registry-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fervent_bus/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/PvRLJnYySQOQHgYoF/builds/8rcKz3icRngZv6GCM/openapi.json
