# NPI Registry Search & CMS Hospital, Nursing Home Lookup (`lathewright/healthcare-organizations`) Actor

Returns US healthcare organizations from the official NPI Registry (hospitals, clinics, pharmacies, labs, home health) by name, specialty, city, state or ZIP, or CMS Provider Data facilities (hospitals, nursing homes, hospice, dialysis) with ratings. Organizations only. No key.

- **URL**: https://apify.com/lathewright/healthcare-organizations.md
- **Developed by:** [lathewright LLC](https://apify.com/lathewright) (community)
- **Categories:** Business, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 organization founds

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?

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 Search & CMS Hospital, Nursing Home Lookup

Find US healthcare organizations in the NPI Registry and CMS Provider Data (hospitals, clinics, pharmacies, nursing homes, hospices, dialysis centers), for healthcare sales teams, researchers, analysts and AI agents. It costs $0.003 per organization, so 1,000 organizations cost $3. Individual practitioners are not returned.

Find US healthcare **organizations** from the two official sources: the **NPI Registry** (every HIPAA-covered organization with a National Provider Identifier: hospitals, clinics, group practices, pharmacies, labs, home health, DME suppliers, behavioural health, and more, with taxonomies, addresses, phone and published FHIR endpoints) and **CMS Provider Data** (Medicare-certified hospitals, nursing homes, home health agencies, hospices, dialysis facilities, inpatient rehab and long-term care hospitals with ownership, ratings and services). Search by name, specialty, city, state or ZIP, look up NPIs in bulk, or list every certified facility of a type in a state.

Built and maintained by **Lathewright**. Lathewright is operated by AI systems under human ownership. A person reviews and approves everything we publish, send and sell. Pay only for what you get: **$0.003 per organization**.

### What you can do with it

- **Health-tech sales and partnerships**: every hospital or home-health agency in a state with address, phone, ownership and star rating, ready for a CRM.
- **Provider directories and referral tools**: pharmacies, urgent care, labs or dialysis centres near a ZIP code, with taxonomies and NPIs for claims.
- **Verification**: confirm an organization's NPI, legal name, DBA names, subpart status and practice locations.
- **Interoperability**: the NPI record's published endpoints (FHIR, Direct) for organizations that register them.
- **Agent tool**: "which nursing homes in Wyoming are non-profit and how are they rated?" is one call.

### Example tasks

Paste any of these into the Input tab, or send the same JSON through the API. Prices are the per-result prices listed under Pricing.

#### 1. Search NPI organizations by name and state

```json
{
  "mode": "npiSearch",
  "organizationName": "mayo*",
  "state": "MN",
  "maxResults": 25
}
```

What comes back: One row per organization with `name`, `npi`, `primaryTaxonomy`, `practiceAddress` and `url`. Up to 25 rows, at most $0.075.

#### 2. Look up a specific NPI

```json
{
  "mode": "npiLookup",
  "npis": ["1255498432"]
}
```

What comes back: The organization record with taxonomies, addresses and published endpoints; an error row if the NPI belongs to an individual.

#### 3. List Medicare-certified nursing homes in California

```json
{
  "mode": "cmsProviders",
  "providerType": "nursingHomes",
  "state": "CA",
  "maxResults": 50
}
```

What comes back: CMS facility rows with `ccn`, `ownership` and a `details` object that holds the dataset's rating fields.

### Input

| Field | Type | Notes |
|---|---|---|
| `mode` | select | `npiSearch`, `npiLookup`, `cmsProviders` |
| `organizationName` | string | Name or prefix with `*` wildcard (NPI), substring (CMS) |
| `taxonomyDescription` | string | NPI specialty wording: `Hospital`, `Pharmacy`, `Clinic/Center`, `Home Health`, `Clinical Medical Laboratory`, `Dentist`, `Skilled Nursing Facility`, `Ambulatory Surgical`… |
| `city`, `state`, `postalCode`, `addressPurpose` | string | Location filters |
| `npis` | array | 10-digit NPIs for `npiLookup` |
| `providerType` | select | `hospitals`, `nursingHomes`, `homeHealth`, `hospice`, `dialysis`, `inpatientRehab`, `longTermCareHospitals` |
| `ownership` | string | Ownership substring for CMS datasets (`non-profit`, `Government`, `For profit`) |
| `maxResults` | integer | Cap per run (NPI API: at most 1,200 per query) |

```json
{ "mode": "npiSearch", "taxonomyDescription": "Pharmacy", "city": "Austin", "state": "TX", "maxResults": 500 }
```

```json
{ "mode": "cmsProviders", "providerType": "hospitals", "state": "CA", "ownership": "non-profit", "maxResults": 1000 }
```

### Output

NPI Registry row:

```json
{
  "type": "organization",
  "source": "npi-registry",
  "npi": "1255498432",
  "name": "CANNON FALLS MEDICAL CENTER",
  "otherNames": [{ "name": "MAYO HEALTH SYSTEMS", "type": "Doing Business As" }],
  "status": "active",
  "enumerationDate": "2007-01-03",
  "lastUpdated": "2020-08-22",
  "organizationalSubpart": false,
  "primaryTaxonomy": "General Acute Care Hospital, Rural",
  "taxonomies": [{ "code": "282NR1301X", "description": "General Acute Care Hospital, Rural", "primary": true, "state": "MN", "license": "1957" }],
  "practiceAddress": { "line1": "1116 MILL ST W", "line2": null, "city": "CANNON FALLS", "state": "MN", "zip": "55009-1824", "country": "US", "phone": "507-263-4221", "fax": null },
  "mailingAddress": { "line1": "2556 YELLOWSTONE RD", "city": "HASTINGS", "state": "MN", "zip": "55033-3751", "country": "US", "phone": "651-253-4118" },
  "otherPracticeLocations": [],
  "identifiers": [],
  "endpoints": [],
  "url": "https://npiregistry.cms.hhs.gov/provider-view/1255498432"
}
```

CMS row: `source: "cms-provider-data"`, `providerType`, `dataset`, `ccn`, `name`, `practiceAddress` (with county), `ownership` and a `details` object with the dataset's own fields (hospitals: `hospitalType`, `emergencyServices`, `overallRating`; nursing homes: `certifiedBeds`, `overallRating`, `healthInspectionRating`, `staffingRating`, `qualityMeasureRating`, `chainName`, `specialFocusStatus`; home health: services offered and `qualityOfPatientCareStarRating`; dialysis: `fiveStarRating`, `dialysisStations`, `chainOrganization`; rehab and LTCH: `totalBeds`, `cmsRegion`). Failed NPI lookups are `type: "error"` rows (`NOT_FOUND`, `INVALID_NPI`, `INDIVIDUAL_PROVIDER`).

### Pricing

| Event | Price | Notes |
|---|---|---|
| Organization found (`organization`) | $0.003 | Primary event. 1,000 facilities = $3 |
| Failed lookup (`lookup-error`) | $0.0005 | Unknown NPI, invalid number, individual practitioner |

Plus Apify's standard start fee ($0.00005 per run). No proxies, no browser. Set a **maximum cost per run** and the Actor stops cleanly at the limit.

### How to use it

- **Apify Console**: fill in the form, press Start, download JSON, CSV or Excel from the Output tab.
- **API**: `POST https://api.apify.com/v2/acts/lathewright~healthcare-organizations/run-sync-get-dataset-items?token=<token>` with the input JSON as the body.
- **n8n, Make, Zapier**: use the Apify node/module, pick this Actor, paste the input JSON.

### Use from an AI agent (MCP)

Add this Actor as a tool in Claude, Cursor, VS Code or any MCP client with `https://mcp.apify.com/?tools=lathewright/healthcare-organizations`. The Actor description is the tool description, and the input fields above are the tool parameters. Example prompts: "Find hospitals in San Francisco with their CMS star rating", "Look up NPI 1255498432".

### Data sources, robots.txt and fair use

Checked on 19 October 2026 for the exact paths the Actor requests:

- **NPPES NPI Registry API** (`npiregistry.cms.hhs.gov/api/?version=2.1`): robots.txt allows the path; CMS publishes the API for public use without a key (200 results per page, 1,200 per query). The Actor requests organizations only (`enumeration_type=NPI-2`) and never copies the "authorized official" fields, which name a person; individual practitioners (NPI-1) are not returned.
- **CMS Provider Data Catalog datastore API** (`data.cms.gov/provider-data/api/1/datastore/query/<dataset>/0`): robots.txt allows the path; the datasets are public domain. Dataset ids used: Hospital General Information `xubh-q36u`, Nursing homes Provider Information `4pq5-n9py`, Home Health Care Agencies `6jpm-sxkc`, Hospice General Information `yc9t-dgbk`, Dialysis Facility Listing `23ew-n7w9`, Inpatient Rehabilitation Facility General Information `7t8x-u3ir`, Long-Term Care Hospital General Information `azum-44iv`.
- Requests are spaced at least 500 ms apart, up to 500 rows per CMS request and 200 per NPI request. Organization phone numbers and addresses are the business contacts the organizations registered for public directories.

### FAQ

**Can I get individual doctors?** No. This Actor is limited to organizations on purpose; CMS offers the NPI Registry and the Doctors & Clinicians dataset for practitioners.

**Why does the NPI search stop at 1,200?** The NPPES API caps paging at 1,200 results per query; add a city, ZIP prefix or taxonomy to narrow it, or run several queries.

**How current is the data?** NPPES updates daily; the CMS datasets refresh monthly to quarterly (the `dataset` name and `url` point to the catalog page with the release date).

# Actor input Schema

## `mode` (type: `string`):

`npiSearch` searches organizations in the NPI Registry. `npiLookup` fetches specific NPIs. `cmsProviders` lists Medicare-certified facilities of one type from CMS.

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

Name or prefix; `*` is a wildcard after at least two characters (e.g. `mayo*`). Used by npiSearch and cmsProviders.

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

NPI taxonomy description, e.g. `Hospital`, `Pharmacy`, `Clinic/Center`, `Home Health`, `Clinical Medical Laboratory`, `Dentist`, `Skilled Nursing Facility`, `Ambulatory Surgical`.

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

City of the practice location (exact for NPI, contains for CMS).

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

Two-letter state code, e.g. `MN`.

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

ZIP code; NPI accepts a wildcard (`902*`), CMS matches the 5-digit prefix.

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

Which address the city/state/ZIP filters apply to.

## `npis` (type: `array`):

10-digit NPIs. Individual practitioners come back as error rows; only organizations (type 2) are returned.

## `providerType` (type: `string`):

Which CMS Provider Data Catalog dataset to list.

## `ownership` (type: `string`):

Substring of the ownership type, e.g. `non-profit`, `Government`, `Proprietary`, `For profit`.

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

Cap per run. Each organization is one billable event. The NPI API returns at most 1,200 results per query.

## `compactOutput` (type: `boolean`):

Return only the key fields (smaller, cheaper for AI agents to read).

## Actor input object example

```json
{
  "mode": "npiSearch",
  "organizationName": "mayo*",
  "state": "MN",
  "maxResults": 25,
  "compactOutput": false
}
```

# Actor output Schema

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

One JSON object per healthcare organization (or per failed lookup).

# 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 = {
    "organizationName": "mayo*",
    "state": "MN"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lathewright/healthcare-organizations").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 = {
    "organizationName": "mayo*",
    "state": "MN",
}

# Run the Actor and wait for it to finish
run = client.actor("lathewright/healthcare-organizations").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 '{
  "organizationName": "mayo*",
  "state": "MN"
}' |
apify call lathewright/healthcare-organizations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lathewright/healthcare-organizations"
        }
    }
}
```

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/qIbFNJYYUTKW2ST7Q/builds/a4H7trPZQNf5bqFPu/openapi.json
