# NPPES NPI Healthcare Provider Organization Registry (`plainkitbin/nppes-npi-provider-registry`) Actor

Search US CMS NPPES NPI Registry v2.1 public FOIA healthcare organization records (NPI-2 clinics, hospitals, pharmacies) by name, taxonomy, state, city, or ZIP code.

- **URL**: https://apify.com/plainkitbin/nppes-npi-provider-registry.md
- **Developed by:** [PlainKit bin](https://apify.com/plainkitbin) (community)
- **Categories:** Business, Lead generation, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 npi provider organization records

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/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

## NPPES NPI Provider Registry: US Healthcare Organizations (`plainkitbin/nppes-npi-provider-registry`)

**Actor slug:** `plainkitbin/nppes-npi-provider-registry` — **NPPES NPI provider registry** scraper for US healthcare organizations (Type 2 / `NPI-2`) using the public US CMS NPPES NPI Registry API v2.1. Retrieve structured JSON records for clinics, hospitals, pharmacies, and medical groups without API keys or authentication.

This Actor is not affiliated with or endorsed by the Centers for Medicare & Medicaid Services (CMS) or the US Department of Health and Human Services (HHS). Data originates from the public US CMS NPPES NPI Registry e-FOIA dissemination interface.

### Introduction

Healthcare data engineers, B2B lead researchers, payer operations teams, and health-tech developers use the National Plan and Provider Enumeration System (NPPES) to look up verified National Provider Identifier (NPI) records. This Actor queries the keyless CMS NPPES API v2.1 exclusively for **healthcare organizations (`enumeration_type=NPI-2`)** and outputs clean tabular records ready for enrichment, directory indexing, or AI agent workflows.

#### Scope and Privacy Safeguards

- **Organizations Only (`NPI-2`)**: Queries are restricted to `enumeration_type=NPI-2` (organizations such as hospitals, clinics, rehabilitation facilities, and pharmacies). Individual practitioner (`NPI-1`) records are excluded.
- **No Personal Contact Data**: Personal contact phone numbers, fax numbers, and individual email addresses (including `DIRECT` messaging email endpoints) are excluded from extraction and never emitted.

### Tutorial

1. Provide at least one search filter: `organization_name` (supports trailing wildcard `*`), `taxonomy_description`, `state` (2-letter US state code, combined with another filter per CMS API rules), `city`, or `postal_code`.
2. Set `max_items` between `1` and `500` (default `25`) to bound dataset output.
3. Run the Actor and export results in JSON, CSV, or Excel format.

### Pricing

This Actor uses Apify Pay-Per-Event pricing charged per delivered `NPI-2` organization record:

- Event name: `npi-provider-record`
- Pricing model: Apify Pay-Per-Event
- Tier prices:
  - FREE: $0.005 per event
  - BRONZE: $0.0045 per event
  - SILVER: $0.004 per event
  - GOLD: $0.0035 per event
  - PLATINUM: $0.0035 per event
  - DIAMOND: $0.003 per event
- Delivery and billing order: Each row is pushed first and charged right after a successful push; a refused charge stops work and that row stays delivered and uncharged; a reached spending limit stops work after that row was charged; failed items are neither pushed nor charged.

### Input and output examples

#### Input Configuration

```json
{
  "state": "CA",
  "city": "LOS ANGELES",
  "max_items": 5
}
```

#### Sample Output Record

```json
{
  "endpoint_urls": [],
  "enumeration_date": "2023-05-11",
  "enumeration_type": "NPI-2",
  "last_updated_date": "2023-05-11",
  "npi_number": "1487344586",
  "npi_registry_url": "https://npiregistry.cms.hhs.gov/provider-view/1487344586",
  "organization_name": "1 FAMILY CLINIC INC",
  "practice_city": "LOS ANGELES",
  "practice_country": "US",
  "practice_postal_code": "900264005",
  "practice_state": "CA",
  "primary_taxonomy_code": "207QG0300X",
  "primary_taxonomy_desc": "Family Medicine, Geriatric Medicine",
  "primary_taxonomy_state": "",
  "status": "A"
}
```

### FAQ and support

#### Where does the data come from?

All records are queried directly from the public CMS NPPES NPI Registry API v2.1 (`https://npiregistry.cms.hhs.gov/api/?version=2.1`), disclosing FOIA-disclosable healthcare provider organization data under the e-FOIA Amendments at no charge to view (`https://www.cms.gov/medicare/regulations-guidance/administrative-simplification/data-dissemination`).

#### Why does searching by `state` alone return an error?

The CMS NPPES API requires `state` to be paired with at least one additional filter such as `city`, `postal_code`, `organization_name`, or `taxonomy_description`.

#### Does the Actor follow redirects?

No. All network requests are pinned strictly to `npiregistry.cms.hhs.gov` with zero redirect hops.

#### Need assistance?

Please submit feedback or open an issue via the Apify Actor console support tab.

### Use as an MCP Tool (AI Agents)

AI agents and MCP clients (such as Claude Desktop or Cursor) can invoke `plainkitbin/nppes-npi-provider-registry` directly via `@apify/actors-mcp-server` over `stdio`:

```bash
APIFY_TOKEN=<YOUR_APIFY_TOKEN> npx -y @apify/actors-mcp-server --actors plainkitbin/nppes-npi-provider-registry
```

Example MCP client configuration (`mcpServers`):

```json
{
  "mcpServers": {
    "nppes-npi-provider-registry": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "plainkitbin/nppes-npi-provider-registry"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Example JSON tool call matching `.actor/input_schema.json`:

```json
{
  "organization_name": "",
  "taxonomy_description": "Hospital",
  "state": "CA",
  "city": "LOS ANGELES",
  "postal_code": "",
  "max_items": 5
}
```

# Actor input Schema

## `organization_name` (type: `string`):

Optional healthcare organization name filter (supports trailing wildcard '*', e.g. 'KAISER*').

## `taxonomy_description` (type: `string`):

Optional NUCC taxonomy or specialty description filter (e.g. 'Hospital' or 'Pharmacy').

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

Optional 2-letter US state or territory code (e.g. 'CA', 'NY'). Combine with city, postal_code, organization_name, or taxonomy_description per CMS API rules.

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

Optional practice city name filter (e.g. 'LOS ANGELES').

## `postal_code` (type: `string`):

Optional 5-digit or 9-digit US ZIP code filter (e.g. '90026').

## `max_items` (type: `integer`):

Maximum number of NPI-2 organization records to collect and output (1 to 500).

## Actor input object example

```json
{
  "organization_name": "",
  "taxonomy_description": "",
  "state": "CA",
  "city": "LOS ANGELES",
  "postal_code": "",
  "max_items": 25
}
```

# Actor output Schema

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

Dataset items produced by this run.

# 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 = {
    "organization_name": "",
    "taxonomy_description": "",
    "state": "CA",
    "city": "LOS ANGELES",
    "postal_code": "",
    "max_items": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainkitbin/nppes-npi-provider-registry").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 = {
    "organization_name": "",
    "taxonomy_description": "",
    "state": "CA",
    "city": "LOS ANGELES",
    "postal_code": "",
    "max_items": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("plainkitbin/nppes-npi-provider-registry").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 '{
  "organization_name": "",
  "taxonomy_description": "",
  "state": "CA",
  "city": "LOS ANGELES",
  "postal_code": "",
  "max_items": 25
}' |
apify call plainkitbin/nppes-npi-provider-registry --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plainkitbin/nppes-npi-provider-registry"
        }
    }
}
```

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/jck5Grx3JO1ZsyK3Y/builds/ijYEcEHxWmwhsl5PA/openapi.json
