# CMS Inpatient Hospital Utilization & Payments Scraper API (`pink_comic/cms-inpatient-hospital-utilization-payments`) Actor

Search CMS's official 2024 Medicare inpatient hospital provider aggregates by hospital and geography, utilization, charges, Medicare payments, demographics, and selected condition percentages.

- **URL**: https://apify.com/pink\_comic/cms-inpatient-hospital-utilization-payments.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 inpatient hospital utilization & payments scra 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 Inpatient Hospital Utilization & Payments Scraper API

Search CMS's official 2024 Medicare Inpatient Hospitals by Provider aggregate claims dataset by CCN, hospital/geography, utilization, payments, demographics, and selected condition percentages.

See the full [README](../README.md) for inputs, outputs, pricing, bounded-coverage disclosure, official source links, and interpretation limits.

Empty input returns CCN `010001` as one source-linked item. Results are annual aggregate Medicare FFS observations—not current capacity, quality, profitability, ownership, licensure, patient-level records, or proof of appropriate care.

# Actor input Schema

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

Exact six-digit CMS Certification Number.

## `organization` (type: `string`):

Optional exact organization name filter or result-control setting. See the README for exact source semantics, bounds, and examples.

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

Optional exact city filter or result-control setting. See the README for exact source semantics, bounds, and examples.

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

Optional state filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `zipCode` (type: `string`):

Optional zip code filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minBeneficiaries` (type: `integer`):

Optional minimum beneficiaries filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minDischarges` (type: `integer`):

Optional minimum discharges filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minCoveredDays` (type: `integer`):

Optional minimum covered days filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minCharges` (type: `number`):

Optional minimum submitted covered charges (usd) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `maxCharges` (type: `number`):

Optional maximum submitted covered charges (usd) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minMedicarePayments` (type: `number`):

Optional minimum medicare payments (usd) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `maxMedicarePayments` (type: `number`):

Optional maximum medicare payments (usd) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minAverageAge` (type: `number`):

Optional minimum average age filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `maxAverageAge` (type: `number`):

Optional maximum average age filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minDualEligibleShare` (type: `number`):

Optional minimum dual-eligible share (%) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `condition` (type: `string`):

Optional selected condition filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minConditionPercent` (type: `number`):

Optional minimum selected condition (%) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `maxConditionPercent` (type: `number`):

Optional maximum selected condition (%) filter or result-control setting. See the README for exact source semantics, bounds, and examples.

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

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

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

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

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

Bound before local thresholds and sorting.

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

Optional maximum cms pages filter or result-control setting. See the README for exact source semantics, bounds, and examples.

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

Total output cap. At $0.002/item, the one-record default costs at most $0.0021 including start.

## Actor input object example

```json
{
  "minBeneficiaries": 0,
  "minDischarges": 0,
  "minCoveredDays": 0,
  "minCharges": 0,
  "maxCharges": 0,
  "minMedicarePayments": 0,
  "maxMedicarePayments": 0,
  "minAverageAge": 0,
  "maxAverageAge": 0,
  "minDualEligibleShare": 0,
  "condition": "",
  "minConditionPercent": 0,
  "maxConditionPercent": 0,
  "sortBy": "organization",
  "sortDirection": "",
  "maxCandidates": 1000,
  "maxPages": 10,
  "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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/cms-inpatient-hospital-utilization-payments").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/cms-inpatient-hospital-utilization-payments").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 '{}' |
apify call pink_comic/cms-inpatient-hospital-utilization-payments --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pink_comic/cms-inpatient-hospital-utilization-payments",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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