# Hospital Leads Scraper - CMS Star Ratings, Owners & ER (`flash_scraper/hospital-leads`) Actor

Hospital leads scraper for all 5,400+ Medicare-certified US hospitals from official CMS data: name, phone, address, hospital type, ownership, emergency department flag, CMS overall star rating, and how many mortality, safety and readmission measures beat or trail the national benchmark.

- **URL**: https://apify.com/flash\_scraper/hospital-leads.md
- **Developed by:** [Flash Scrape](https://apify.com/flash_scraper) (community)
- **Categories:** Lead generation, Business, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Hospital Leads Scraper - CMS Star Ratings, Owners & ER

Every registered US hospital from the CMS registry as a clean table: name, address, city, state, ZIP, county, phone and facility identifiers. Free to run - public record data, no key, no proxy.

- **Federal registry source** - CMS's public hospital file, not a scraped guess
- **Phones on the rows** - front-desk numbers as registered
- **25 stable columns**, filterable by state and type
- **Free** - this actor charges nothing per row

### Quick start

Open the actor, keep the defaults, press **Save & start**. The reference run below is exactly that. Then adjust the input for your own search and export **CSV, JSON or Excel** from the dataset tab - or call it from the API and read the dataset programmatically.

### A real row

Straight from a reference run, trimmed to the highlights:

```json
{
  "facility_id": "450054",
  "name": "BAYLOR SCOTT & WHITE MEDICAL CENTER - TEMPLE",
  "phone": "(254) 724-2111",
  "address": "2401 S  31ST ST",
  "city": "TEMPLE",
  "state": "TX",
  "zip_code": "76508",
  "county": "BELL",
  "hospital_type": "Acute Care Hospitals",
  "ownership": "Voluntary non-profit - Private",
  "emergency_services": true,
  "birthing_friendly": true
}
```

### How it works

One query to CMS's public registry per filter set; rows are federal records passed through, with column names normalized to this account's lead-table conventions.

### Every column, with measured fill

| Column | Filled on the reference run |
|---|---|
| `facility_id` | 100% |
| `name` | 100% |
| `phone` | 100% |
| `address` | 100% |
| `city` | 100% |
| `state` | 100% |
| `zip_code` | 100% |
| `county` | 100% |
| `hospital_type` | 100% |
| `ownership` | 100% |
| `emergency_services` | 100% |
| `birthing_friendly` | 72% |
| `overall_rating` | 82% |
| `mortality_measures_worse` | 96% |
| `mortality_measures_better` | 96% |
| `safety_measures_worse` | 90% |
| `safety_measures_better` | 90% |
| `readmission_measures_worse` | 98% |
| `readmission_measures_better` | 98% |
| `patient_experience_measures` | 94% |
| `timely_care_measures` | 98% |
| `measures_worse_than_national` | 100% |
| `measures_better_than_national` | 100% |
| `quality_tags` | 96% |
| `cms_profile_url` | 100% |

*A missing value is null; the column set never shifts, so your CSV import is stable across runs.*

### Input reference

| Field | Type | Default | Notes |
|---|---|---|---|
| `states` | array | \['TX'] | Two-letter state codes, e.g. \['TX','CA']. Empty = all 5,400+ hospitals. |
| `hospitalType` | string | any | CMS hospital category. |
| `ownership` | string | any | Who owns the hospital. |
| `minOverallRating` | integer | 0 | CMS overall rating 1-5. 0 = no filter. Note: many specialty hospitals carry no rating and are excluded by any  |
| `maxOverallRating` | integer | 0 | 0 = no filter. Set 2 to find hospitals under quality pressure. |
| `emergencyServicesOnly` | boolean | False | Excludes hospitals CMS records as having no emergency services. |
| `worseThanNationalOnly` | boolean | False | Keep only hospitals with at least one mortality, safety or readmission measure worse than the national average |
| `maxItems` | integer | 200 | Maximum number of hospitals to return. |

### Pricing

**Free to run** - no per-result charge.

### Use cases

- **Healthcare sales territories** - Every facility in a state, one CSV
- **Network analysis** - Ownership and facility-type mixes by county
- **Data enrichment** - Join by facility ID against your existing accounts

### Honest limits

We would rather say it here than have you find out on a paid run:

- Registry data updates on CMS's cycle, not daily
- Contacts are facility-level (front desk), not named administrators - pair with the NPI actor for provider-level contacts

### Scheduling & integrations

Every input works identically from the API, so this actor drops into schedules and pipelines: run it on an Apify **Schedule** for a recurring export, point a **webhook** at the finished run to push rows into Slack, Google Sheets (via Zapier/Make/n8n) or your warehouse, and page through the dataset with the standard Dataset API. Saved tasks keep your configuration one click away.

### FAQ

**Is this really free?**
Yes - public record data with trivial compute; it charges nothing per result.

**Emails?**
The registry carries no emails; phone and address are the contact surface.

### Related actors from this account

- [Npi Healthcare Leads](https://apify.com/flash_scraper/npi-healthcare-leads)
- [Nursing Home Leads](https://apify.com/flash_scraper/nursing-home-leads)
- [Email Verifier](https://apify.com/flash_scraper/email-verifier)

***

*Built by [Flash Scrape](https://apify.com/flash_scraper) - measured claims, stable columns, no API keys. Something missing? Open an issue on this actor and ask.*

***

### More from Flash Scrape

Same publisher, same rules: no API keys, pay per row, filters run before billing.

- [Multi Job Board Scraper](https://apify.com/flash_scraper/multi-jobboard-scraper) - LinkedIn, Indeed, Glassdoor and 9 more boards in one deduplicated table
- [Local Business Leads Scraper](https://apify.com/flash_scraper/local-business-leads) - local businesses in any category and city with MX-verified emails, phones and socials
- [Remote Jobs Aggregator](https://apify.com/flash_scraper/remote-job-aggregator) - 10 remote job boards in one feed, only-new-jobs monitoring
- [Creator Leads Scraper](https://apify.com/flash_scraper/creator-leads-scraper) - YouTube, TikTok and Instagram creator emails in one run

# Actor input Schema

## `states` (type: `array`):

Two-letter state codes, e.g. \['TX','CA']. Empty = all 5,400+ hospitals.

## `hospitalType` (type: `string`):

CMS hospital category.

## `ownership` (type: `string`):

Who owns the hospital.

## `minOverallRating` (type: `integer`):

CMS overall rating 1-5. 0 = no filter. Note: many specialty hospitals carry no rating and are excluded by any minimum.

## `maxOverallRating` (type: `integer`):

0 = no filter. Set 2 to find hospitals under quality pressure.

## `emergencyServicesOnly` (type: `boolean`):

Excludes hospitals CMS records as having no emergency services.

## `worseThanNationalOnly` (type: `boolean`):

Keep only hospitals with at least one mortality, safety or readmission measure worse than the national average - the quality-improvement target list.

## `maxItems` (type: `integer`):

Maximum number of hospitals to return.

## Actor input object example

```json
{
  "states": [
    "TX"
  ],
  "hospitalType": "any",
  "ownership": "any",
  "minOverallRating": 0,
  "maxOverallRating": 0,
  "emergencyServicesOnly": false,
  "worseThanNationalOnly": false,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "states": [
        "TX"
    ],
    "hospitalType": "any",
    "ownership": "any",
    "minOverallRating": 0,
    "maxOverallRating": 0,
    "emergencyServicesOnly": false,
    "worseThanNationalOnly": false,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("flash_scraper/hospital-leads").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "states": ["TX"],
    "hospitalType": "any",
    "ownership": "any",
    "minOverallRating": 0,
    "maxOverallRating": 0,
    "emergencyServicesOnly": False,
    "worseThanNationalOnly": False,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("flash_scraper/hospital-leads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "states": [
    "TX"
  ],
  "hospitalType": "any",
  "ownership": "any",
  "minOverallRating": 0,
  "maxOverallRating": 0,
  "emergencyServicesOnly": false,
  "worseThanNationalOnly": false,
  "maxItems": 100
}' |
apify call flash_scraper/hospital-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flash_scraper/hospital-leads"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iPsevdCbsWeKhcAh6/builds/yCwr8ZYDpwkzqyz5y/openapi.json
