US Hospitals Scraper - Ratings, Ownership & Quality
Pricing
from $12.75 / 1,000 results
US Hospitals Scraper - Ratings, Ownership & Quality
Scrape US Medicare-certified hospitals with CMS facility ID, address, phone, hospital type, ownership, emergency services, overall 5-star rating, mortality/safety/readmission measures and EHR status. Filter by state, city, ZIP, type, ownership and rating. Export to JSON, CSV or Excel.
Pricing
from $12.75 / 1,000 results
Rating
0.0
(0)
Developer
Scrapers Lat
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 days ago
Last modified
Categories
Share
US Hospitals Scraper - Ratings, Ownership & Quality
Here is one real result, with every field the actor returns:
{"facilityId": "050007","facilityName": "PENINSULA MEDICAL CENTER","address": "1501 TROUSDALE DRIVE","city": "BURLINGAME","state": "CA","zipCode": "94010","county": "SAN MATEO","phone": "(650) 696-5400","hospitalType": "Acute Care Hospitals","ownership": "Voluntary non-profit - Private","emergencyServices": true,"birthingFriendly": true,"overallRating": 5,"mortalityMeasuresCount": 8,"mortalityBetter": 2,"mortalityNoDifferent": 6,"mortalityWorse": 0,"safetyMeasuresCount": 7,"safetyBetter": 2,"safetyNoDifferent": 5,"safetyWorse": 0,"readmissionMeasuresCount": 11,"readmissionBetter": 0,"readmissionNoDifferent": 10,"readmissionWorse": 1,"patientExperienceMeasuresCount": 15,"timelyEffectiveCareMeasuresCount": 9,"url": "https://www.medicare.gov/care-compare/details/hospital/050007","aiSummary": "Peninsula Medical Center is a voluntary non-profit acute care hospital located in Burlingame, CA, offering emergency services and birthing facilities. It has an overall rating of 5 stars, indicating high-quality care.","aiQualitySummary": "Peninsula Medical Center has an overall star rating of 5, indicating high-quality care. While the hospital performs well in mortality and safety measures, with no measures worse than the national benchmark, it struggles with readmissions, having one measure worse than the benchmark. Overall, the hospital shows strengths in mortality and safety but needs to improve its readmission rates.","aiRisk": ["Readmission measures WORSE than benchmark: 1"],"aiRiskLevel": "medium","source": "CMS Hospitals","observedAt": "2026-08-14T07:15:33.030Z","cehrtId": "0015CMQ2CB5WY2U","meetsPromotingInteroperability": true,"ehrReportingStart": "01/01/2024","ehrReportingEnd": "12/31/2024"}
The most complete US hospital scraper available. It returns every field the CMS Hospital Care Compare dataset exposes for each hospital, from type and ownership to the overall star rating and measure-group breakdowns for mortality, safety, readmission, patient experience, and timely care, plus certified EHR details and optional AI summaries, and gives you filters to target exactly the hospitals you need.
📥 Input · 📤 Output · 💰 Pricing · ▶️ Examples
Table of contents
- What it does
- Quickstart
- Input reference
- Output reference
- Example output record
- Run via API and CLI
- Fetch results
- Billing and limits
- FAQ and troubleshooting
What it does
The actor reads the CMS Hospital dataset behind Medicare Care Compare, applies the filters you pass as input, and writes one normalized record per hospital to the run's dataset. Each record carries location and contact details, hospital type and ownership, whether it offers emergency services and holds the Birthing Friendly designation, the overall 5-star rating, and per-group counts of how many measures are better, no different, or worse than the national benchmark (mortality, safety, readmission), plus patient experience and timely-care measure counts. With includeEhr on, it also attaches the hospital's certified EHR ID, Promoting Interoperability status, and reporting period. Missing source values are returned as null, never invented.
Three optional paid AI add-ons layer on top: a hospital summary, a plain-English quality summary, and quality risk flags for low performers. Each is charged only when it produces usable output.
Quickstart
Open the actor, paste this into the input, and press Run. It returns 3 California hospitals with certified EHR details and AI summary, quality summary, and risk flags.
{"states": ["CA"],"maxHospitals": 3,"withAiSummary": true,"withAiQualitySummary": true,"withAiRisk": true,"birthingFriendlyOnly": false,"includeEhr": true}
Every input field is optional. With an empty input the actor returns California hospitals (default maxHospitals is 10). Combine states, hospitalTypes, ownershipTypes, and rating bounds to narrow the list.
Input reference
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
states | string[] | no | ["CA"] | Two-letter US state codes, for example CA, TX, NY. One run can scan several. |
cities | string[] | no | (any) | Filter by city, for example LOS ANGELES, HOUSTON. |
zipCodes | string[] | no | (any) | Filter by 5-digit ZIP code. |
counties | string[] | no | (any) | Filter by county or parish name, for example LOS ANGELES, HARRIS. |
nameContains | string | no | (empty) | Keep only hospitals whose name contains this text. |
hospitalTypes | string[] | no | (any) | Filter by hospital type, for example Acute Care Hospitals, Critical Access Hospitals. |
ownershipTypes | string[] | no | (any) | Filter by ownership type, for example Voluntary non-profit - Private, Government - State. |
emergencyServices | boolean | no | (any) | Set on to keep only hospitals with emergency services, off to keep only those without. Omit for any. |
birthingFriendlyOnly | boolean | no | false | Keep only hospitals that meet the CMS Birthing Friendly designation. |
minOverallRating | integer | no | (any) | Keep only hospitals with an overall 5-star rating at or above this value (1-5). |
maxOverallRating | integer | no | (any) | Keep only hospitals with an overall 5-star rating at or below this value (1-5). |
facilityIds | string[] | no | (any) | Look up specific hospitals by their CMS facility ID / CCN. |
includeEhr | boolean | no | true | When on, attach each hospital's certified EHR ID, Promoting Interoperability status, and reporting period. |
maxHospitals | integer | no | 10 | Maximum number of hospitals to collect. Free Apify plans are capped at 10. |
withAiSummary | boolean | no | false | Paid AI add-on. Concise summary of the hospital, type, ownership, and services. Charged only on usable AI output. Requires a paid Apify plan. |
withAiQualitySummary | boolean | no | false | Paid AI add-on. Plain-English summary of care quality from the star rating and measures. Charged only on usable AI output. Requires a paid Apify plan. |
withAiRisk | boolean | no | false | Paid AI add-on. Surface quality red flags for low performers. Charged only on usable AI output. Requires a paid Apify plan. |
Output reference
One dataset item per hospital. Types: string, integer, boolean, string[], or null when the source value is absent.
| Field | Type | Description |
|---|---|---|
facilityId | string | CMS facility ID / CCN (unique per hospital). |
facilityName | string | Hospital name. |
address | string | Street address. |
city | string | City. |
state | string | Two-letter state code. |
zipCode | string | ZIP code. |
county | string | County or parish. |
phone | string | Phone number. |
hospitalType | string | Hospital type, for example Acute Care Hospitals. |
ownership | string | Ownership type. |
emergencyServices | boolean | Offers emergency services. |
birthingFriendly | boolean | Holds the CMS Birthing Friendly designation. |
overallRating | integer | Overall CMS 5-star rating (1-5), or null. |
mortalityMeasuresCount | integer | Mortality measures reported. |
mortalityBetter | integer | Mortality measures better than the national benchmark. |
mortalityNoDifferent | integer | Mortality measures no different from national. |
mortalityWorse | integer | Mortality measures worse than national. |
safetyMeasuresCount | integer | Safety measures reported. |
safetyBetter | integer | Safety measures better than national. |
safetyNoDifferent | integer | Safety measures no different from national. |
safetyWorse | integer | Safety measures worse than national. |
readmissionMeasuresCount | integer | Readmission measures reported. |
readmissionBetter | integer | Readmission measures better than national. |
readmissionNoDifferent | integer | Readmission measures no different from national. |
readmissionWorse | integer | Readmission measures worse than national. |
patientExperienceMeasuresCount | integer | Patient experience measures reported. |
timelyEffectiveCareMeasuresCount | integer | Timely and effective care measures reported. |
cehrtId | string | Certified EHR technology ID, or null. Requires includeEhr. |
meetsPromotingInteroperability | boolean | Meets Promoting Interoperability (meaningful use), or null. Requires includeEhr. |
ehrReportingStart | string | EHR reporting period start, or null. Requires includeEhr. |
ehrReportingEnd | string | EHR reporting period end, or null. Requires includeEhr. |
url | string | Medicare Care Compare profile URL. |
aiSummary | string | AI hospital summary, or null unless the add-on is enabled. |
aiQualitySummary | string | AI quality summary, or null unless the add-on is enabled. |
aiRisk | string[] | AI quality red flags, empty array when none, or null unless enabled. |
aiRiskLevel | string | AI overall risk level (low, medium, high), or null. |
source | string | Data source. Always CMS Hospitals. |
observedAt | string | ISO 8601 timestamp of when the record was collected. |
error | string | Present only on a failed or empty run. A single item with a populated error field is written instead of results, and it is not charged. |
Example output record
Real record from a live run (input {"states": ["CA"], "maxHospitals": 3, "includeEhr": true, "withAiSummary": true, "withAiQualitySummary": true, "withAiRisk": true}):
{"facilityId": "050007","facilityName": "PENINSULA MEDICAL CENTER","address": "1501 TROUSDALE DRIVE","city": "BURLINGAME","state": "CA","zipCode": "94010","county": "SAN MATEO","phone": "(650) 696-5400","hospitalType": "Acute Care Hospitals","ownership": "Voluntary non-profit - Private","emergencyServices": true,"birthingFriendly": true,"overallRating": 5,"mortalityMeasuresCount": 8,"mortalityBetter": 2,"mortalityNoDifferent": 6,"mortalityWorse": 0,"safetyMeasuresCount": 7,"safetyBetter": 2,"safetyNoDifferent": 5,"safetyWorse": 0,"readmissionMeasuresCount": 11,"readmissionBetter": 0,"readmissionNoDifferent": 10,"readmissionWorse": 1,"patientExperienceMeasuresCount": 15,"timelyEffectiveCareMeasuresCount": 9,"url": "https://www.medicare.gov/care-compare/details/hospital/050007","aiSummary": "Peninsula Medical Center is a voluntary non-profit acute care hospital located in Burlingame, CA, offering emergency services and birthing facilities. It has an overall rating of 5 stars, indicating high-quality care.","aiQualitySummary": "Peninsula Medical Center has an overall star rating of 5, indicating high-quality care. While the hospital performs well in mortality and safety measures, with no measures worse than the national benchmark, it struggles with readmissions, having one measure worse than the benchmark. Overall, the hospital shows strengths in mortality and safety but needs to improve its readmission rates.","aiRisk": ["Readmission measures WORSE than benchmark: 1"],"aiRiskLevel": "medium","source": "CMS Hospitals","observedAt": "2026-08-14T07:15:33.030Z","cehrtId": "0015CMQ2CB5WY2U","meetsPromotingInteroperability": true,"ehrReportingStart": "01/01/2024","ehrReportingEnd": "12/31/2024"}
Run via API and CLI
Start a run and wait for it to finish, then read the dataset. Replace <TOKEN> with your Apify API token.
Run synchronously and get dataset items in one call:
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~cms-hospitals-scraper/run-sync-get-dataset-items?token=<TOKEN>" \-H "Content-Type: application/json" \-d '{"states":["TX"],"minOverallRating":4,"maxHospitals":50}'
Start a run asynchronously:
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~cms-hospitals-scraper/runs?token=<TOKEN>" \-H "Content-Type: application/json" \-d '{"states":["NY"],"birthingFriendlyOnly":true,"maxHospitals":100}'
Apify CLI:
apify call scrapers_lat/cms-hospitals-scraper \--input '{"facilityIds":["050007"]}'
Fetch results
Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing format:
# JSONcurl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"# CSVcurl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"# Paginate large datasetscurl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"
<DATASET_ID> is returned as defaultDatasetId in the run object. Use offset and limit to page through large result sets. clean=true drops empty and internal fields.
Billing and limits
- Pay per result. You are charged per hospital record returned (
resultevent). See the pricing tab for the current per-result price. - Paid AI add-ons.
ai_summary,ai_quality_summary, andai_riskare separate events, each billed only when they produce usable output. Leave them off to pay for results only. - No charge on failure. If a run errors or finds nothing, the actor writes a single item with a populated
errorfield and does not charge for it. Empty runs cost nothing. - Spend cap respected. Set
maxTotalChargeUsdon the run; once reached, the actor stops emitting and charging further billable results. - Free Apify plans are capped at 10 records per run. Upgrade for higher
maxHospitals.
FAQ and troubleshooting
A run returned 0 records. Why?
The filter combination matched nothing. Loosen filters (for example remove hospitalTypes or widen states), and confirm state codes and facility IDs. Zero-result runs are not charged.
How do I get only top-rated hospitals?
Set minOverallRating to 4 or 5. Combine with hospitalTypes or ownershipTypes to narrow further.
What are the measure count fields? CMS groups quality measures into mortality, safety, readmission, patient experience, and timely care. For mortality, safety, and readmission the actor returns how many measures are better, no different, or worse than the national benchmark, so you can gauge performance without opening the profile.
Why are the EHR fields null?
Either includeEhr was off, or CMS has no Promoting Interoperability record for that hospital. Missing source values are returned as null, never invented.
Do the AI add-ons need a paid plan? Yes. The AI summary, quality summary, and risk add-ons require a paid Apify plan and are charged only when they return usable output.
Is this an official Medicare or CMS tool? No. This actor is independent and has no affiliation with CMS or Medicare. It reads only data that is publicly available through Medicare Care Compare.
Related scrapers
- US Nursing Homes Scraper: CMS nursing home ratings, staffing, and inspections.
- US Home Health Agencies Scraper: CMS home health agency quality and ratings.
- US Dialysis Facilities Scraper: CMS dialysis facility chain, rating, and quality.
- CMS Open Payments Scraper: industry payments to physicians and teaching hospitals.
More scrapers at scrapers.lat
Built and maintained by scrapers.lat, where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at scrapers.lat.
Independent tool, not affiliated with CMS or Medicare. Accesses only publicly available Medicare Care Compare data.
