# CMS Nursing Home, Hospital & Home Health Ratings Scraper (`talcoe/cms-provider-data`) Actor

Pull CMS star ratings, staffing, inspections, fines and ownership for nursing homes, hospitals and home health agencies, filtered by state, city, name and rating, billed per result.

- **URL**: https://apify.com/talcoe/cms-provider-data.md
- **Developed by:** [M Usama](https://apify.com/talcoe) (community)
- **Categories:** Lead generation, 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.

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

### Data source

Reads the public CMS Provider Data Catalog JSON API (data.cms.gov/provider-data), which CMS refreshes monthly.

### What does CMS Nursing Home, Hospital & Home Health Ratings Scraper do?

It returns one clean record per Medicare certified facility: nursing homes, hospitals and home health agencies. Nursing home records carry the overall, health inspection, staffing and quality measure star ratings, bed counts, ownership type, legal entity and chain, nurse staffing hours and turnover, inspection deficiency counts, and fines and payment denials. Hospital records carry the overall star rating, ownership, emergency services and counts of mortality, safety and readmission measures that are better or worse than the national rate. Home health records carry the quality star rating, services offered and outcome rates. Filter by state, city, name and minimum star rating so you only pay for the facilities you need. Pricing is per result.

### Why use it?

- Build lead lists of low rated or fined nursing homes for staffing agencies, software vendors, insurers and consultants.
- Find facilities that changed ownership recently, belong to a large chain, or have a special focus status.
- Monitor star ratings, fines and staffing over time by scheduling a monthly run and comparing by `ccn`.
- Replace manual downloads and spreadsheet joins from the CMS site with one filtered, flat JSON or CSV export.

### How to use it

1. Open the Actor and set the filters.
2. Click Start. Download results as JSON, CSV or Excel, or read them through the API.
3. Add a Schedule and an Integration (Slack, Google Sheets, webhook) to get new records automatically.

### Input

| Field | Description |
|---|---|
| `facilityTypes` | Any of `nursingHome`, `hospital`, `homeHealth`. Default is all three. |
| `states` | Two letter state codes, for example `NY`. Empty means the whole country. |
| `city` | Exact city name, case insensitive, for example `Wilmington`. |
| `nameContains` | Only facilities whose name contains this text. |
| `minOverallRating` | Keep facilities with an overall star rating at or above this value (1 to 5). 0 keeps everything, including unrated ones. |
| `maxResults` | Hard stop for the run. You are billed per result, so this caps the cost. |
| `proxyConfiguration` | Not needed for the CMS API. Apify proxy is optional. |

Example input:

```json
{
    "facilityTypes": ["nursingHome"],
    "states": ["NY", "NJ"],
    "nameContains": "manor",
    "minOverallRating": 4,
    "maxResults": 100
}
```

### Output

Every record has `id`, `facilityType`, `ccn`, `name`, `city`, `state`, `overallRating`, `ownershipType`, address and phone, plus the fields for its type. Nursing home example (trimmed):

```json
{
    "id": "nursingHome:085001",
    "facilityType": "nursingHome",
    "ccn": "085001",
    "name": "KENTMERE REHABILITATION AND HEALTHCARE CENTER",
    "city": "Wilmington",
    "state": "DE",
    "overallRating": 3,
    "healthInspectionRating": 3,
    "staffingRating": 4,
    "qualityMeasureRating": 3,
    "ownershipType": "Non profit - Other",
    "certifiedBeds": 104,
    "phone": "(302) 652-3311",
    "legalBusinessName": "KENTMERE HOME OF MERCIFUL REST SOCIETY INC.",
    "staffing": { "totalNurseHoursPerResidentDay": 4.50527, "totalNursingStaffTurnoverPct": 39.4 },
    "inspections": { "lastHealthSurveyDate": "2025-12-13", "healthDeficienciesLatestCycle": 5 },
    "penalties": { "numberOfFines": 1, "totalFinesUsd": 8278, "paymentDenials": 0 }
}
```

| Field | Meaning |
|---|---|
| `id` | Stable key (`type:ccn`), safe for deduplication between runs |
| `ccn` | CMS Certification Number of the facility |
| `overallRating` | Star rating from 1 to 5. Home health uses the quality of patient care rating in half steps. `null` when CMS does not rate the facility. |
| `staffing`, `inspections`, `penalties` | Nursing home detail groups |
| `measures` | Hospital measure counts (better, no different, worse than national) |
| `services`, `quality` | Home health services offered and outcome rates |
| `scrapedAt` | When the record was collected |

### Pricing

Pay per event: a small fee when a run starts, then a fixed price per result returned. You only pay for records that pass your filters. Set `maxResults` to cap any run.

### Limitations

- Covers facility level summaries. Individual inspection citations, individual owner names and doctor or clinician listings are not included.
- Hospital records have no coordinates because CMS does not publish them in that dataset.
- Data is as fresh as the latest CMS monthly refresh, shown in `dataProcessedDate` for nursing homes.
- The star rating filter excludes unrated facilities when set above 0.

### FAQ

**Is this legal?** The Actor reads data CMS publishes openly for any visitor without a login and stores only business information published for that purpose. You are responsible for how you use the data.

**Something is missing or broken?** Open an issue in the Issues tab; response time is usually under a day.

# Actor input Schema

## `facilityTypes` (type: `array`):

Which CMS provider datasets to read. Nursing homes include star ratings, staffing, inspections and fines. Hospitals include the overall star rating and measure counts. Home health agencies include quality star rating and outcome rates.

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

Two letter state codes, for example NY or TX. Leave empty for the whole country.

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

Exact city name, for example WILMINGTON. Leave empty for all cities.

## `nameContains` (type: `string`):

Only facilities whose name contains this text, for example MANOR or VALLEY.

## `minOverallRating` (type: `integer`):

Only facilities with an overall star rating at or above this value (1 to 5). 0 keeps everything, including unrated facilities.

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

Hard stop for the run. You are billed per result, so this caps the cost.

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

Not needed for the CMS API. Apify proxy is optional.

## Actor input object example

```json
{
  "facilityTypes": [
    "nursingHome",
    "hospital",
    "homeHealth"
  ],
  "states": [
    "DE"
  ],
  "minOverallRating": 0,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "facilityTypes": [
        "nursingHome",
        "hospital",
        "homeHealth"
    ],
    "states": [
        "DE"
    ],
    "minOverallRating": 0,
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("talcoe/cms-provider-data").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 = {
    "facilityTypes": [
        "nursingHome",
        "hospital",
        "homeHealth",
    ],
    "states": ["DE"],
    "minOverallRating": 0,
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("talcoe/cms-provider-data").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 '{
  "facilityTypes": [
    "nursingHome",
    "hospital",
    "homeHealth"
  ],
  "states": [
    "DE"
  ],
  "minOverallRating": 0,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call talcoe/cms-provider-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,talcoe/cms-provider-data"
        }
    }
}
```

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/2l89LcEWWzft5BsfB/builds/TKxMAOD4TCvUGWGgk/openapi.json
