US Hospitals Scraper - Ratings, Ownership & Quality avatar

US Hospitals Scraper - Ratings, Ownership & Quality

Pricing

from $12.75 / 1,000 results

Go to Apify Store
US Hospitals Scraper - Ratings, Ownership & Quality

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

Scrapers Lat

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 days ago

Last modified

Share

US Hospitals Scraper - Ratings, Ownership & Quality

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

Apify Coverage Output Billing

Table of contents

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

FieldTypeRequiredDefaultDescription
statesstring[]no["CA"]Two-letter US state codes, for example CA, TX, NY. One run can scan several.
citiesstring[]no(any)Filter by city, for example LOS ANGELES, HOUSTON.
zipCodesstring[]no(any)Filter by 5-digit ZIP code.
countiesstring[]no(any)Filter by county or parish name, for example LOS ANGELES, HARRIS.
nameContainsstringno(empty)Keep only hospitals whose name contains this text.
hospitalTypesstring[]no(any)Filter by hospital type, for example Acute Care Hospitals, Critical Access Hospitals.
ownershipTypesstring[]no(any)Filter by ownership type, for example Voluntary non-profit - Private, Government - State.
emergencyServicesbooleanno(any)Set on to keep only hospitals with emergency services, off to keep only those without. Omit for any.
birthingFriendlyOnlybooleannofalseKeep only hospitals that meet the CMS Birthing Friendly designation.
minOverallRatingintegerno(any)Keep only hospitals with an overall 5-star rating at or above this value (1-5).
maxOverallRatingintegerno(any)Keep only hospitals with an overall 5-star rating at or below this value (1-5).
facilityIdsstring[]no(any)Look up specific hospitals by their CMS facility ID / CCN.
includeEhrbooleannotrueWhen on, attach each hospital's certified EHR ID, Promoting Interoperability status, and reporting period.
maxHospitalsintegerno10Maximum number of hospitals to collect. Free Apify plans are capped at 10.
withAiSummarybooleannofalsePaid AI add-on. Concise summary of the hospital, type, ownership, and services. Charged only on usable AI output. Requires a paid Apify plan.
withAiQualitySummarybooleannofalsePaid 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.
withAiRiskbooleannofalsePaid 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.

FieldTypeDescription
facilityIdstringCMS facility ID / CCN (unique per hospital).
facilityNamestringHospital name.
addressstringStreet address.
citystringCity.
statestringTwo-letter state code.
zipCodestringZIP code.
countystringCounty or parish.
phonestringPhone number.
hospitalTypestringHospital type, for example Acute Care Hospitals.
ownershipstringOwnership type.
emergencyServicesbooleanOffers emergency services.
birthingFriendlybooleanHolds the CMS Birthing Friendly designation.
overallRatingintegerOverall CMS 5-star rating (1-5), or null.
mortalityMeasuresCountintegerMortality measures reported.
mortalityBetterintegerMortality measures better than the national benchmark.
mortalityNoDifferentintegerMortality measures no different from national.
mortalityWorseintegerMortality measures worse than national.
safetyMeasuresCountintegerSafety measures reported.
safetyBetterintegerSafety measures better than national.
safetyNoDifferentintegerSafety measures no different from national.
safetyWorseintegerSafety measures worse than national.
readmissionMeasuresCountintegerReadmission measures reported.
readmissionBetterintegerReadmission measures better than national.
readmissionNoDifferentintegerReadmission measures no different from national.
readmissionWorseintegerReadmission measures worse than national.
patientExperienceMeasuresCountintegerPatient experience measures reported.
timelyEffectiveCareMeasuresCountintegerTimely and effective care measures reported.
cehrtIdstringCertified EHR technology ID, or null. Requires includeEhr.
meetsPromotingInteroperabilitybooleanMeets Promoting Interoperability (meaningful use), or null. Requires includeEhr.
ehrReportingStartstringEHR reporting period start, or null. Requires includeEhr.
ehrReportingEndstringEHR reporting period end, or null. Requires includeEhr.
urlstringMedicare Care Compare profile URL.
aiSummarystringAI hospital summary, or null unless the add-on is enabled.
aiQualitySummarystringAI quality summary, or null unless the add-on is enabled.
aiRiskstring[]AI quality red flags, empty array when none, or null unless enabled.
aiRiskLevelstringAI overall risk level (low, medium, high), or null.
sourcestringData source. Always CMS Hospitals.
observedAtstringISO 8601 timestamp of when the record was collected.
errorstringPresent 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:

# JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"
# CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
# Paginate large datasets
curl "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 (result event). See the pricing tab for the current per-result price.
  • Paid AI add-ons. ai_summary, ai_quality_summary, and ai_risk are 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 error field and does not charge for it. Empty runs cost nothing.
  • Spend cap respected. Set maxTotalChargeUsd on 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.

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.