# CMS Dialysis Facility Compare Scraper API - Quality Data (`pink_comic/cms-medicare-dialysis-facilities-quality-data`) Actor

Search and aggregate official CMS Medicare dialysis facility quality data by CCN, NPI, provider, geography, ownership, chain, modality, ESRD network, and measure. One paid item per facility preserves source measure names, values, IDs, years, provenance, and evidence limits.

- **URL**: https://apify.com/pink\_comic/cms-medicare-dialysis-facilities-quality-data.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Business, Lead generation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 cms dialysis facilities quality data scraper api evidence items

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 Medicare Dialysis Facilities Quality Data Scraper API

Search the official public CMS dialysis-facility quality dataset and receive **one paid item per CCN**, with repeated reporting-period measure rows aggregated into stable `measures` objects. Use it for provider-directory QA, dialysis market research, network analysis, quality-reporting research, and source-linked healthcare data workflows.

No CMS key, login, browser, or proxy is required.

### Search and filter

- Exact CMS Certification Number (`ccn`), NPI, or provider name
- Bounded provider-name keyword, state, and city candidates
- Ownership type, chain, dialysis modality, and ESRD network
- Measure-name and reported measure-value text, including suppression/unavailability labels
- Deterministic sort by provider name, CCN, or qualifying measure count
- `maxCandidates` bounds raw CMS measure rows; `maxResults` caps total aggregated facility items

Exact identifiers take source-query precedence. Clear the default CCN/provider fields before a broad search. Every result discloses the candidate bound and query scope.

### Fast deterministic default

```json
{
  "ccn": "012306",
  "providerName": "CHILDRENS HOSPITAL OF ALABAMA ESRD",
  "maxCandidates": 2000,
  "maxResults": 1
}
```

This returns Children's Hospital of Alabama ESRD with CCN `012306`, NPI and facility metadata, and non-empty source measure evidence. The maximum first-run charge is **$0.0021**: $0.0001 actor start plus one $0.002 facility item.

### More examples

```json
{
  "npi": "1720166085",
  "maxResults": 1
}
```

```json
{
  "state": "AL",
  "city": "BIRMINGHAM",
  "modality": "Peritoneal Dialysis",
  "measureName": "COVID",
  "sortBy": "measureCount",
  "sortDirection": "desc",
  "maxCandidates": 5000,
  "maxResults": 10
}
```

### Output

A found item includes CCN, provider name, city/state, ownership, ESRD network, NPI, chain, modality, alternate CCNs, and sorted `measures`. Each measure preserves the CMS name, reported value (from the current source's `Measure_Score`, with `Measure_Value` compatibility), measure ID, and reporting year. Repeated source rows do not create repeated paid facility items.

`NO_MATCH` and `SOURCE_UNAVAILABLE` are explicit stable-schema evidence items rather than silent empty datasets. A buyer charge cap is applied to the total facility count before the CMS request.

### Evidence and interpretation limits

CMS rows are reporting-period quality and administrative evidence. They are **not**:

- real-time Medicare certification or a current enrollment determination;
- proof of current ownership, chain affiliation, address, or service availability;
- a complete clinical history, facility inspection record, or patient-level record;
- clinical advice, a provider ranking, or a provider-quality guarantee;
- proof that a blank, suppressed, unavailable, or nonnumeric measure equals zero.

Measures can use different years, populations, denominators, suppression rules, and reporting semantics. Compare only measures whose CMS definitions and reporting periods support comparison. A bounded no-match does not prove that a facility does not exist or has closed. Confirm consequential decisions with CMS and the provider.

### Source

- Data API: `https://data.cms.gov/data-api/v1/dataset/f8610e87-ba25-43a3-a49e-927dbc8701ae/data`
- Dataset ID: `f8610e87-ba25-43a3-a49e-927dbc8701ae`
- Publisher: Centers for Medicare & Medicaid Services (CMS)

Pricing: **$0.0001 per start + $0.002 per aggregated facility item**.

# Actor input Schema

## `ccn` (type: `string`):

Exact six-digit CMS Certification Number.

## `npi` (type: `string`):

Exact ten-digit facility NPI. Clear CCN first.

## `providerName` (type: `string`):

Exact CMS provider name. Clear CCN first.

## `query` (type: `string`):

Case-insensitive provider-name keyword for bounded candidate searches.

## `state` (type: `string`):

Two-letter state abbreviation.

## `city` (type: `string`):

Exact city, case-insensitive.

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

Local case-insensitive ownership filter.

## `chain` (type: `string`):

Local case-insensitive chain filter.

## `modality` (type: `string`):

Filter hemodialysis/peritoneal-dialysis modality text.

## `network` (type: `string`):

Exact CMS ESRD network value, such as 08.

## `measureName` (type: `string`):

Keep only source measure rows whose name contains this text.

## `measureValue` (type: `string`):

Keep source measure rows by reported value/label. Suppressed or unavailable is not zero.

## `sortBy` (type: `string`):

Optional sort by filter or result-control setting. See the README for source semantics and examples.

## `sortDirection` (type: `string`):

Optional sort direction filter or result-control setting. See the README for source semantics and examples.

## `maxCandidates` (type: `integer`):

Bound before aggregation. Exact lookups use at least 2,000 rows to preserve measure evidence.

## `maxResults` (type: `integer`):

Total one-per-CCN paid output cap. The one-item default costs at most $0.0021: $0.0001 start plus $0.002 per item.

## Actor input object example

```json
{
  "ccn": "012306",
  "providerName": "CHILDRENS HOSPITAL OF ALABAMA ESRD",
  "sortBy": "providerName",
  "sortDirection": "asc",
  "maxCandidates": 2000,
  "maxResults": 1
}
```

# 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 = {
    "ccn": "012306",
    "providerName": "CHILDRENS HOSPITAL OF ALABAMA ESRD",
    "maxCandidates": 2000,
    "maxResults": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/cms-medicare-dialysis-facilities-quality-data").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 = {
    "ccn": "012306",
    "providerName": "CHILDRENS HOSPITAL OF ALABAMA ESRD",
    "maxCandidates": 2000,
    "maxResults": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/cms-medicare-dialysis-facilities-quality-data").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 '{
  "ccn": "012306",
  "providerName": "CHILDRENS HOSPITAL OF ALABAMA ESRD",
  "maxCandidates": 2000,
  "maxResults": 1
}' |
apify call pink_comic/cms-medicare-dialysis-facilities-quality-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pink_comic/cms-medicare-dialysis-facilities-quality-data",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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