# NPI Registry Scraper (`anyxsolutions/npi-registry-scraper`) Actor

NPI registry scraper: look up US healthcare providers in the official NPI Registry by NPI number, specialty, name, organization, city, state or ZIP. Get names, credentials, taxonomies with licenses, practice and mailing addresses with phone and fax, and enumeration dates. No API key.

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

## Pricing

from $1.50 / 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/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

![banner](https://anyx.solutions/banners/npi-registry-scraper.png)

## NPI Registry Scraper

**US healthcare provider data from the official CMS NPI Registry (NPI, specialty, license, address, phone and fax) as clean JSON.**

Get provider records from the NPPES NPI Registry, the federal directory of every US healthcare
provider and organization that holds a National Provider Identifier: the 10-digit NPI, individual
or organization type, names and credentials, specialties (taxonomies) with the primary one flagged
and its state license number, practice-location and mailing addresses with phone and fax, extra
practice locations, other names such as doing-business-as names, the authorized official of an
organization, Direct messaging endpoints, and enumeration and last-update dates. Look up NPIs or
NPI Registry provider pages, or search by specialty, first and last name, organization name, city,
state and ZIP code. The data is published by the Centers for Medicare & Medicaid Services (CMS) and
updated daily. There is no login, no API key and no proxy to set up. Built for healthcare sales
and marketing lists, provider directory upkeep, credentialing and claims checks, and network
analysis.

### ⚡ Quick start

```json
{
  "taxonomyDescriptions": ["Dentist"],
  "cities": ["Brooklyn"],
  "state": "NY",
  "startUrls": [
    { "url": "https://npiregistry.cms.hhs.gov/provider-view/1003000126" }
  ],
  "maxItems": 5
}
```

Or look up a list of NPIs:

```json
{ "npiNumbers": ["1003000126", "1881018208"] }
```

### 🧩 Input

| Field                  | Type    | Required | Default                      | Description                                                                                                                                                                                                          |
| ---------------------- | ------- | -------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startUrls`            | array   | no       | —                            | NPI Registry provider pages, such as `https://npiregistry.cms.hhs.gov/provider-view/1003000126`. Each returns one provider.                                                                                          |
| `npiNumbers`           | array   | no       | —                            | NPI numbers (10 digits) to fetch directly, such as `1003000126`. Invalid numbers are skipped and listed in the log.                                                                                                  |
| `taxonomyDescriptions` | array   | no       | —                            | Taxonomy descriptions (specialties or provider types) as the registry words them, such as `Dentist`, `Family Medicine` or `Pharmacy`. Each one is a separate search.                                                 |
| `firstName`            | string  | no       | —                            | First name of an individual provider. A trailing `*` matches the start of a name.                                                                                                                                    |
| `lastName`             | string  | no       | —                            | Last name of an individual provider, such as `Smith` or `Sm*`.                                                                                                                                                       |
| `organizationName`     | string  | no       | —                            | Organization name, such as `Mayo Clinic` or `Kaiser*`.                                                                                                                                                               |
| `enumerationType`      | string  | no       | —                            | Provider type: `NPI-1` (individuals) or `NPI-2` (organizations). Leave empty for both.                                                                                                                               |
| `namePurpose`          | string  | no       | —                            | Name refers to the provider (`PROVIDER`) or an organization's authorized official (`AO`).                                                                                                                            |
| `exactNameMatch`       | boolean | no       | `false`                      | Exact first names only, without the registry's aliases and similar names.                                                                                                                                            |
| `cities`               | array   | no       | —                            | Cities to search in, such as `Brooklyn`. Each city is a separate search.                                                                                                                                             |
| `state`                | string  | no       | —                            | State (two-letter code, such as `NY`). Needs another criterion such as a taxonomy, name, city or ZIP code.                                                                                                           |
| `postalCodes`          | array   | no       | —                            | Postcodes (ZIP codes) to search in, such as `10001`, or a prefix such as `112*`. Each one is a separate search.                                                                                                      |
| `countryCode`          | string  | no       | —                            | Country code (two letters) of the address, such as `DE`. A country other than US works on its own.                                                                                                                   |
| `addressPurpose`       | string  | no       | —                            | Address to match: `LOCATION` (any practice location), `MAILING`, `PRIMARY` or `SECONDARY`. Leave empty to match the mailing address or any practice location.                                                        |
| `maxItems`             | integer | no       | —                            | Maximum providers per search (each taxonomy, city and ZIP combination). The input form starts at 5; leave it empty for every match, up to 1,200 per search. NPIs and provider pages always return one provider each. |
| `proxyConfiguration`   | object  | no       | `{ "useApifyProxy": false }` | Proxy settings. The NPI Registry needs no proxy.                                                                                                                                                                     |

The search fields make one search per combination of taxonomy description, city and ZIP code,
each with the name, type, state, country and address settings. A search needs at least one of a
taxonomy, a name, an organization name, a city or a ZIP code; state, provider type and address
type only narrow it.

### 📤 Output

Each provider is one dataset row. Dates are ISO 8601. The flat `address`, `city`, `state`,
`postalCode`, `phone` and `fax` fields are the primary practice location.

#### Fields

| Field                    | Type    | Description                                                                                                                              |
| ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `npi`                    | string  | The 10-digit National Provider Identifier.                                                                                               |
| `enumerationType`        | string  | `NPI-1` (individual) or `NPI-2` (organization).                                                                                          |
| `providerType`           | string  | `Individual` or `Organization`.                                                                                                          |
| `name`                   | string  | Display name: a person's full name and credential, or the organization name.                                                             |
| `firstName`              | string  | First name (individuals).                                                                                                                |
| `middleName`             | string  | Middle name (individuals).                                                                                                               |
| `lastName`               | string  | Last name (individuals).                                                                                                                 |
| `namePrefix`             | string  | Name prefix, such as `Dr.`.                                                                                                              |
| `nameSuffix`             | string  | Name suffix, such as `Jr.`.                                                                                                              |
| `credential`             | string  | Credential, such as `M.D.` or `DDS`.                                                                                                     |
| `sex`                    | string  | `M` or `F`, as registered (individuals).                                                                                                 |
| `soleProprietor`         | boolean | Whether the individual is a sole proprietor.                                                                                             |
| `organizationName`       | string  | Legal business name (organizations).                                                                                                     |
| `organizationalSubpart`  | boolean | Whether the organization is a subpart of another.                                                                                        |
| `parentOrganizationName` | string  | Parent organization's legal business name, for a subpart.                                                                                |
| `authorizedOfficial`     | object  | An organization's authorized official: `name`, `firstName`, `lastName`, `title`, `credential`, `phone`.                                  |
| `status`                 | string  | `ACTIVE` (the registry publishes active NPIs only).                                                                                      |
| `enumerationDate`        | string  | Date the NPI was issued.                                                                                                                 |
| `lastUpdated`            | string  | Date the record was last updated.                                                                                                        |
| `certificationDate`      | string  | Date the provider last certified the record.                                                                                             |
| `primaryTaxonomyCode`    | string  | Primary taxonomy code, such as `122300000X`.                                                                                             |
| `primaryTaxonomy`        | string  | Primary taxonomy description, such as `Dentist`.                                                                                         |
| `primaryLicense`         | string  | License number for the primary taxonomy.                                                                                                 |
| `primaryLicenseState`    | string  | State of that license.                                                                                                                   |
| `taxonomies`             | array   | Every taxonomy (up to 15): `code`, `description`, `primary`, `license`, `state`, `group`.                                                |
| `address`                | string  | Primary practice location on one line.                                                                                                   |
| `city`                   | string  | City of the primary practice location.                                                                                                   |
| `state`                  | string  | State of the primary practice location.                                                                                                  |
| `postalCode`             | string  | ZIP code of the primary practice location (ZIP+4 as `12345-6789`).                                                                       |
| `phone`                  | string  | Phone of the primary practice location.                                                                                                  |
| `fax`                    | string  | Fax of the primary practice location.                                                                                                    |
| `locationAddress`        | object  | Primary practice location: `address1`, `address2`, `city`, `state`, `postalCode`, `countryCode`, `countryName`, `phone`, `fax`.          |
| `mailingAddress`         | object  | Mailing address, same shape.                                                                                                             |
| `practiceLocations`      | array   | Other practice locations, same shape.                                                                                                    |
| `otherIdentifiers`       | array   | Other provider identifiers: `identifier`, `type`, `state`, `issuer`.                                                                     |
| `otherNames`             | array   | Other names, such as former or doing-business-as names: `type`, `name`.                                                                  |
| `endpoints`              | array   | Health information exchange endpoints, such as Direct addresses: `endpoint`, `type`, `use`, `contentType`, `description`, `affiliation`. |
| `searchCriteria`         | string  | The search that found the provider, such as `taxonomy: Dentist; city: Brooklyn; state: NY`; null for lookups.                            |
| `url`                    | string  | The provider's page on npiregistry.cms.hhs.gov.                                                                                          |

<details><summary>Example output</summary>

```json
{
  "npi": "1003000126",
  "enumerationType": "NPI-1",
  "providerType": "Individual",
  "name": "ARDALAN ENKESHAFI, M.D.",
  "firstName": "ARDALAN",
  "middleName": null,
  "lastName": "ENKESHAFI",
  "namePrefix": null,
  "nameSuffix": null,
  "credential": "M.D.",
  "sex": "M",
  "soleProprietor": false,
  "organizationName": null,
  "organizationalSubpart": null,
  "parentOrganizationName": null,
  "authorizedOfficial": null,
  "status": "ACTIVE",
  "enumerationDate": "2007-08-31",
  "lastUpdated": "2025-05-28",
  "certificationDate": "2025-05-28",
  "primaryTaxonomyCode": "208M00000X",
  "primaryTaxonomy": "Hospitalist",
  "primaryLicense": "MD600003480",
  "primaryLicenseState": "DC",
  "taxonomies": [
    {
      "code": "207R00000X",
      "description": "Internal Medicine",
      "primary": false,
      "license": "0101254037",
      "state": "VA",
      "group": null
    },
    {
      "code": "208M00000X",
      "description": "Hospitalist",
      "primary": true,
      "license": "MD600003480",
      "state": "DC",
      "group": null
    }
  ],
  "address": "6410 ROCKLEDGE DR STE 304, BETHESDA, MD 20817-1841",
  "city": "BETHESDA",
  "state": "MD",
  "postalCode": "20817-1841",
  "phone": "443-602-6207",
  "fax": null,
  "locationAddress": {
    "address1": "6410 ROCKLEDGE DR STE 304",
    "address2": null,
    "city": "BETHESDA",
    "state": "MD",
    "postalCode": "20817-1841",
    "countryCode": "US",
    "countryName": "United States",
    "phone": "443-602-6207",
    "fax": null
  },
  "mailingAddress": {
    "address1": "6410 ROCKLEDGE DR STE 304",
    "address2": null,
    "city": "BETHESDA",
    "state": "MD",
    "postalCode": "20817-1841",
    "countryCode": "US",
    "countryName": "United States",
    "phone": "443-602-6207",
    "fax": "540-224-5684"
  },
  "practiceLocations": [
    {
      "address1": "2900 LAMB CIR",
      "address2": null,
      "city": "CHRISTIANSBURG",
      "state": "VA",
      "postalCode": "24073-6344",
      "countryCode": "US",
      "countryName": "United States",
      "phone": "540-731-2000",
      "fax": "540-731-2659"
    }
  ],
  "otherIdentifiers": [],
  "otherNames": [],
  "endpoints": [],
  "searchCriteria": null,
  "url": "https://npiregistry.cms.hhs.gov/provider-view/1003000126"
}
```

</details>

### 💡 Use cases

- **Healthcare sales and marketing.** Build lists of dentists, pharmacies, physical therapists or clinics in a city or ZIP code, with practice addresses and phone numbers.
- **Provider directory upkeep.** Check that the names, specialties and addresses in your directory still match the registry.
- **Credentialing and claims.** Confirm an NPI, its type, primary specialty and state license before you credential a provider or pay a claim.
- **Market and network analysis.** Count providers by specialty and area, or map an organization's practice locations.

### ❓ FAQ

- **Where does the data come from?** From the NPPES NPI Registry run by the Centers for Medicare & Medicaid Services (CMS). It is public US government data, updated daily.
- **Do I need an API key, an account or a proxy?** No.
- **How many results can one search return?** The registry returns at most 200 records per request and lets a search skip at most 1,000, so one search reaches at most 1,200 providers. Split larger searches by city, ZIP code (a prefix such as `112*` works) or taxonomy: each list entry is its own search with its own 1,200. The log says when a search hits the limit.
- **How fast is it, and is there a rate limit?** CMS limits how many registry queries can be made per hour and asks bulk users to download its monthly data file instead. The Actor keeps to about 2 requests a second; a full 1,200-record search takes 6 requests. For the whole registry, use the CMS NPPES download file.
- **Why are deactivated NPIs missing?** The registry only publishes active NPIs. A deactivated or unknown NPI is reported in the log.
- **What is a taxonomy?** The Health Care Provider Taxonomy code set classifies providers by type and specialty, such as `122300000X` (Dentist). Search by its description; the registry matches similar descriptions too.
- **Does a listing mean the provider is licensed?** No. CMS notes that an NPI does not validate licensing or credentials; check the license with the state board.

### 🔗 More scrapers by Anyx

- [Google Maps Email Extractor](https://apify.com/anyxsolutions/google-maps-email-extractor)
- [Yellow Pages Scraper](https://apify.com/anyxsolutions/yellowpages-scraper)
- [Trustpilot Scraper](https://apify.com/anyxsolutions/trustpilot-scraper)
- [Indeed Scraper](https://apify.com/anyxsolutions/indeed-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

# Actor input Schema

## `startUrls` (type: `array`):

Provider pages from the NPI Registry, such as https://npiregistry.cms.hhs.gov/provider-view/1003000126. Each returns one provider.

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

10-digit National Provider Identifiers to fetch directly, for example 1003000126. Invalid numbers are skipped and listed in the log.

## `taxonomyDescriptions` (type: `array`):

Specialties or provider types to search for, as the registry words them, for example Dentist, Family Medicine, Physical Therapist or Pharmacy. Each one is a separate search.

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

Provider's first name (individuals), for example John. A trailing \* matches the start of a name, for example Jo\*.

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

Provider's last name (individuals), for example Smith or Sm\*. A trailing \* needs at least two letters before it.

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

Organization name (organizations), for example Mayo Clinic or Kaiser\*. A trailing \* matches the start of a name.

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

Only individual providers (NPI-1) or only organizations (NPI-2). Leave empty for both.

## `namePurpose` (type: `string`):

Whether the first and last name are the provider's own (Provider) or an organization's authorized official (AO). Leave empty for the provider's name.

## `exactNameMatch` (type: `boolean`):

Match first names exactly, without the registry's aliases and similar names (for example Bob for Robert).

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

Cities to search in, for example Brooklyn or Houston. Each city is a separate search. Enter APO or FPO for military addresses.

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

Only providers with an address in this state. Needs another criterion such as a taxonomy, name, city or postcode.

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

ZIP codes to search in, for example 10001, or a ZIP prefix with a trailing *, for example 112*. Each one is a separate search.

## `countryCode` (type: `string`):

Only providers with an address in this country, as a two-letter code, for example DE or CA. A country other than US works on its own.

## `addressPurpose` (type: `string`):

Which address the city, state, postcode and country must match. Leave empty to match the mailing address or any practice location.

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

Maximum number of providers to return per search (each taxonomy, city and postcode combination). Leave empty for every match, up to the registry's 1,200 per search. NPIs and provider pages always return one provider each.

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

Proxy settings. The NPI Registry is public and needs no proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://npiregistry.cms.hhs.gov/provider-view/1003000126"
    }
  ],
  "taxonomyDescriptions": [
    "Dentist"
  ],
  "exactNameMatch": false,
  "cities": [
    "Brooklyn"
  ],
  "state": "NY",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://npiregistry.cms.hhs.gov/provider-view/1003000126"
        }
    ],
    "taxonomyDescriptions": [
        "Dentist"
    ],
    "cities": [
        "Brooklyn"
    ],
    "state": "NY",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/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 = {
    "startUrls": [{ "url": "https://npiregistry.cms.hhs.gov/provider-view/1003000126" }],
    "taxonomyDescriptions": ["Dentist"],
    "cities": ["Brooklyn"],
    "state": "NY",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/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 '{
  "startUrls": [
    {
      "url": "https://npiregistry.cms.hhs.gov/provider-view/1003000126"
    }
  ],
  "taxonomyDescriptions": [
    "Dentist"
  ],
  "cities": [
    "Brooklyn"
  ],
  "state": "NY",
  "maxItems": 5
}' |
apify call anyxsolutions/npi-registry-scraper --silent --output-dataset

```

## MCP server setup

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