CMS Hospital Quality Ratings Scraper
Pricing
Pay per event
CMS Hospital Quality Ratings Scraper
🏥 Extract CMS hospital ratings, ownership, emergency services, contact info, and quality measure summaries from public Provider Data.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 hours ago
Last modified
Categories
Share
Extract public CMS hospital quality ratings, facility contact data, ownership details, emergency-services flags, and quality-measure summaries from the official CMS Provider Data API.
What does CMS Hospital Quality Ratings Scraper do?
CMS Hospital Quality Ratings Scraper turns the public CMS Hospital Compare / Provider Data JSON into clean Apify datasets.
It helps you collect:
- 🏥 Hospital names and CMS facility IDs
- 📍 Addresses, cities, states, ZIP codes, and counties
- ☎️ Phone numbers
- 🏢 Hospital type and ownership
- 🚑 Emergency services availability
- ⭐ CMS overall hospital star rating
- 📊 Mortality, safety, readmission, patient experience, and timely care measure summaries
- 🔗 Source dataset URL for audit trails
The actor uses the public CMS Provider Data API, not browser automation.
Who is it for?
Healthcare analysts can use it to compare hospital quality across regions.
Market researchers can build facility lists by state, city, ownership, or hospital type.
B2B healthcare teams can enrich hospital account lists with CMS quality context.
Journalists can quickly export public quality ratings for local reporting.
Consultants can monitor public hospital quality data without manually downloading spreadsheets.
Developers can pipe structured CMS hospital records into databases, CRMs, dashboards, or notebooks.
Why use this actor?
CMS publishes useful open data, but the raw API is not always convenient for business workflows.
This actor adds:
- Simple location filters
- Hospital type and ownership filters
- Star rating threshold filters
- Consistent field names
- Apify dataset export formats
- Pay-per-result charging
- API-friendly execution from Apify clients
Source data
The actor currently uses CMS Provider Data dataset xubh-q36u.
Source dataset:
https://data.cms.gov/provider-data/dataset/xubh-q36u
API endpoint family:
https://data.cms.gov/provider-data/api/1/datastore/query/xubh-q36u/0
Data you can extract
| Field | Description |
|---|---|
facilityId | CMS facility identifier |
facilityName | Hospital name |
address | Street address |
city | City |
state | Two-letter state |
zipCode | ZIP code |
county | County or parish |
phone | Telephone number |
hospitalType | CMS hospital type |
ownership | CMS ownership category |
emergencyServices | Whether emergency services are reported |
overallRating | CMS overall star rating as a number when available |
safetyBetterCount | Count of safety measures better than comparison group |
readmissionBetterCount | Count of readmission measures better than comparison group |
sourceDatasetUrl | CMS source URL |
scrapedAt | Export timestamp |
How much does it cost to extract CMS hospital quality ratings?
This Actor uses pay-per-event pricing: a $0.005 run-start fee plus a per-hospital record fee.
| Plan tier | Price per hospital record | Approx. 1,000 records |
|---|---|---|
| Free | $0.000031382 | $0.031 |
| Starter / Bronze | $0.000027289 | $0.027 |
| Scale / Silver | $0.000021285 | $0.021 |
| Business / Gold | $0.000016373 | $0.016 |
| Platinum | $0.000010916 | $0.011 |
| Diamond | $0.000010000 | $0.010 |
The default run is intentionally small and uses maxItems: 20 so first tests stay inexpensive.
Use a larger maxItems only when you are ready to export more hospitals.
Quick start
- Open the actor on Apify.
- Choose one or more states.
- Optionally add city, ZIP, hospital type, ownership, emergency-services, or rating filters.
- Set
maxItems. - Run the actor.
- Export results from the dataset as JSON, CSV, Excel, XML, or RSS.
Example input
{"states": ["CA"],"hospitalTypes": ["Acute Care Hospitals"],"emergencyServices": "any","minOverallRating": 4,"includeStarRatings": true,"includeQualityMeasures": true,"maxItems": 100}
Input fields
states
Two-letter US state abbreviations.
Leave empty to search all states.
cities
Case-insensitive city names.
Use this to focus on one metro area.
zipCodes
Exact ZIP code filters.
hospitalTypes
CMS hospital type filters.
Examples include:
Acute Care HospitalsCritical Access HospitalsChildrensPsychiatric
Partial matches are supported.
ownershipTypes
CMS ownership filters.
Examples include:
Voluntary non-profitProprietaryGovernment
Partial matches are supported.
emergencyServices
Choose any, yes, or no.
minOverallRating
Optional minimum CMS overall hospital star rating from 1 to 5.
Hospitals without a numeric rating are excluded when this filter is set.
includeStarRatings
Include overall star rating fields.
includeQualityMeasures
Include quality measure count summaries.
maxItems
Maximum number of matching hospitals to save.
Output example
{"facilityId": "050026","facilityName": "GROSSMONT HOSPITAL","address": "5555 GROSSMONT CENTER DRIVE BOX 58","city": "LA MESA","state": "CA","zipCode": "91942","county": "SAN DIEGO","phone": "(619) 465-0711","hospitalType": "Acute Care Hospitals","ownership": "Government - Hospital District or Authority","emergencyServices": "Yes","overallRating": 4,"sourceDatasetUrl": "https://data.cms.gov/provider-data/dataset/xubh-q36u"}
Filtering tips
Start broad, then narrow.
For example, run a state export first, then add city, ownership, or rating filters.
Use partial ownership filters like Government or Voluntary non-profit when you do not know the exact CMS label.
Use minOverallRating for ranked shortlists.
Leave quality measures off if you only need facility contact fields.
Common workflows
Regional hospital benchmark
Export hospitals in one state with includeQualityMeasures: true and compare safety, mortality, and readmission summaries.
Hospital lead enrichment
Filter by state, city, or ZIP and join the CMS facility ID back to your CRM.
Public data monitoring
Schedule the actor monthly to track CMS Provider Data changes over time.
Journalism and civic research
Export local hospitals and cite the official CMS dataset URL included in every row.
Integrations
You can connect the dataset to:
- Google Sheets
- Airtable
- Snowflake
- BigQuery
- PostgreSQL
- Power BI
- Tableau
- Python notebooks
- internal healthcare data warehouses
Use Apify webhooks to trigger downstream jobs when each run finishes.
API usage with Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('automation-lab/cms-hospital-quality-ratings-scraper').call({states: ['CA'],minOverallRating: 4,maxItems: 100});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
API usage with Python
from apify_client import ApifyClientclient = ApifyClient('APIFY_TOKEN')run = client.actor('automation-lab/cms-hospital-quality-ratings-scraper').call(run_input={'states': ['CA'],'minOverallRating': 4,'maxItems': 100,})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(items)
API usage with cURL
curl -X POST "https://api.apify.com/v2/acts/automation-lab~cms-hospital-quality-ratings-scraper/runs?token=$APIFY_TOKEN" \-H 'Content-Type: application/json' \-d '{"states":["CA"],"minOverallRating":4,"maxItems":100}'
MCP integration
Use this actor through the Apify MCP server in Claude Desktop or Claude Code.
MCP server URL:
https://mcp.apify.com/?tools=automation-lab/cms-hospital-quality-ratings-scraper
Claude Code setup command:
$claude mcp add apify-cms-hospital-quality-ratings --transport http "https://mcp.apify.com/?tools=automation-lab/cms-hospital-quality-ratings-scraper"
Claude Desktop JSON config example:
{"mcpServers": {"apify-cms-hospital-quality-ratings": {"url": "https://mcp.apify.com/?tools=automation-lab/cms-hospital-quality-ratings-scraper"}}}
Example prompts:
- "Run the CMS hospital quality ratings scraper for California acute care hospitals with at least 4 stars."
- "Export hospitals in Houston from CMS Provider Data and summarize their ownership types."
- "Find critical access hospitals in Montana and return their phone numbers and CMS ratings."
Scheduling
Hospitals and CMS quality fields can change as CMS updates Provider Data.
For monitoring, schedule a weekly or monthly run with the same filters.
Store each dataset export separately so you can compare changes over time.
Data freshness
The actor reads the live public CMS Provider Data API at run time.
Rows reflect whatever CMS currently serves from dataset xubh-q36u.
Every output row includes scrapedAt and sourceDatasetUrl.
Limitations
This actor does not scrape individual hospital websites.
It does not infer ratings that CMS does not publish.
It does not provide medical advice.
If CMS changes the dataset ID or field names, the actor will fail with a clear API/schema message rather than silently returning invented data.
Legality
The actor uses public CMS Provider Data endpoints.
You are responsible for using exported data in compliance with applicable laws, CMS terms, privacy rules, and your organization’s policies.
Do not use public quality data as the sole basis for clinical, financial, or patient-care decisions.
FAQ
Why did my run return zero hospitals?
Your filters may be too narrow.
Try removing city, ZIP, ownership, hospital type, or minimum rating filters.
Why is overallRating null?
CMS may not publish a numeric overall rating for that facility.
Use overallRatingRaw and overallRatingFootnote for context.
Why are quality measure fields missing?
Set includeQualityMeasures to true.
Related scrapers
Other Automation Lab actors can complement this dataset:
- https://apify.com/automation-lab/google-maps-reviews-scraper
- https://apify.com/automation-lab/website-contact-finder
- https://apify.com/automation-lab/business-website-scraper
Changelog
0.1
Initial version using the public CMS Provider Data API for hospital quality ratings.
Support
If you need additional CMS Provider Data fields, open an issue on the actor page with the target dataset and fields.