# CMS Care Compare Quality Scraper (`parselab/cms-care-compare-quality-scraper`) Actor

Get Medicare hospital star ratings with mortality, readmission, infection and patient survey measures, plus nursing home staffing, inspections and fines, home health, dialysis and hospice quality. Compared with state averages. Export to CSV or Excel.

- **URL**: https://apify.com/parselab/cms-care-compare-quality-scraper.md
- **Developed by:** [ParseLab](https://apify.com/parselab) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## CMS Care Compare Quality Scraper

Get Medicare Care Compare data for hospitals, nursing homes, home health agencies, dialysis facilities and hospices in clean rows you can export to CSV or Excel. A hospital row does not stop at the star rating: it carries the death rates, complication rates, readmission rates, infection ratios, patient survey results and Medicare spending that CMS publishes in many separate files, already joined and compared with the state average.

The data comes from the Centers for Medicare and Medicaid Services (CMS) Provider Data Catalog. It is public and refreshed by CMS every month or quarter. This Actor reads it on every run, so you always get the latest release, and it adds the comparisons and counts that people usually build by hand in a spreadsheet.

### What can you do with this CMS quality data scraper?

- List every hospital in a state with its overall star rating, type, ownership and emergency services.
- Find hospitals with a 4 or 5 star rating and a below average readmission rate for heart failure.
- Compare a hospital with the state average rating and count how many measures are better or worse than the national rate.
- Get infection ratios for central line, catheter, colon surgery, MRSA and C. diff infections for each hospital.
- Pull patient survey stars for nurse communication, doctor communication, cleanliness, quietness and overall rating.
- Rank nursing homes by nurse staffing hours per resident, RN hours, weekend staffing and staff turnover.
- Find nursing homes with a special focus status, an abuse citation or a recent change of ownership.
- Download every immediate jeopardy or actual harm inspection finding for the nursing homes in your state.
- List the largest nursing home fines since a given date, with the fine per bed.
- Compare dialysis facilities on survival, hospitalization, readmission and transplant waitlist rates.
- Compare home health agencies on timely care, walking and bathing improvement, readmissions and Medicare spending.

### Seven ways to collect data

| Mode | One row is | Best for |
|---|---|---|
| Hospitals with quality measures | one hospital | site selection, benchmarking, market reports |
| Nursing homes | one nursing home | staffing studies, lead lists, family research |
| Nursing home inspection findings | one citation | compliance, legal research, news stories |
| Nursing home fines and penalties | one fine | enforcement tracking, chain risk |
| Home health agencies | one agency | referral partners, quality comparison |
| Dialysis facilities | one facility | network analysis, patient guidance |
| Hospices | one hospice | quality comparison, referral planning |

### What data do you get for a hospital?

- Facility ID, name, address, county, phone, type, ownership, emergency services and birthing friendly designation.
- Overall star rating plus the number of measures that are better, the same or worse than the national rate for mortality, safety and readmission.
- Death rates for heart attack, heart failure, pneumonia, COPD, stroke and bypass surgery, and the hospital wide mortality rate.
- Complication and safety indicators (PSI), hip and knee complication rate, and readmission rates by condition.
- Infection ratios (SIR) for central line, catheter, colon surgery, hysterectomy, MRSA and C. diff, each with the comparison to the national benchmark.
- Medicare spending per beneficiary ratio, emergency department wait times and sepsis, stroke and vaccination care measures.
- Patient survey star ratings and top box percentages, the number of completed surveys and the response rate.
- Value based purchasing score, hospital acquired condition score and excess readmission ratios by condition.
- Derived fields: state average rating, rating compared with the state, national average, better and worse measure counts, and the number of conditions with excess readmissions.

### What data do you get for a nursing home?

- Overall, health inspection, staffing and quality measure star ratings, long stay and short stay quality ratings.
- Certified beds, average residents per day, occupancy, ownership, legal business name and chain details.
- Nurse aide, LPN, RN and total nurse hours per resident per day, weekend hours and case mix adjusted hours.
- Nursing staff turnover, RN turnover and the number of administrators who left.
- Latest and previous survey dates and deficiency counts, infection control citations and weighted health survey score.
- Fines, total fine amount, payment denials, special focus status and abuse citation flag.
- Derived fields: state average rating, rating compared with the state, nurse hours percentile across the country, fines per bed and an optional count of harm and immediate jeopardy findings.

### Input example

Top rated hospitals in Texas, best first:

```json
{
    "mode": "hospitals",
    "states": ["TX"],
    "minRating": 4,
    "sortBy": "ratingHighToLow",
    "maxItems": 100
}
```

Immediate jeopardy findings at nursing homes in Ohio since the start of 2025:

```json
{
    "mode": "nursingHomeDeficiencies",
    "states": ["OH"],
    "minSeverity": "J",
    "dateFrom": "2025-01-01"
}
```

### Output example

A real hospital row, shortened:

```json
{
    "facilityId": "530012",
    "name": "BANNER WYOMING MEDICAL CENTER",
    "city": "CASPER",
    "state": "WY",
    "overallRating": 2,
    "clabsiSir": 0.208,
    "clabsiSirVsNational": "No Different than National Benchmark",
    "medicareSpendingPerBeneficiaryRatio": 1.04,
    "patientSurveyStarRating": 2,
    "ratedNineOrTenPct": 56,
    "valueBasedPurchasingTotalScore": 15.25,
    "stateAverageRating": 3.38,
    "ratingVsStateAverage": -1.38
}
```

A real inspection finding row, shortened:

```json
{
    "ccn": "535049",
    "name": "Life Care Center of Casper",
    "surveyDate": "2026-07-16",
    "scopeSeverityCode": "K",
    "scope": "pattern",
    "severityLabel": "Immediate jeopardy",
    "immediateJeopardy": true,
    "daysToCorrect": 26
}
```

### How much does it cost?

You pay for each row returned, and the price per row drops with higher Apify subscription plans. Free accounts can test the Actor with up to 10 rows per run. A full state list of hospitals with all measures usually finishes in under a minute.

### Frequently asked questions

**How often is the data updated?**
CMS updates hospital data every quarter and nursing home data every month. The Actor always reads the latest release and shows the data date in nursing home rows.

**What does the scope and severity letter mean?**
Inspectors grade each finding from A to L. D and above means more than minimal harm, G and above means actual harm to a resident, and J, K and L mean immediate jeopardy. The scope tells you if it was isolated, a pattern or widespread.

**Why are some measures empty?**
CMS hides a measure when the hospital has too few cases. These values are returned as null, never as text, so your spreadsheet formulas keep working.

**Can I look up one provider?**
Yes. Enter its CMS Certification Number in provider IDs, or use the name filter.

**Do I need to turn off the measures to go faster?**
For a plain list of hospitals or hospices, switch off the quality measures option.

### Limits

The Actor does not show doctor or clinician ratings, and it does not give medical advice. Ratings and measures come from CMS and describe past performance. The data is public domain and published by the Centers for Medicare and Medicaid Services.

# Actor input Schema

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

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

Hospitals gives one row per hospital with the star rating and mortality, readmission, infection, patient survey and spending measures merged in. Nursing homes gives staffing, ratings, turnover and fines. Inspection findings and Penalties give one row per citation or fine. Home health, dialysis and hospice give one row per provider with their quality measures.

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

Two letter state codes such as TX or NY. Leave empty for the whole country.

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

Keep only providers in these cities, for example HOUSTON. Combine with a state for common city names.

## `zipCodes` (type: `array`):

Keep only providers in these five digit ZIP codes.

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

Keep only providers whose name contains this text, for example SUNRISE or MAYO.

## `providerIds` (type: `array`):

Look up specific providers by their six character CMS Certification Number, for example 530012.

## `minRating` (type: `integer`):

Keep only providers with at least this many stars (1 to 5). Providers without a rating are left out when you set it.

## `maxRating` (type: `integer`):

Keep only providers with at most this many stars. Use 2 to find the weakest providers.

## `ownershipContains` (type: `string`):

Keep only providers whose ownership type contains this text, for example For profit, Government or Non profit.

## `hospitalTypes` (type: `array`):

Hospitals mode only. Keep only these kinds of hospitals, for example Acute Care, Critical Access, Childrens or Psychiatric.

## `emergencyServicesOnly` (type: `boolean`):

Hospitals mode only.

## `birthingFriendlyOnly` (type: `boolean`):

Hospitals mode only. Keep hospitals with the CMS birthing friendly designation.

## `includeMeasures` (type: `boolean`):

Hospitals and hospices mode. Adds mortality, complications, readmissions, infections, patient survey, spending and timely care measures to each row. Turn it off for a fast list.

## `includeDeficiencySummary` (type: `boolean`):

Nursing homes mode only. Adds the number of inspection findings, harm findings, immediate jeopardy findings and infection control findings for each home. Adds about 30 seconds.

## `sortBy` (type: `string`):

Order of the provider rows.

## `minSeverity` (type: `string`):

Inspection findings mode only. CMS scope and severity letter: D and above is more than minimal harm, G and above is actual harm, J and above is immediate jeopardy.

## `onlyInfectionControl` (type: `boolean`):

Inspection findings mode only.

## `dateFrom` (type: `string`):

Inspection findings and penalties only. First survey or penalty date, written YYYY-MM-DD.

## `dateTo` (type: `string`):

Inspection findings and penalties only. Last survey or penalty date, written YYYY-MM-DD.

## `minFineUsd` (type: `integer`):

Penalties mode only. Keep only fines of at least this amount.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "hospitals",
  "emergencyServicesOnly": false,
  "birthingFriendlyOnly": false,
  "includeMeasures": true,
  "includeDeficiencySummary": false,
  "sortBy": "name",
  "onlyInfectionControl": 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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/cms-care-compare-quality-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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parselab/cms-care-compare-quality-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 '{
  "maxItems": 10
}' |
apify call parselab/cms-care-compare-quality-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/cms-care-compare-quality-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/o9c68Ebi8r0tIAo8w/builds/e8y685drPE6Ksfzzh/openapi.json
