# CMS Provider Ownership & Quality Change Report (`taroyamada/cms-provider-ownership-quality-change-report`) Actor

Monitor public CMS nursing-home facility snapshots for ownership and quality/rating changes, then receive source-linked alerts, portfolio reports, or compact exports. Baselines and unchanged checks emit zero rows and zero charges. Uses official data.cms.gov public APIs without a key or login and exc

- **URL**: https://apify.com/taroyamada/cms-provider-ownership-quality-change-report.md
- **Developed by:** [naoki anzai](https://apify.com/taroyamada) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 cms provider rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## CMS Provider Ownership & Quality Change Report

Healthcare strategy, provider-operations, and market-research teams provide facility CCNs, states, or public CMS system names.\
The Actor compares public CMS Provider Information and Ownership snapshots across recurring runs.\
The result is a source-linked ownership/quality change alert, portfolio report, or compact export; individual owner names and personal fields are excluded.

### Run the next report

- [Medicare Coverage Change Impact Report](https://apify.com/taroyamada/medicare-coverage-change-impact-report) for public national coverage document changes.
- [DailyMed Label Change Watch Report](https://apify.com/taroyamada/dailymed-label-change-watch-report) for public drug-label metadata and version changes.
- [Government Tender & Grants Monitor](https://apify.com/taroyamada/government-tender-grants-monitor) for public provider tender and grant opportunities.

### Store Quickstart

1. Start with `initialRunMode: "baseline_only"` and a stable `monitorKey`.
2. Provide at least one bounded watch using `facilityIds`, `states`, `systemNames`, `ownershipTypes`, or an overall-rating range.
3. Keep `emitUnchanged: false`. The first baseline and unchanged recurring runs emit **0 rows / 0 charge**.
4. After the baseline, run the same watch with `generateReport: true`. Only new or changed public facility snapshots produce billable output.

This Actor uses only the official CMS Provider Data Catalog API. It does not require an API key, login, cookie, patient data, or individual enrichment.

#### Example 1: A known facility portfolio

```json
{
  "watches": [{
    "id": "known-facilities",
    "facilityIds": ["015009", "015010"],
    "minOverallRating": 1,
    "maxOverallRating": 5
  }],
  "monitorKey": "known-facilities-monthly",
  "initialRunMode": "baseline_only",
  "generateReport": true,
  "emitExport": true,
  "emitUnchanged": false,
  "maxRecordsPerWatch": 50,
  "maxChargeUsd": 25
}
```

#### Example 2: A state quality portfolio

```json
{
  "watches": [{
    "id": "texas-quality-watch",
    "states": ["TX"],
    "minOverallRating": 1,
    "maxOverallRating": 2
  }],
  "monitorKey": "texas-low-rating-review",
  "initialRunMode": "baseline_only",
  "generateReport": true,
  "emitRawRows": false,
  "emitExport": false,
  "emitUnchanged": false,
  "maxRecordsPerWatch": 100,
  "maxChargeUsd": 25
}
```

#### Example 3: A public chain/system watch

```json
{
  "watches": [{
    "id": "system-watch",
    "systemNames": ["PRIME HEALTH CARE ENTERPRISES"],
    "ownershipTypes": ["For profit - Corporation"]
  }],
  "monitorKey": "system-ownership-quality-watch",
  "initialRunMode": "baseline_only",
  "includeOwnership": true,
  "includeQuality": true,
  "generateReport": true,
  "emitExport": true,
  "emitUnchanged": false,
  "maxRecordsPerWatch": 50,
  "maxChargeUsd": 25
}
```

### What you receive

- `cms-provider-ownership-quality-report`: grouped counts by change type, state, system, ownership type, and rating, plus source-linked facility evidence.
- `cms-provider-change-alert`: one alert for a new or changed public facility snapshot.
- `cms-provider-export`: compact JSON for downstream research or review workflows.
- `cms-provider-row`: optional low-priced normalized facility row when `emitRawRows` is enabled.

Provider output includes a CMS Certification Number, public facility name, state, public system name when present, public facility ownership type, rating fields, processing date, and aggregate organizational ownership signals. Individual-owner rows are excluded from normalization. It never returns individual owner names, owner addresses, telephone numbers, coordinates, patient data, or contact enrichment.

### Pricing and no-change behavior

| Event | Price | When it is emitted |
| --- | ---: | --- |
| `cms-provider-row` | $0.005 | Optional normalized row for a new or changed facility snapshot |
| `cms-provider-change-alert` | $0.25 | New or changed ownership/quality snapshot |
| `cms-provider-ownership-quality-report` | $10.00 | One grouped portfolio report for the selected changes |
| `cms-provider-export` | $6.00 | Optional source-linked JSON export |

The initial `baseline_only` run stores state without output. An unchanged recurring run emits zero rows and zero charge, even if `emitUnchanged` is accidentally true. `maxChargeUsd` is checked before delivery. Unknown event names, missing charge receipts, delivery failures, and state-save failures fail closed; state is committed only after billable rows are delivered successfully.

### Compliance and data boundary

- Official data.cms.gov Provider Data Catalog API only: [API documentation](https://data.cms.gov/provider-data/docs).
- Source datasets: [Provider Information](https://data.cms.gov/provider-data/dataset/4pq5-n9py) and [Ownership](https://data.cms.gov/provider-data/dataset/y2hd-n93e).
- Ownership is self-reported in the CMS source. The Actor compares public snapshots; it does not verify or interpret ownership control.
- Individual owner names and personal fields are deliberately removed. Do not use this Actor to identify, enrich, profile, or contact people.
- Ratings are descriptive CMS fields and are not a care recommendation, quality guarantee, legal finding, investment thesis, acquisition conclusion, or CMS endorsement.
- Verify the current CMS record and applicable professional guidance before making an operational decision.

### Support files

- [Source compliance](docs/source-compliance.md)
- [Competitive snapshot](docs/store-competitive-snapshot.md)
- [Integration guide](docs/integration-guide.md)
- [Sample output](docs/sample-output.json)
- [Thumbnail icon specification](docs/icon-spec.md)

# Actor input Schema

## `watches` (type: `array`):

Bounded recurring watches over the official CMS Provider Information and Ownership datasets.

## `monitorKey` (type: `string`):

Stable isolated state namespace for a recurring portfolio watch.

## `initialRunMode` (type: `string`):

baseline\_only stores the first snapshot for free; emit\_backfill emits current matches for an explicit first report.

## `includeOwnership` (type: `boolean`):

Include aggregate ownership type/role/percentage/date signals without owner names or personal fields.

## `includeQuality` (type: `boolean`):

Include public CMS rating and facility quality fields in the normalized record.

## `generateReport` (type: `boolean`):

Generate one descriptive ownership and quality report when a new or changed facility snapshot is found.

## `emitRawRows` (type: `boolean`):

Emit low-priced normalized facility rows in addition to the change alert.

## `emitExport` (type: `boolean`):

Generate a compact source-linked export for downstream research workflows.

## `emitUnchanged` (type: `boolean`):

Accepted for compatibility, but unchanged snapshots always remain zero rows and zero charge.

## `maxRecordsPerWatch` (type: `integer`):

Maximum matching provider facilities retained per watch.

## `maxOwnershipRowsPerWatch` (type: `integer`):

Maximum ownership records requested per bounded facility chunk.

## `maxChargeUsd` (type: `number`):

Fail closed before delivery if planned PPE charges exceed this cap.

## `dryRun` (type: `boolean`):

Return representative rows for all configured event types without CMS requests, state writes, or charges.

## Actor input object example

```json
{
  "watches": [
    {
      "id": "al-quality-portfolio",
      "states": [
        "AL"
      ],
      "minOverallRating": 1,
      "maxOverallRating": 5
    }
  ],
  "monitorKey": "cms-provider-ownership-quality-watch",
  "initialRunMode": "baseline_only",
  "includeOwnership": true,
  "includeQuality": true,
  "generateReport": true,
  "emitRawRows": false,
  "emitExport": false,
  "emitUnchanged": false,
  "maxRecordsPerWatch": 100,
  "maxOwnershipRowsPerWatch": 1500,
  "maxChargeUsd": 25,
  "dryRun": false
}
```

# 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 = {
    "watches": [
        {
            "id": "al-quality-portfolio",
            "states": [
                "AL"
            ],
            "minOverallRating": 1,
            "maxOverallRating": 5
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("taroyamada/cms-provider-ownership-quality-change-report").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 = { "watches": [{
            "id": "al-quality-portfolio",
            "states": ["AL"],
            "minOverallRating": 1,
            "maxOverallRating": 5,
        }] }

# Run the Actor and wait for it to finish
run = client.actor("taroyamada/cms-provider-ownership-quality-change-report").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 '{
  "watches": [
    {
      "id": "al-quality-portfolio",
      "states": [
        "AL"
      ],
      "minOverallRating": 1,
      "maxOverallRating": 5
    }
  ]
}' |
apify call taroyamada/cms-provider-ownership-quality-change-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,taroyamada/cms-provider-ownership-quality-change-report"
        }
    }
}

```

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/6y76OsHuysq8FvlKc/builds/E24kVu7DsFDbbXFlR/openapi.json
