CMS Provider Facilities Scraper (Medicare) icon

Lead generation

CMS Provider Facilities Scraper (Medicare)

Bulk-export US Medicare-certified healthcare facilities — nursing homes, hospitals, home health agencies, and hospices — from the official CMS Provider Data Catalog, with quality/star-rating columns included, filtered server-side by state or city.

Free Apify credit covers a first run. No credit card to try.

What this Actor scrapes

The CMS Provider Data Catalog (data.cms.gov/provider-data) is the federal government's authoritative directory of every Medicare-certified healthcare facility in the country — nursing homes, hospitals, home health agencies, and hospices — complete with address, phone, ownership, staffing, and the CMS 1-5 star quality ratings that drive Medicare's own "Care Compare" tool.

The catalog's own datastore-query API is public, but turning it into a reliable bulk export takes real engineering: each facility type publishes a *different* column set (a hospital record and a nursing-home record share almost no field names), the national datasets run past 450 000 rows, and a naive client either downloads entire CSVs or has to reverse-engineer the datastore's bracketed conditions[] filter syntax to query server-side. We did that reverse-engineering, curated four facility datasets behind one friendly dataset input, and hand you back one richly-typed row per facility — core columns normalised, everything else preserved in a typed extras map.

What we handle for you

  • 🔁 Real limit/offset pagination — the datastore API caps nothing on paper, but we page in bounded 500-row chunks and stop exactly when the server-reported match count is reached, so a broad query doesn't run away.
  • 🛡️ Retry with exponential backoff — on 408 / 429 / 5xx we back off (2s → 30s, capped) and honour Retry-After, up to 5 attempts per page, before surfacing an error.
  • 🧊 Per-item fault isolation — one malformed record in a page of 500 is logged and skipped; it never sinks the rest of the page.
  • 🧱 Pydantic-validated rows — a stable core (CCN, name, address, city, state, ZIP, phone) plus a typed extras map for every dataset-specific column (star ratings, ownership, bed counts, services offered). Nothing degrades to a bare, untyped dict.
  • 🌐 Proxy-ready — data.cms.gov is a public federal endpoint and direct routing works on most infrastructure; the Apify Proxy field is there when your network needs it.
  • 💰 You pay only for results that land. No data → no charge beyond the small run warm-up fee.

Use cases

  • Healthcare vendor sales lists — pull every nursing home or hospital in a state for a targeted outreach or prospecting list.
  • ESG / site-diligence screening — check quality ratings, ownership type, and inspection history before an acquisition or partnership.
  • Compliance & referral-network products — bulk-export by facility type and resell structured datasets to billing, credentialing, or referral tools.
  • Journalism & policy research — analyze facility quality, ownership concentration, or staffing trends by state.
  • Competitive intelligence — track how a chain's facilities rank across the CMS star-rating system.
  • Home health / hospice referral sourcing — build a state-scoped directory of agencies with services offered and quality scores.

Input

Paste this into the Apify Console, or send it as the run input over the API. Proxy settings are on by default; you rarely need to touch them.

FieldTypeRequiredWhat it does
dataset string no Which curated CMS Provider Data Catalog facility dataset to query.
state string no Two-letter US state abbreviation (e.g. CA, NY, TX). Filtered server-side by CMS — narrows the query before it ever leaves their datastore.
city string no City name to narrow results within the chosen state (e.g. Los Angeles).
maxResults integer no Maximum number of facility records to return. Hard cap 5000 per run — split by state for bigger pulls.
{
  "dataset": "nursing_homes",
  "state": "CA",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}

Output

One row per result, schema-validated before it is written. Export JSON, CSV, Excel or XML from the run, or read it over the API.

datasetccnnameaddresscitystatezip_codephoneextrasscraped_at

{
  "dataset": "nursing_homes",
  "ccn": "015009",
  "name": "BURNS NURSING HOME, INC.",
  "address": "701 MONROE STREET NW",
  "city": "RUSSELLVILLE",
  "state": "AL",
  "zip_code": "35653",
  "phone": "2563324110",
  "extras": {
    "overall_rating": "2",
    "ownership_type": "For profit - Corporation",
    "number_of_certified_beds": "57"
  },
  "scraped_at": "2026-08-26T00:00:00+00:00"
}

Pricing

EventPriceWhen
Actor start$0.20Once per run, covers warm-up and proxy session setup.
Result row$0.0040Per result written to the dataset.

You pay only for results that land. Cap any run with maxTotalChargeUsd. See pricing & billing for worked examples.

Limitations

  • Column sets differ per dataset — a hospital record and a nursing-home record share almost no raw field names. The stable core (CCN, name, address, city, state, ZIP, phone) is normalised; everything else lands in extras under its original CMS field name, which varies by dataset.
  • No email addresses — the Provider Data Catalog does not publish facility email addresses. Phone is included; email is not part of the public catalog.
  • US facilities only — the catalog covers Medicare-certified US facilities. International facilities are out of scope.
  • Data freshness — CMS refreshes each dataset on its own cadence (often quarterly for quality ratings). The scraped_at field marks when the Actor pulled it, not when CMS last updated the underlying record.
  • 5000-result hard cap per run — for a full-state pull larger than that, split by city or run multiple jobs and merge the datasets.

FAQ

Is this data public and legal to use?
Yes. The CMS Provider Data Catalog is a public federal dataset maintained by the Centers for Medicare & Medicaid Services, published under an open-data policy with no restrictions on use. This Actor queries the public datastore-query API documented at data.cms.gov/provider-data.
Why do the columns look different for hospitals vs. nursing homes?
CMS publishes each facility type as an independently maintained dataset with its own column set — a byproduct of decades of separate reporting programs (Nursing Home Compare, Hospital Compare, Home Health Compare, Hospice Compare) being consolidated under one catalog. This Actor normalises the columns every dataset shares (name, address, city, state, ZIP, phone) and preserves the rest in extras exactly as CMS names them.
How current is the data?
It depends on the dataset — CMS refreshes nursing-home and hospital quality ratings roughly quarterly; core facility listing data (address, phone) updates more often. Every dataset carries a processing_date-style field inside extras when CMS publishes one.
Can I filter by ZIP code or facility name?
Not server-side today — the datastore-query API's server-side filtering is verified for state and city. Filter by ZIP or name in your own pipeline after export, or open a feature request.
What does the CMS star rating mean?
CMS assigns a 1-5 star overall_rating (and category sub-ratings for health inspections, staffing, and quality measures) to nursing homes as part of its public Care Compare program. This Actor surfaces those ratings unmodified inside extras for the nursing_homes dataset.

Ready to run it?

Open the listing on Apify, paste the input above, and watch rows land. If it ever breaks, it is our problem before it is yours.

Related Actors

Teams that run this also run