# Nursing Home Leads - Ratings, Beds, Owners & Abuse Flags (`flash_scraper/nursing-home-leads`) Actor

Scrape all 14,600+ Medicare/Medicaid nursing homes from official CMS data: name, phone, address, certified beds, occupancy, ownership type, chain, 5-star overall/health/staffing/quality ratings, abuse flags and health-deficiency counts. Filter by state, beds, rating and ownership. No API key.

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

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## Nursing Home Leads — Ratings, Beds, Owners & Abuse Flags

**Every Medicare/Medicaid certified nursing home in the US — 14,600+ facilities — as a
qualified B2B list.** One row per facility with the **phone number**, address, county,
certified beds, average daily residents, **occupancy %**, ownership type, chain name and chain
size, all five CMS star ratings, the **abuse flag**, special-focus status, whether it
**changed owner in the last 12 months**, and optional health-deficiency counts.

**No API key, no login, no proxy.** Official CMS Provider Data Catalog.

### What you can do with it

- 📞 **Call the whole segment** — every row carries a real phone number straight from CMS.
- 🎯 **Sell to the right size** — `minBeds` plus `certified_beds` and `occupancy_pct` tell you
  which facilities are big enough, and which are struggling to fill beds.
- 🔁 **Catch new owners** — `recentOwnershipChangeOnly` is the strongest buying signal in this
  sector: a new operator replaces vendors, software and staffing partners.
- 🩺 **Find turnaround targets** — set `maxOverallRating: 2` for facilities under pressure, the
  usual list for staffing help, consultants and acquirers.
- 🏢 **Chains vs independents** — `chainFilter` matches how you actually sell: centrally to a
  119-facility chain, or one independent at a time.
- ⚠️ **Compliance & journalism** — `abuseFlaggedOnly`, `special_focus_status` and deficiency
  counts with worst severity.

### Input

| Field | Type | Description |
|---|---|---|
| `states` | array | Two-letter state codes, e.g. `["TX","CA"]`. Empty = all 14,600+ facilities. |
| `minBeds` | integer | Minimum certified beds. `0` = no filter. |
| `minOverallRating` | integer | Minimum CMS overall stars (1–5). `0` = no filter. |
| `maxOverallRating` | integer | Maximum CMS overall stars. Set `2` to find struggling facilities. |
| `ownership` | select | `for_profit`, `non_profit`, `government`, or any. |
| `chainFilter` | select | Chain-affiliated only, independents only, or any. |
| `abuseFlaggedOnly` | boolean | Only facilities carrying the CMS abuse icon. |
| `recentOwnershipChangeOnly` | boolean | Only facilities that changed owner in the last 12 months. |
| `includeDeficiencies` | boolean | Add deficiency count + worst severity per facility. |
| `maxItems` | integer | Max facilities (1–15000). |

#### Examples

Turnaround targets — big Texas facilities with poor ratings:

```json
{ "states": ["TX"], "minBeds": 100, "maxOverallRating": 2, "maxItems": 200 }
```

Fresh buying signals — facilities under new ownership in three states:

```json
{ "states": ["CA","FL","OH"], "recentOwnershipChangeOnly": true, "maxItems": 300 }
```

### Output (one row per facility)

`ccn`, `name`, `legal_business_name`, `phone`, `address`, `city`, `state`, `zip_code`,
`county`, `is_urban`, `certified_beds`, `avg_residents_per_day`, `occupancy_pct`,
`ownership_type`, `provider_type`, `inside_hospital`, `continuing_care_community`,
`chain_name`, `is_chain`, `chain_facility_count`, `chain_avg_overall_rating`,
`overall_rating`, `health_inspection_rating`, `staffing_rating`, `quality_measure_rating`,
`longstay_quality_rating`, `shortstay_quality_rating`, `abuse_flag`, `special_focus_status`,
`changed_owner_last_12_months`, `inspection_over_2_years_old`,
`sprinklers_in_all_required_areas`, `first_approved_date`, `opportunity_tags`,
`cms_profile_url`, plus `deficiency_count` and `worst_deficiency_severity` when enabled.

#### Sample row

```json
{
  "ccn": "455001",
  "name": "Avir at Beaumont",
  "phone": "(409) 842-4550",
  "city": "BEAUMONT",
  "state": "TX",
  "county": "Jefferson",
  "certified_beds": 214,
  "avg_residents_per_day": 104.4,
  "occupancy_pct": 48.8,
  "ownership_type": "Government - Hospital district",
  "chain_name": "AVIR HEALTH GROUP",
  "chain_facility_count": 119,
  "overall_rating": 1,
  "staffing_rating": 2,
  "health_inspection_rating": 2,
  "abuse_flag": true,
  "changed_owner_last_12_months": false,
  "opportunity_tags": [
    "low overall rating",
    "under 70% occupancy",
    "abuse flag"
  ]
}
```

`opportunity_tags` is derived, and every tag traces to one named field — no scoring black box.

### Honest notes

- **Filters are applied to the data, not by the API — on purpose.** Every numeric column in
  the CMS datastore is declared `type=text`, so the API's `>=` compares *lexically*: asking it
  for `beds >= 100` returns "57", "85" and "92". This actor therefore pages the data and filters
  in code, which is why `minBeds`/rating filters are exact.
- **Rare filters scan deep.** `recentOwnershipChangeOnly` genuinely is rare (1 of 1,165
  facilities in California), so the actor keeps paging a state until it has your rows or the
  state runs out, rather than sampling the first page and reporting nothing.
- **`occupancy_pct` is derived** from `avg_residents_per_day / certified_beds`. CMS publishes
  both; the ratio is the useful number and can exceed 100 or be null when either side is missing.
- **Ratings can be null.** New or recently-changed facilities have no CMS stars yet. A rating
  filter excludes them rather than guessing a value.
- **`ownership_type` is CMS's own wording** ("For profit - Corporation", "Government -
  Hospital district"), passed through verbatim rather than re-bucketed.
- **Deficiency counts are aggregated per state in bulk**, not per facility — the national file
  is 418k rows, so per-facility lookups would be thousands of calls for the same data.
- Data refreshes when CMS publishes; this actor always reads the current file.

# Actor input Schema

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

Two-letter US state codes, e.g. \['TX','CA']. Empty = every state (all 14,600+ facilities).

## `minBeds` (type: `integer`):

Only facilities with at least this many Medicare/Medicaid certified beds. Bed count is the standard proxy for facility size and budget. 0 = no filter.

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

CMS overall rating, 1 (worst) to 5 (best). 0 = no filter. Use 4+ to reach well-run facilities.

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

0 = no filter. Set to 2 to find struggling facilities - the usual target list for turnaround services, staffing help and acquisitions.

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

Restrict by who owns the facility.

## `chainFilter` (type: `string`):

Chains are bought centrally; independents are sold to one at a time. Pick whichever matches how you sell.

## `abuseFlaggedOnly` (type: `boolean`):

CMS marks facilities with an abuse icon. Useful for compliance, legal and journalism work.

## `recentOwnershipChangeOnly` (type: `boolean`):

A fresh owner is the strongest buying signal in this sector - new management replaces vendors, software and staffing partners.

## `includeDeficiencies` (type: `boolean`):

Adds each facility's health-inspection deficiency count and worst severity level from the CMS deficiencies file. Costs extra requests per state, so leave off for a fast list.

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

Maximum number of facilities to return.

## Actor input object example

```json
{
  "states": [
    "TX"
  ],
  "minBeds": 0,
  "minOverallRating": 0,
  "maxOverallRating": 0,
  "ownership": "any",
  "chainFilter": "any",
  "abuseFlaggedOnly": false,
  "recentOwnershipChangeOnly": false,
  "includeDeficiencies": 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"
    ],
    "minBeds": 0,
    "minOverallRating": 0,
    "maxOverallRating": 0,
    "ownership": "any",
    "chainFilter": "any",
    "abuseFlaggedOnly": false,
    "recentOwnershipChangeOnly": false,
    "includeDeficiencies": false,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("flash_scraper/nursing-home-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"],
    "minBeds": 0,
    "minOverallRating": 0,
    "maxOverallRating": 0,
    "ownership": "any",
    "chainFilter": "any",
    "abuseFlaggedOnly": False,
    "recentOwnershipChangeOnly": False,
    "includeDeficiencies": False,
    "maxItems": 100,
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ],
  "minBeds": 0,
  "minOverallRating": 0,
  "maxOverallRating": 0,
  "ownership": "any",
  "chainFilter": "any",
  "abuseFlaggedOnly": false,
  "recentOwnershipChangeOnly": false,
  "includeDeficiencies": false,
  "maxItems": 100
}' |
apify call flash_scraper/nursing-home-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flash_scraper/nursing-home-leads",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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