Medicare Hospital Compare Scraper avatar

Medicare Hospital Compare Scraper

Pricing

from $19.00 / 1,000 results

Go to Apify Store
Medicare Hospital Compare Scraper

Medicare Hospital Compare Scraper

Scrapes hospital quality star ratings and performance data from Medicare.gov's Hospital Compare tool. Returns each hospital as a row with overall rating, patient survey scores, and timely care metrics.

Pricing

from $19.00 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 hours ago

Last modified

Share

ParseForge

Medicare Hospital Compare Scraper

Scrape hospital quality star ratings and performance data from Medicare.gov's Hospital Compare tool. Get overall ratings, patient survey results, timely care metrics, and more for thousands of U.S. hospitals. Export to CSV, JSON, Excel, or XML.

Medicare.gov's Hospital Compare website lets you look up quality data for a single hospital at a time, but there is no bulk export. This Actor reads the public quality ratings directly, letting you filter by state, city, hospital type, and overall star rating, and returns every match in one consistent dataset.

Who uses itWhat they scrape Medicare.gov Hospital Compare for
Healthcare market analystsBenchmark hospital quality across a state or region for competitive reports.
Patient advocacy groupsIdentify top-rated hospitals in a community to guide patient referrals.
Health insurance product managersBuild provider networks based on objective quality and patient experience scores.
Academic researchersGather a clean dataset of hospital ratings for public health studies.

What it does

This Actor collects hospital quality ratings from Medicare.gov's Hospital Compare and returns each hospital as a flat row with its overall star rating and other performance measures.

  • πŸ₯ Quality ratings: overall star rating, patient survey summary, and timely and effective care scores.
  • πŸ—ΊοΈ Geographic filters: narrow results by U.S. state and city or town.
  • 🏷️ Hospital type filter: target Acute Care, Critical Access, Children's, Psychiatric, VA, and DoD facilities.
  • ⭐ Rating filter: pull only hospitals with a specific overall star rating, from 1 to 5 stars.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Medicare.gov Hospital Compare data

πŸ“Š Build a state quality dashboard.

A health policy analyst scrapes all hospitals in California with their overall ratings to populate a public-facing quality transparency dashboard.

πŸ” Find top-rated rural hospitals.

A patient advocate filters for Critical Access Hospitals with a 4- or 5-star rating in Montana to create a referral list for rural community members.

πŸ“‹ Audit a provider network.

An insurer pulls quality data for every in-network hospital to verify that members have access to highly rated facilities.

πŸŽ“ Support academic research.

A graduate student collects hospital ratings across multiple states to study the relationship between hospital type and patient experience scores.

Why choose this scraper

What you get
Official Medicare dataRatings come directly from CMS, the same source used for federal quality programs.
Bulk export readyGet a structured dataset instead of clicking through pages one hospital at a time.
Flexible filteringCombine state, city, type, and rating to build exactly the list you need.
No API key neededReads the public Hospital Compare pages, so there is no registration or approval process.

How it compares

No other Store actor targets Medicare.gov Hospital Compare the same way, so the honest comparison is with the alternatives teams actually weigh.

Medicare Hospital Compare ScraperBuild it in-houseBy hand
SetupRun it now, zero configDays of engineeringNone, but hours per pull
When Medicare.gov Hospital Compare changesMaintained for youYou fix itYou re-learn the page
Proxies, retries, anti-botBuilt inYour problemBrowser only
OutputFixed JSON schema, CSV/Excel exportWhatever you buildCopy-paste
CostPay per resultEngineering timeAnalyst hours

Configure the run

Drive the Actor with optional state, city, hospital type, and overall star rating filters, and set a maximum number of hospitals to collect. The Input tab lists every parameter.

A first run with the defaults:

{
"maxItems": 10
}

A larger pull:

{
"maxItems": 200
}

Pricing

Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.

Results collectedApproximate cost
100 results$2.10
1,000 results$21.00
10,000 results$210.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Medicare Hospital Compare Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Medicare.gov Hospital Compare through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/hospital-compare-medicare-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your state code is a valid two-letter abbreviation and that your city name matches exactly. Try removing filters one at a time to see which one is too restrictive.

The run stopped before collecting all hospitals.

Increase the Maximum hospitals setting. Free Apify accounts have a lower limit, so upgrade to a paid plan if you need more than the preview count.

Some hospitals are missing their star rating.

Not all hospitals report every measure to CMS. A missing rating means CMS did not have enough data to calculate a score for that facility.

The city filter is not returning the hospital I expect.

The city filter uses an exact match. Try a shorter version of the city name or check the hospital's listed city on Medicare.gov to confirm the spelling.

FAQ

QuestionAnswer
What data does this Actor return?It returns the overall hospital quality star rating, patient survey summary star rating, and scores for timely and effective care, along with hospital name, address, and type.
Can I filter by state?Yes. Use the State input field with a two-letter U.S. state code, like CA or TX, to limit results to one state.
How do I get only 5-star hospitals?Set the Overall Star Rating filter to '5' and the Actor will return only hospitals with that top rating.
Is this the official Medicare data?Yes. The Actor reads the public Hospital Compare pages on Medicare.gov, which are maintained by the Centers for Medicare & Medicaid Services.
Can I scrape all U.S. hospitals in one run?Yes. Leave the state and city filters empty, set a high maximum items count, and the Actor will collect data for hospitals nationwide.
What hospital types can I filter by?You can filter by Acute Care Hospitals, Critical Access Hospitals, Children's, Psychiatric, Veterans Health Administration, and Department of Defense facilities.
Does this include patient survey data?Yes. The patient survey summary star rating is included in the output, reflecting patient experience scores.
Do I need a Medicare.gov account?No. The Actor reads the publicly available Hospital Compare pages, so no login or account is required.
What export formats are supported?You can export your results to CSV, JSON, Excel, or XML from the Apify dataset tab.

Browse the full ParseForge collection for more scrapers.

πŸ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Centers for Medicare & Medicaid Services. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.