CMS Hospital Quality Data: Star Ratings, HCAHPS Scores, and Complication Rates via API
Pull CMS hospital quality metrics for 4,500+ US hospitals: overall star ratings, patient satisfaction scores, complication rates, and readmission rates. No API key required.
The actor referenced in this article. Pay only for results delivered.
The Centers for Medicare and Medicaid Services publishes quality data for every Medicare-certified hospital in the United States. Our CMS Hospital Quality actor pulls that data into structured JSON: overall star ratings, patient survey scores, complication rates, and readmission statistics for 4,500+ hospitals, filterable by state or city.
What you get per hospital
facility_name— hospital namefacility_id— CMS certification numbercityandstate— locationoverall_rating— 1 to 5 stars (overall quality rating)hcahps_score— patient experience summary scorehcahps_percentile— national percentile for patient satisfactioncomplication_rate— serious complication rate per 1,000 patientsreadmission_rate— 30-day unplanned readmission ratemortality_rate— 30-day mortality rate for key conditionspatient_volume— estimated annual patient volume where availablescraped_at— ISO timestamp
Python example
import requests, time
run = requests.post(
"https://api.apify.com/v2/acts/themineworks~cms-hospital-quality/runs",
headers={"Authorization": f"Bearer {APIFY_TOKEN}"},
json={
"state": "CA",
"maxResults": 200
}
)
run_id = run.json()["data"]["id"]
while True:
status = requests.get(
f"https://api.apify.com/v2/actor-runs/{run_id}",
headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
).json()["data"]["status"]
if status in ("SUCCEEDED", "FAILED"):
break
time.sleep(5)
hospitals = requests.get(
f"https://api.apify.com/v2/actor-runs/{run_id}/dataset/items",
headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
).json()
for h in hospitals:
print(h["facility_name"], h["city"], f"★{h['overall_rating']}")
Rank hospitals by patient satisfaction
import pandas as pd
df = pd.DataFrame(hospitals)
df = df[df["overall_rating"].notna()]
df["overall_rating"] = df["overall_rating"].astype(float)
top = df.nlargest(20, "hcahps_score")[
["facility_name", "city", "overall_rating", "hcahps_score", "hcahps_percentile"]
]
print(top.to_string())
Complication rate comparison
# Identify hospitals with both high ratings and low complication rates
df["complication_rate"] = pd.to_numeric(df["complication_rate"], errors="coerce")
high_quality = df[
(df["overall_rating"] >= 4) &
(df["complication_rate"] < df["complication_rate"].median())
].sort_values("hcahps_score", ascending=False)
print(f"{len(high_quality)} hospitals with 4+ stars and below-median complication rates")
Parameters
| Parameter | Default | Notes |
|---|---|---|
state | — | Two-letter state code (e.g. "TX") |
city | — | City name filter |
minRating | — | Minimum overall star rating (1-5) |
maxResults | 500 | Maximum hospitals to return |
Leave all filters empty to pull the full national dataset.
Use cases
Healthcare market research. Map hospital quality distribution across a metro area or state. Identify where top-performing and underperforming facilities cluster.
Site selection for health systems. Before acquiring or partnering with a facility, pull its quality trajectory over multiple years to assess operational risk.
Healthcare IT sales. Target hospitals with low HCAHPS scores or high readmission rates for solutions that address patient satisfaction or care coordination.
Insurance network design. Build a quality-weighted network by selecting hospitals above a rating threshold within each geography.
Journalism and public reporting. Create interactive hospital quality comparisons for consumer-facing publications without manual CMS portal exports.
Pricing
$0.003 per hospital. Empty queries are not charged.
Available on Apify.
Explore the scraper referenced in this article — see inputs, outputs, and pricing, then run it on Apify.
Airbnb Scraper: Listing Prices, Ratings, and Availability Without the API
Airbnb has no public listings API. Here's how to pull nightly price, rating, superhost status and coordinates from Airbnb search results using Python.
Maps Leads: Verified Email Extraction from Google Maps Business Listings
How to pull B2B leads from Google Maps with MX-verified emails, past the official API's 120-result cap, and pay only for contactable businesses.
Realtor.com Scraper: Property and Agent Data Without the MLS Paywall
Scrape Realtor.com listings in Python — price, beds, baths, county, and the listing agent + brokerage office on every record. No login, no API key.