Microproduct data guidebeginner

CMS Nursing Home Compare

Medicare-certified nursing home ratings, staffing, and inspection records for building local long-term-care comparison tools.

At a glance

Difficulty
Beginner — comfortable for a first prototype
Size
Small · ≤0.2 GB
Formats
JSON, CSV
Access
API or Download
API key
Not required
Provider
Centers for Medicare & Medicaid Services
Updates
Monthly

From source to product signal

Test a product idea in four steps

Nursing Home Provider Information lists certified facilities with Five-Star ratings, staffing, and inspection dates. Start with one state and the stable dataset identifier. Ratings can be missing, inspections lag events, and a star rating is not a clinical recommendation.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the data

  1. 1.Open the Provider Information dataset and read the data dictionary.
  2. 2.Query the stable dataset identifier for a bounded page of facilities.
  3. 3.Preserve CMS Certification Number values as text.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.get(
    "https://data.cms.gov/provider-data/api/1/datastore/query/4pq5-n9py/0",
    params={
        "limit": 20,
        "conditions[0][property]": "state",
        "conditions[0][value]": "CA",
        "conditions[0][operator]": "=",
    },
    timeout=30,
)
response.raise_for_status()
homes = pd.DataFrame(response.json()["results"])
print(
    homes[
        [
            "cms_certification_number_ccn",
            "provider_name",
            "state",
            "overall_rating",
        ]
    ].head(20)
)
4

Test a useful signal

Compare nursing homes within one state

Summarize Five-Star ratings and staffing for facilities in one state.

  1. 01Filter records by state while preserving CMS Certification Numbers as text.
  2. 02Summarize overall ratings and report missingness before ranking facilities.
  3. 03Explain why inspection lag, missing ratings, and resident mix limit a quality comparison.

Dataset details

Centers for Medicare & Medicaid Services is a government source. Last verified 2026-08-18. Temporal coverage: current Medicare-certified nursing homes.

Theme

Health, Food & Safety

Domains

Health CareHealth ServicesLong-Term Care

Data types

TabularGeospatial

Tasks

Provider ComparisonGeographic AnalysisQuality Monitoring

Geography

United States

Formats

JSONCSV

Provider

Centers for Medicare & Medicaid Services

Data terms

CMS public-data principles