# NPI Registry Scraper - Healthcare Organizations (`dabooti/npi-registry-scraper`) Actor

Export US healthcare organizations from the official CMS NPI Registry (NPPES): NPI number, name, DBA names, taxonomy and specialty, practice address, phone, fax and status. Search by type, state, city, ZIP, name or NPI. No login or key.

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

## Pricing

from $2.00 / 1,000 organizations

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 - Healthcare Organizations

Export US healthcare organizations from the official CMS NPI Registry (NPPES) to JSON, CSV or Excel. Search pharmacies, hospitals, clinics, labs, home health agencies, imaging centers and every other organization type by taxonomy, state, city, ZIP code or name, or look up NPI numbers directly. Each record has the NPI, legal and doing-business-as names, taxonomy codes and descriptions, practice address, phone, fax, mailing address, other identifiers and dates.

It reads the public NPI Registry API run by CMS. No login, API key or proxy needed.

This Actor returns **organizations only (NPI type 2)**. Individual practitioners (NPI type 1) and the names and phone numbers of authorized officials are left out on purpose.

### What you can use it for

- **Healthcare B2B lists**: build lists of pharmacies, labs, DME suppliers or surgery centers in a region, with their practice phone and address.
- **Market sizing**: count organizations of a given type by state, city or ZIP code.
- **Data enrichment and validation**: check that an NPI is active and matches the organization name and address in your CRM or claims data.
- **Network and referral mapping**: find every hospital or home health agency in your service area.
- **Health-tech and FHIR projects**: seed Organization resources with NPI, taxonomy and address data.

### What data you get

| Field | Description |
|---|---|
| `npi` | 10-digit National Provider Identifier |
| `organizationName`, `otherNames` | Legal name and doing-business-as or former names |
| `primaryTaxonomyCode`, `primaryTaxonomy` | Main provider type, for example "Pharmacy, Community/Retail Pharmacy" |
| `taxonomies` | All taxonomy codes with description, primary flag, state and license number |
| `address`, `city`, `state`, `postalCode`, `country` | Practice location |
| `phone`, `fax` | Practice location phone and fax |
| `mailingAddress` | Mailing address |
| `otherIdentifiers` | Other IDs such as Medicaid numbers |
| `isSubpart`, `status` | Organizational subpart flag and status (active) |
| `enumerationDate`, `lastUpdated` | When the NPI was issued and last updated |
| `registryUrl` | Link to the record on npiregistry.cms.hhs.gov |
| `search`, `scrapedAt` | The search that found the record and the scrape time |

### How to use it

1. Enter one or more **Provider types**, for example `pharmacy`, `general acute care hospital`, `clinical medical laboratory` or `home health`.
2. Add **States**, and optionally **Cities** or **ZIP codes**, to target an area. Every combination is searched separately.
3. Or enter **Organization names** (add `*` for a prefix match such as `walgreen*`) or a list of **NPI numbers**.
4. Set **Max results per search** and click **Start**. Export the results from the **Output** tab.

#### Example input

```json
{
  "taxonomies": ["pharmacy", "clinical medical laboratory"],
  "states": ["TX"],
  "cities": ["Austin", "Dallas"],
  "maxResultsPerSearch": 1200
}
```

This runs four searches (2 types x 2 cities).

#### Example output

One record from a real run:

```json
{
  "npi": "1801494018",
  "organizationName": "340B PARTNERS PHARMACY - DALLAS LLC",
  "otherNames": [
    "AVITA PHARMACY"
  ],
  "isSubpart": true,
  "status": "active",
  "primaryTaxonomyCode": "3336C0003X",
  "primaryTaxonomy": "Pharmacy, Community/Retail Pharmacy",
  "taxonomies": [
    {
      "code": "3336C0003X",
      "description": "Pharmacy, Community/Retail Pharmacy",
      "primary": true,
      "state": null,
      "license": null
    }
  ],
  "address": "2800 S IH 35 FRONTAGE RD, SUITE 105",
  "city": "AUSTIN",
  "state": "TX",
  "postalCode": "78704",
  "country": "US",
  "phone": "512-213-4030",
  "fax": null,
  "mailingAddress": {
    "address": "10604 COURSEY BLVD",
    "city": "BATON ROUGE",
    "state": "LA",
    "postalCode": "70816-4015",
    "country": "US"
  },
  "otherIdentifiers": [],
  "enumerationDate": "2020-10-12",
  "lastUpdated": "2020-10-12",
  "registryUrl": "https://npiregistry.cms.hhs.gov/provider-view/1801494018",
  "search": "taxonomy_description=pharmacy, state=TX, city=Austin",
  "scrapedAt": "2026-11-16T15:25:23.095Z"
}
```

### Pricing

Pay per event: **$2.00 per 1,000 organizations** saved, plus a tiny standard start fee and Apify platform usage (usually a fraction of a cent per run). Duplicates found by several searches are saved and charged once. Set **Max cost per run** to cap spending.

### Tips and limits

- The NPI Registry returns at most **1,200 records per search**. For a big state, split the search by city or by ZIP code prefix (for example `770*`, `772*`).
- A state alone is not enough: the registry needs a type, city, ZIP code or name as well.
- Taxonomy search matches the description text, so `pharmacy` also returns specialty and compounding pharmacies.
- Data is as current as the NPPES registry, which providers update themselves. Phone numbers and addresses can be out of date.
- A `RUN_SUMMARY` record lists every search with the number of organizations saved and any error.

### FAQ

**Can I get individual doctors or nurses?** No. This Actor only returns organization records (NPI type 2). Individual practitioners are left out by design.

**Does it include e-mail addresses?** No. The registry does not publish organization e-mail addresses, and authorized-official contact details are not exported.

**How fresh is the data?** Every run queries the live CMS NPI Registry API, which CMS refreshes daily.

### Legal note

This Actor reads public data from the NPI Registry API published by the Centers for Medicare & Medicaid Services. Use the data in line with CMS guidance, US marketing laws (for example the TCPA for calls and faxes) and your own legitimate purpose.

# Actor input Schema

## `taxonomies` (type: `array`):

Taxonomy descriptions to search, for example pharmacy, general acute care hospital, clinical medical laboratory, home health, ambulatory surgical. Partial words work.

## `states` (type: `array`):

Two-letter US state codes, for example TX, CA, NY. Each state is searched separately.

## `cities` (type: `array`):

Optional city names. Combine with states to split big searches below the 1,200-result cap.

## `postalCodes` (type: `array`):

Optional 5-digit ZIP codes (or prefixes followed by *, for example 787*).

## `organizationNames` (type: `array`):

Optional organization names. Add \* after at least two letters for a prefix match, for example walgreen\*.

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

Optional list of 10-digit organization NPI numbers to look up directly. Individual-provider NPIs are skipped.

## `maxResultsPerSearch` (type: `integer`):

The registry returns at most 1,200 records per search combination. Narrow by city or ZIP to get more.

## `maxSearches` (type: `integer`):

Every combination of type x state x city x ZIP x name is one search. This caps how many are run.

## Actor input object example

```json
{
  "taxonomies": [
    "pharmacy"
  ],
  "states": [
    "TX"
  ],
  "cities": [
    "Austin"
  ],
  "maxResultsPerSearch": 50,
  "maxSearches": 100
}
```

# Actor output Schema

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

No description

## `resultsFull` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "taxonomies": [
        "pharmacy"
    ],
    "states": [
        "TX"
    ],
    "cities": [
        "Austin"
    ],
    "maxResultsPerSearch": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/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 = {
    "taxonomies": ["pharmacy"],
    "states": ["TX"],
    "cities": ["Austin"],
    "maxResultsPerSearch": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("dabooti/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 '{
  "taxonomies": [
    "pharmacy"
  ],
  "states": [
    "TX"
  ],
  "cities": [
    "Austin"
  ],
  "maxResultsPerSearch": 50
}' |
apify call dabooti/npi-registry-scraper --silent --output-dataset

```

## MCP server setup

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