# CMS Nursing Home Compare — Star Ratings & Staffing (`compute-edge/cms-nursing-home-ratings-scraper`) Actor

Extract every Medicare/Medicaid certified nursing home from CMS Nursing Home Compare — 14,700+ facilities with 5-star ratings, staffing hours, deficiency outcomes, ownership, chain, abuse flags, special focus status, beds, and contact info.

- **URL**: https://apify.com/compute-edge/cms-nursing-home-ratings-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## CMS Nursing Home Compare — Star Ratings & Staffing Scraper

Extract the **complete CMS Nursing Home Compare provider directory** — over **14,700 Medicare and Medicaid certified nursing homes** in the United States — with the official **5-star ratings**, staffing hours per resident per day, health-inspection deficiency outcomes, ownership type, chain affiliation, abuse flags, special-focus status, and full facility contact info.

This is the regulator-grade data set the federal government uses to rank long-term care facilities. It is the gold standard for any business, attorney, family member, or researcher trying to evaluate, compare, or sell to skilled nursing facilities (SNFs).

### Data fields

| Field | Description |
|-------|-------------|
| `ccn` | CMS Certification Number — primary facility identifier |
| `providerName`, `legalBusinessName` | Facility name and legal owner name |
| `address`, `city`, `state`, `zipCode`, `county` | Location |
| `phone` | Facility telephone |
| `ownershipType` | For profit / Non profit / Government, plus structure (Corporation, LLC, Individual, etc.) |
| `providerType` | Medicare, Medicaid, or both |
| `certifiedBeds` | Number of CMS-certified beds |
| `avgResidentsPerDay` | Average daily census |
| `firstApprovedDate` | Date first approved for Medicare/Medicaid |
| `overallRating` | CMS overall 5-star rating |
| `healthInspectionRating`, `staffingRating`, `qmRating` | Component star ratings |
| `longStayQmRating`, `shortStayQmRating` | Long-stay vs short-stay quality measure ratings |
| `specialFocusStatus` | Special Focus Facility / SFF candidate designation |
| `abuseIcon` | CMS abuse icon flag |
| `sprinklersInAllRequiredAreas` | Fire safety |
| `chainName`, `chainId`, `chainFacilityCount`, `chainAvgOverallRating` | Ownership chain |
| `totalNurseStaffingHoursPerResidentPerDay` | Total nurse hours / resident / day |
| `rnStaffingHoursPerResidentPerDay`, `nurseAideStaffingHoursPerResidentPerDay` | Component staffing |
| `totalNursingStaffTurnoverPct`, `rnTurnoverPct`, `administratorsLeftCount` | Workforce stability |
| `changedOwnershipLast12Months`, `ccrc`, `inHospital`, `urban` | Operational context |

### How to scrape CMS nursing home data

1. *(Optional)* Set `state`, `city`, `county` to scope a region.
2. *(Optional)* Set `minOverallRating` to filter by quality (e.g. 4+ stars).
3. *(Optional)* Enable `specialFocusOnly` for the worst-performing CMS-flagged facilities.
4. *(Optional)* Enable `abuseIconOnly` for facilities currently flagged for abuse.
5. *(Optional)* Set `chainName` to find facilities owned by a specific chain.
6. *(Optional)* Set `ownershipType` to filter by `For profit`, `Non profit`, `Government`, etc.
7. Set `maxResults` (0 = unlimited).
8. Click **Start**.

### Pricing

Pay-per-result: **$0.003 per nursing home record**. Pulling the full directory (~14,700 facilities) costs about $44. Most users run state- or chain-scoped pulls of a few dozen to a few thousand records.

### Input example

```json
{
  "state": "FL",
  "minOverallRating": 4,
  "ownershipType": "Non profit"
}
````

### Output example

```json
{
  "ccn": "015009",
  "providerName": "BURNS NURSING HOME, INC.",
  "city": "RUSSELLVILLE",
  "state": "AL",
  "zipCode": "35653",
  "phone": "2563324110",
  "ownershipType": "For profit - Corporation",
  "certifiedBeds": 57,
  "overallRating": 2,
  "healthInspectionRating": 2,
  "staffingRating": 4,
  "qmRating": 4,
  "totalNurseStaffingHoursPerResidentPerDay": 4.04877,
  "totalNursingStaffTurnoverPct": 41.9
}
```

### Use cases

- **B2B sales to SNFs**: medical supply, food service, EHR / billing software, infection-control consultants, agency staffing, capital projects — segment by ownership type, chain, or rating tier.
- **Elder-law and personal-injury attorneys**: identify facilities with abuse flags, low staffing, or special focus status.
- **M\&A / private-equity targeting**: chain-level rollups by state with rating and staffing context.
- **Family decision-support apps**: compare facilities in a ZIP code by star rating and staffing.
- **Health policy research / journalism**: nationwide analysis of staffing turnover, ownership churn, deficiency patterns.

### FAQ

**How fresh is the data?** CMS refreshes Nursing Home Compare monthly. Each run hits the live API.

**Can I get historical ratings?** This Actor returns the current snapshot. For longitudinal analysis, run periodically and snapshot.

**Are inspection-citation details included?** Component scores and deficiency counts are included. Citation-level F-tags require a sibling CMS dataset; we can build that on request.

### Legal

Data sourced from data.cms.gov — the U.S. Centers for Medicare & Medicaid Services public Provider Data Catalog. All records are public by federal statute. No authentication bypass; no scraping of personally identifying resident data — this Actor returns facility-level records only.

# Actor input Schema

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

Filter by US state code (e.g. 'CA', 'TX', 'FL'). Leave blank for all states.

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

Exact city/town name match (uppercase).

## `county` (type: `string`):

Exact county/parish match.

## `providerName` (type: `string`):

Substring match against provider name.

## `ownershipType` (type: `string`):

Substring match. Examples: 'For profit', 'Non profit', 'Government', 'Corporation', 'Individual'.

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

Only include nursing homes with overall rating ≥ this value. 0 = no minimum.

## `specialFocusOnly` (type: `boolean`):

If enabled, return only Special Focus Facilities and SFF candidates (worst-performing homes flagged by CMS).

## `abuseIconOnly` (type: `boolean`):

If enabled, return only nursing homes flagged with the abuse icon.

## `sprinklersOnly` (type: `boolean`):

If enabled, only homes with sprinklers in all required areas.

## `chainName` (type: `string`):

Substring match for ownership chain name (e.g. 'Genesis', 'HCR ManorCare', 'Brookdale').

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

Maximum nursing-home records to return. 0 = unlimited (full directory is ~14,700).

## Actor input object example

```json
{
  "state": "",
  "city": "",
  "county": "",
  "providerName": "",
  "ownershipType": "",
  "minOverallRating": 0,
  "specialFocusOnly": false,
  "abuseIconOnly": false,
  "sprinklersOnly": false,
  "chainName": "",
  "maxResults": 500
}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("compute-edge/cms-nursing-home-ratings-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("compute-edge/cms-nursing-home-ratings-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call compute-edge/cms-nursing-home-ratings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=compute-edge/cms-nursing-home-ratings-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CMS Nursing Home Compare — Star Ratings & Staffing",
        "description": "Extract every Medicare/Medicaid certified nursing home from CMS Nursing Home Compare — 14,700+ facilities with 5-star ratings, staffing hours, deficiency outcomes, ownership, chain, abuse flags, special focus status, beds, and contact info.",
        "version": "0.1",
        "x-build-id": "6hdc49WfvXFcPKFnR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~cms-nursing-home-ratings-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-cms-nursing-home-ratings-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/compute-edge~cms-nursing-home-ratings-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-cms-nursing-home-ratings-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/compute-edge~cms-nursing-home-ratings-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-cms-nursing-home-ratings-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "state": {
                        "title": "State (two-letter)",
                        "type": "string",
                        "description": "Filter by US state code (e.g. 'CA', 'TX', 'FL'). Leave blank for all states.",
                        "default": ""
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "Exact city/town name match (uppercase).",
                        "default": ""
                    },
                    "county": {
                        "title": "County",
                        "type": "string",
                        "description": "Exact county/parish match.",
                        "default": ""
                    },
                    "providerName": {
                        "title": "Provider Name",
                        "type": "string",
                        "description": "Substring match against provider name.",
                        "default": ""
                    },
                    "ownershipType": {
                        "title": "Ownership Type",
                        "type": "string",
                        "description": "Substring match. Examples: 'For profit', 'Non profit', 'Government', 'Corporation', 'Individual'.",
                        "default": ""
                    },
                    "minOverallRating": {
                        "title": "Minimum Overall Star Rating (1–5)",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Only include nursing homes with overall rating ≥ this value. 0 = no minimum.",
                        "default": 0
                    },
                    "specialFocusOnly": {
                        "title": "Special Focus / SFF Candidate Only",
                        "type": "boolean",
                        "description": "If enabled, return only Special Focus Facilities and SFF candidates (worst-performing homes flagged by CMS).",
                        "default": false
                    },
                    "abuseIconOnly": {
                        "title": "Abuse Icon Only",
                        "type": "boolean",
                        "description": "If enabled, return only nursing homes flagged with the abuse icon.",
                        "default": false
                    },
                    "sprinklersOnly": {
                        "title": "Fully Sprinklered Only",
                        "type": "boolean",
                        "description": "If enabled, only homes with sprinklers in all required areas.",
                        "default": false
                    },
                    "chainName": {
                        "title": "Chain Name",
                        "type": "string",
                        "description": "Substring match for ownership chain name (e.g. 'Genesis', 'HCR ManorCare', 'Brookdale').",
                        "default": ""
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum nursing-home records to return. 0 = unlimited (full directory is ~14,700).",
                        "default": 500
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
