# CMS Hospice Facilities (`nexgenwatch/cms-hospice-facilities`) Actor

A clean, structured roster of Medicare-certified hospice facilities in the United States, sourced live from the official CMS provider-data API (https://data.cms.gov) — the anonymous, documented Centers for Medicare & Medicaid Services endpoint.

- **URL**: https://apify.com/nexgenwatch/cms-hospice-facilities.md
- **Developed by:** [NexGen Watch](https://apify.com/nexgenwatch) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 facility records

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🔔 CMS Hospice Facilities

A clean, structured roster of Medicare-certified hospice facilities in the United States,
sourced live from the official **CMS provider-data API** (`https://data.cms.gov`) — the
anonymous, documented Centers for Medicare & Medicaid Services endpoint. One record per
facility, deduplicated on CMS Certification Number (CCN), with CMS's own fields carried
exactly as published.

Output is one `hospice_facility` row per result; billing is pay-per-event, the value event being one facility record (a $0.02 start fee per run, then $0.05 per facility record). Source: data.cms.gov.

No login, no API key and no CAPTCHA solving are involved: the source is read logged-out.

### 📊 Sample Output

[![CMS Hospice Facilities sample output — a table of real facility record rows (facility\_name, address, address\_line\_1, telephone) from run ZyToiyHaOxfdyOqLk on build 0.1.5](https://api.apify.com/v2/key-value-stores/8gLgXMBveEI1tTz1z/records/cms-hospice-facilities-sample)](https://apify.com/nexgenwatch/cms-hospice-facilities?fpr=2ayu9b)

Real rows from run `ZyToiyHaOxfdyOqLk` on build 0.1.5 (2026-09-18), the same input as the Quick start below — every value is as the source published it (emails masked, long text shortened):

| facility\_name | address | address\_line\_1 | telephone | ownership\_type | certification\_date |
|---|---|---|---|---|---|
| AGAVE HOSPICE AND PALLIATIVE CARE | 4050 EAST GREENWAY ROAD SUITE 1, - | 4050 EAST GREENWAY ROAD SUITE 1 | (602) 855-3500 | For-Profit | 2022-04-07 |
| FAMILY FIRST HOSPICE, INC | 11225 N 28TH DRIVE STE B111, - | 11225 N 28TH DRIVE STE B111 | (480) 482-1833 | For-Profit | 2022-03-30 |
| VITAL HC, INC | 4447 EAST BROADWAY ROAD SUITE 101, - | 4447 EAST BROADWAY ROAD SUITE 101 | (520) 278-5003 | For-Profit | 2022-06-03 |
| COPPER SKY HOSPICE LLC | 7600 NORTH 16TH STREET, SUITE 112, - | 7600 NORTH 16TH STREET, SUITE 112 | (602) 830-0605 | For-Profit | 2022-05-27 |
| OPTIMAL HOSPICE INC | 64 EAST BROADWAY ROAD, SUITE 200 OFFICE 278, - | 64 EAST BROADWAY ROAD, SUITE 200 OFFICE 278 | (623) 887-8837 | For-Profit | 2022-06-22 |
| CARE PLUS HOSPICE CARE, LLC | 10290 NORTH 92ND STREET SUITE 201, - | 10290 NORTH 92ND STREET SUITE 201 | (623) 476-9198 |  | 2022-07-01 |
| COPPER STATE HOSPICE INC | 1760 EAST RIVER ROAD SUITE 117, - | 1760 EAST RIVER ROAD SUITE 117 | (520) 612-2181 | For-Profit | 2022-07-14 |
| EXPERT HOSPICE CARE INC | 11811 N TATUM BLVD, STE 3031 RM 70, - | 11811 N TATUM BLVD, STE 3031 RM 70 | (602) 805-9400 | For-Profit | 2022-02-15 |

The run finished with the status message: `CAPPED: delivered 50 of at least 100 unique facilities (maxRecords=50) — a buyer-requested bound, not an outage. read 2 page(s), 0 duplicate CCNs collapsed. facility_record billable=50`

### ✅ What you get

Each row is flat JSON with these fields (from the dataset schema and the sample run; a field the source does not publish for a given row is `null`):

- `record_type` (string) — e.g. `hospice_facility`
- `ccn` (string/null) — e.g. `001500`
- `facility_name` (string/null) — e.g. `AGAVE HOSPICE AND PALLIATIVE CARE`
- `address` (string/null) — e.g. `4050 EAST GREENWAY ROAD SUITE 1, -`
- `address_line_1` (string/null) — e.g. `4050 EAST GREENWAY ROAD SUITE 1`
- `address_line_2` (string/null) — e.g. `-`
- `city` (string/null) — e.g. `PHOENIX`
- `state` (string/null) — e.g. `AZ`
- `zip_code` (string/null) — e.g. `85032`
- `county` (string/null) — e.g. `MARICOPA`
- `telephone` (string/null) — e.g. `(602) 855-3500`
- `cms_region` (string/null) — e.g. `9`
- `ownership_type` (string/null) — e.g. `For-Profit`
- `certification_date` (string/null) — e.g. `2022-04-07`
- `source` (string/null) — e.g. `cms-hospice-general-information`
- `source_url` (string/null) — e.g. `https://data.cms.gov/provider-data/dataset/yc9t-dgbk`
- `observed_at` (string/null) — e.g. `2026-09-18T05:51:15Z`
- `family_experience_rating` (string/null) — null in every sample row
- `quality_of_patient_care_star_rating` (string/null) — null in every sample row
- `hospice_care_index_score` (string/null) — null in every sample row
- `terminal` (string/null) — null in every sample row
- `pages_read` (integer/null) — null in every sample row
- `raw_seen` (integer/null) — null in every sample row
- `duplicates` (integer/null) — null in every sample row
- `unique_found` (integer/null) — null in every sample row
- `reported_total` (integer/null) — null in every sample row
- `delivered` (integer/null) — null in every sample row

**What you get**

One record per Medicare-certified hospice facility:

- `ccn` — CMS Certification Number
- `facility_name`
- `address`, `address_line_1`, `address_line_2`, `city`, `state`, `zip_code`, `county`
- `telephone`
- `cms_region`
- `ownership_type` — e.g. For-Profit, Non-Profit, Government
- `certification_date` — ISO `YYYY-MM-DD`
- quality fields (`family_experience_rating`, `quality_of_patient_care_star_rating`,
  `hospice_care_index_score`) — see the note below
- `source`, `source_url`, `observed_at`

**Quality fields are honest nulls**

The base CMS dataset for this roster ("Hospice - General Information") publishes facility
identity, location, and ownership — it does **not** publish per-facility quality measures.
Those quality fields are therefore carried as an explicit `null` on every record: an honest
absence, never inferred or filled in. CMS publishes hospice quality separately as long-form
per-measure rows (many rows per facility), which is a different shape and out of scope for a
one-record-per-facility roster.

Every run also writes a `RUN_RECEIPT` record to its key-value store with the source checks it made and the counts it charged — diagnostics never land in the paid dataset.

### ⚙️ Sample inputs

**1. Quick start — the Store example (this is what the sample above came from)**

```json
{
  "maxRecords": 50,
  "maxPages": 5,
  "pageLimit": 50
}
```

The sample run charged exactly: 1 × $0.02 apify-actor-start + 50 × $0.05 facility\_record = **$2.52** on the Free tier — every delivered row was billed.

**2. A smaller, narrowed run**

```json
{
  "maxRecords": 5,
  "maxPages": 5,
  "pageLimit": 50
}
```

Caps the run at 5 rows — about $0.27 on the Free tier ($0.02 start + 5 × $0.05).

**3. A full-size run**

```json
{
  "maxRecords": 2000,
  "maxPages": 5,
  "pageLimit": 50
}
```

Up to 2000 rows (the schema default for `maxRecords`) — about $100.02 on the Free tier ($0.02 start + 2000 × $0.05) if the source has that many.

### 🧾 JSON sample record

One real record from run `ZyToiyHaOxfdyOqLk`, exactly as it lands in the dataset (emails masked, long text shortened):

```json
{
  "record_type": "hospice_facility",
  "ccn": "001500",
  "facility_name": "AGAVE HOSPICE AND PALLIATIVE CARE",
  "address": "4050 EAST GREENWAY ROAD SUITE 1, -",
  "address_line_1": "4050 EAST GREENWAY ROAD SUITE 1",
  "address_line_2": "-",
  "city": "PHOENIX",
  "state": "AZ",
  "zip_code": "85032",
  "county": "MARICOPA",
  "telephone": "(602) 855-3500",
  "cms_region": "9",
  "ownership_type": "For-Profit",
  "certification_date": "2022-04-07",
  "source": "cms-hospice-general-information",
  "source_url": "https://data.cms.gov/provider-data/dataset/yc9t-dgbk",
  "observed_at": "2026-09-18T05:51:15Z",
  "family_experience_rating": null,
  "quality_of_patient_care_star_rating": null,
  "hospice_care_index_score": null
}
```

### 🔧 How it works

**Source.** The actor reads data.cms.gov — endpoints: `https://data.cms.gov/provider-data/api/1/datastore/query/`. Public pages and feeds only; nothing behind a login.

**Transport.** Plain HTTPS from the Apify platform, no proxy. robots.txt is read first and a disallowed path is never fetched. Pacing: `CRAWL_DELAY_SEC`=10.0.

**Terminal states.** A run ends NORMAL, CAPPED (your cap was reached), PARTIAL (something was withheld and the message says what), GENUINE\_EMPTY (the source was read and truly had nothing in scope) or BLOCKED (the source refused or changed shape — the run FAILS loud and bills nothing). A zero-row run is never reported as a silent success.

**Charging.** Each facility record is charged at the moment it is pushed (`facility_record`); a row that fails to charge is not delivered, so the dataset count always equals the charged count.

**Filtering**

Bound your run by `states`, `ownershipContains`, and `nameContains`. `maxRecords` caps the
number of records delivered (a buyer-requested bound on the count, never a block). A filtered
query that genuinely matches nothing succeeds and bills nothing.

**How it behaves**

The actor paginates the CMS datastore, honouring `data.cms.gov`'s stated `Crawl-delay: 10`
with a 10-second delay between pages. A source outage or a change in the API's response
shape stops the run loudly and charges nothing — an empty result is never delivered as a
success. A valid filtered query with no matches is a genuine empty result: it succeeds and
bills nothing.

**Data notes**

This data comes directly from CMS provider-data. Fields are carried as published and are not
independently verified.

**What is not done.** No login, no cookie or CAPTCHA bypass, no private or personal-account data, no browser automation.

### 💰 Pricing example

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Actor Start (`apify-actor-start`) | $0.02 | $0.02 | $0.02 | $0.02 |
| Facility Record (`facility_record`) | $0.05 | $0.04 | $0.04 | $0.03 |

Worked at the live Free-tier price:

- 8 facility records: $0.02 start + 8 × $0.05 = **$0.42**
- 25 facility records: $0.02 start + 25 × $0.05 = **$1.27**
- 2000 facility records: $0.02 start + 2000 × $0.05 = **$100.02**

A run that delivers zero rows charges the $0.02 start fee only. A BLOCKED run (source refused) fails loud and charges no value event. The start fee is charged once per GB of run memory; the default run memory is 4096 MB.

Yield on the sample run: `CAPPED: delivered 50 of at least 100 unique facilities (maxRecords=50) — a buyer-requested bound, not an outage. read 2 page(s), 0 duplicate CCNs collapsed. facility_record billable=50`. `maxRecords` is a hard ceiling on what is delivered and billed, never a target.

### ⚖️ Legal & ToS

This actor reads public, logged-out pages and feeds published by data.cms.gov. It collects only what the source publishes to any visitor, keeps to the source's robots rules (checked on every run), identifies itself, and does not access accounts, private data or anything behind authentication. Use the output in line with the source's terms and your local law; the intended use is B2B research and monitoring.

### ❓ FAQ

**Q: Do I need an API key or a login?**\
A: No. The source (data.cms.gov) is read logged-out; the input schema has no key field and the actor carries no secrets.

**Q: Why did my run return 0 rows?**\
A: Read the run's status message. GENUINE\_EMPTY means the source was read and had nothing in scope for your input; BLOCKED means the source refused and the run failed without billing a value event — retry later or narrow the input. A zero-row run bills the start fee only.

**Q: How many rows can one run return?**\
A: Up to `maxRecords` (default 2000). Raise the cap for a bigger run; you pay per delivered row.

**Q: How fresh is the data?**\
A: Every run reads the source live at run time; nothing is cached between runs. Put it on a schedule for a continuous feed.

**Q: What formats can I export?**\
A: The dataset downloads as JSON, CSV, Excel, XML or RSS from the run's Dataset tab or the Apify API, and any run can push to a webhook or integration.

**Q: How is this different from the other NexGen Watch actors actors?**\
A: Same output shape and billing model; this one covers data.cms.gov. The siblings under **Related Actors** cover the other sources or slices — run several on one schedule for a combined feed.

**Q: Are there rate limits?**\
A: The actor paces itself against the source (`CRAWL_DELAY_SEC`=10.0) and honours its robots rules; there is no per-buyer limit beyond your Apify plan's concurrency.

### 🆘 Troubleshooting

- **Run FAILED with BLOCKED** → the source refused the request or changed its page shape → nothing was billed beyond the start fee; retry after a while, and if it persists open an Issue with the run id.
- **Status says CAPPED** → your cap (`maxRecords`) was reached → raise it for a bigger run.
- **Input validation error on start** → a field is outside the schema's allowed values → start from the Quick start block and change one field at a time.
- **Run TIMED-OUT** → a very wide request on a slow day → raise the run timeout in Run options or narrow the input; what was delivered before the timeout is still in the dataset.

### 🔗 Related Actors

- [Brazil PNCP Tender Notices](https://apify.com/nexgenwatch/brazil-pncp-tender-notices?fpr=2ayu9b) — One structured registryrecord per record from the official public source, logged-out. Public, robots-honoured, keyless
- [CMS CLIA Laboratory Registry](https://apify.com/nexgenwatch/cms-clia-laboratory-registry?fpr=2ayu9b) — One structured registryrecord per record from the CMS Provider of Services File - Clinical Laboratories dataset (data.cms.gov data-api, ~681,000 rows…
- [CMS Dialysis Facilities](https://apify.com/nexgenwatch/cms-dialysis-facilities?fpr=2ayu9b) — A clean, structured roster of Medicare-certified dialysis facilities in the United States,
- [Czech ARES Company Registry](https://apify.com/nexgenwatch/czech-ares-company-registry?fpr=2ayu9b) — One structured registryrecord per record from the keyless ares.gov.cz REST economic-subjects API, logged-out. Public, logged-out, robots-honoured
- [Estonia Company Registry (bulk)](https://apify.com/nexgenwatch/estonia-company-registry-bulk?fpr=2ayu9b) — One structured registryrecord per record from the official public source, logged-out. Public, robots-honoured, keyless
- [Latvia Company Registry (bulk)](https://apify.com/nexgenwatch/latvia-company-registry-bulk?fpr=2ayu9b) — One structured registryrecord per record from the official public source, logged-out. Public, robots-honoured, keyless
- 🏢 **About NexGenData** — NexGen Watch is NexGenData's fleet of 256 public monitoring and lookup actors built on official sources, pay-per-result. Browse the catalog at [apify.com/nexgenwatch](https://apify.com/nexgenwatch?fpr=2ayu9b).

### ⭐ Found this useful?

If this actor saved you a manual check, a quick **[review on the Apify Store](https://apify.com/nexgenwatch/cms-hospice-facilities?fpr=2ayu9b)** helps other teams find it. Feature request or a source that changed? Open it from the **Issues** tab — every one is read.

# Actor input Schema

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

Only deliver facilities in these state codes (e.g. CA, TX). Empty = all states.

## `ownershipContains` (type: `array`):

Only deliver facilities whose ownership type matches one of these (e.g. For-Profit, Non-Profit, Government).

## `nameContains` (type: `array`):

Only deliver facilities whose name matches one of these strings.

## `maxRecords` (type: `integer`):

Upper bound on facility records delivered this run (a buyer-requested cap). Leave empty for the built-in ceiling.

## `maxPages` (type: `integer`):

Safety ceiling on datastore pages read.

## `pageLimit` (type: `integer`):

Rows requested per CMS datastore page (default 500).

## `crawlDelaySec` (type: `integer`):

Delay between datastore pages, honouring data.cms.gov robots.txt (Crawl-delay: 10). Default 10 seconds.

## `userAgent` (type: `string`):

Optional override for the identified contact User-Agent.

## Actor input object example

```json
{
  "states": [],
  "ownershipContains": [],
  "nameContains": [],
  "maxRecords": 50,
  "maxPages": 5,
  "pageLimit": 50,
  "crawlDelaySec": 10
}
```

# 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 = {
    "maxRecords": 50,
    "maxPages": 5,
    "pageLimit": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgenwatch/cms-hospice-facilities").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 = {
    "maxRecords": 50,
    "maxPages": 5,
    "pageLimit": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgenwatch/cms-hospice-facilities").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 '{
  "maxRecords": 50,
  "maxPages": 5,
  "pageLimit": 50
}' |
apify call nexgenwatch/cms-hospice-facilities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgenwatch/cms-hospice-facilities"
        }
    }
}
```

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/eswfnBJfjUlgcd6jL/builds/p2JMar1w9izA87x0z/openapi.json
