# HCRIS Hospital Cost Report — Medicare Cost & Charge Lookup (`malekh/hcris-hospital-cost-report`) Actor

Look up a US hospital's Medicare cost report from the CMS HCRIS release by CCN, name or state. Returns total costs, inpatient and outpatient gross charges, the cost-to-charge ratio, beds, patient days and discharges per fiscal year, with the worksheet line and column each figure came from.

- **URL**: https://apify.com/malekh/hcris-hospital-cost-report.md
- **Developed by:** [Malek H](https://apify.com/malekh) (community)
- **Categories:** Automation, Other
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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.

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

## HCRIS Hospital Cost Report — Medicare cost report lookup by CCN

Look up any US hospital's **Medicare cost report** from the CMS **HCRIS**
(Healthcare Cost Report Information System) release and get its financials for a
fiscal year as clean JSON.

Give it a CMS Certification Number, a hospital name or a state. Get back total
costs, inpatient and outpatient gross charges, the **cost-to-charge ratio**,
staffed beds, patient days and discharges — plus the filing status of the report
those numbers came from.

```json
{
  "providerCcn": "010005",
  "hospitalName": "MARSHALL MEDICAL CENTERS SOUTH",
  "city": "BOAZ", "state": "AL", "county": "MARSHALL",
  "fiscalYear": 2023,
  "fiscalYearBegin": "2022-10-01",
  "fiscalYearEnd": "2023-09-30",
  "reportStatus": "Settled",
  "reportRecordNumber": "829296",
  "totalCosts": 170140152,
  "inpatientTotalCharges": 118714415,
  "outpatientTotalCharges": 444004520,
  "totalCharges": 562718935,
  "costToChargeRatio": 0.3024,
  "numberOfBeds": 182,
  "totalDays": 34258,
  "totalDischarges": 6846,
  "medicareDays": 7840,
  "medicareDischarges": 1435
}
```

### Why this exists

The HCRIS bulk files are free, and they are also close to unusable: a 136 MB ZIP
per fiscal year holding **19.5 million rows** of `report / worksheet / line /
column / value` with no labels and no lookup. That gap is why vendors resell
this same public file — `CostReportData.com` lists **$90 for one hospital's cost
report** and **$2,000/year** for full access.

This Actor does the part that is actually hard: resolving the right worksheet
cells, from the right line, for the right report, and refusing to answer when
the source is not trustworthy.

### What it looks up

**Financials** — Worksheet C Part I, line 202:

| Field | Source cell |
|---|---|
| `totalCosts` | Worksheet C Part I line 202 column 3 |
| `inpatientTotalCharges` | Worksheet C Part I line 202 column 6 |
| `outpatientTotalCharges` | Worksheet C Part I line 202 column 7 |
| `totalCharges` | Worksheet C Part I line 202 column 8 |
| `costToChargeRatio` | `totalCosts / totalCharges` |

**Utilisation** — Worksheet S-3 Part I, line 14: `numberOfBeds`, `totalDays`,
`medicareDays`, `medicaidDays`, `totalDischarges`, `medicareDischarges`,
`medicaidDischarges`.

Every record carries a `sourceFields` map naming the exact worksheet, line and
column each number came from, so anything here can be traced back to the filed
report.

### Input

| Field | What it does |
|---|---|
| `providerNumbers` | CCNs to look up, e.g. `["010005"]`. Leading zeros added for you. |
| `hospitalName` | Case-insensitive substring search, when you don't have the CCN. |
| `state` | Two-letter code. Filters a name search or stands alone. |
| `fiscalYears` | e.g. `[2024, 2025]`. Empty means each hospital's most recent filing. |
| `includeUtilization` | Beds/days/discharges alongside the financials. Default on. |
| `maxProviders` | Cap on a broad name/state search. Default 25. |

### Correctness — the part that matters

Cost report figures get used in rate negotiations, 340B and DSH work, valuations
and market analysis. A confidently wrong number is worse than no number, so:

**It reads line 202, not line 200.** HCRIS also publishes a small derived
extract with three tidy numeric columns, and using it would have been wrong.
Those columns are Worksheet C Part I **line 200** — a *subtotal*. Line 201 is a
deduction and line 202 is the total. On FY2026 report 836588 that is 3,568,482
less 212,888 giving 3,355,594: reporting line 200 as "total costs" overstates
cost, and therefore the cost-to-charge ratio, for every hospital with a line 201
entry. The extract's cost column is also blank for a large share of filers,
where the real figure sits in the worksheet file.

**Every field was validated against CMS's own labelled data.** Each mapping was
checked against the CMS *Hospital Provider Cost Report* dataset, joined on the
report record number. On FY2023: **11 of 11 financial and utilisation fields
matched exactly across 1,093 reports, with zero mismatches**, and the six
identity fields matched on 1,172 of 1,172.

**Fiscal dates are never taken from the provider index.** That HCRIS file has
its `FYB` and `FYE` columns swapped — in all 7,202 rows the "end" date is
earlier than the "begin" date. Dates come from the report tables, and the run
fails outright if those ever develop the same defect.

**A stale release is caught before you are charged for it.** HTTP 200 is not
freshness. The newest fiscal year end *inside* the payload is checked against
today, the index row count against the publisher's own record-count table, and
the worksheet extraction against the share of *every* report in that year's
release that yields line 202 cells — so a moved cell address is caught, while a
single hospital CMS has not settled yet is reported rather than treated as a
source failure. Any of those guards failing aborts the run before anything is
billed, rather than returning blanks.

**Nothing found is said out loud.** A CCN with no filing for the year you asked
for comes back as `no_report_for_fiscal_year`, listing the years that *are* on
file — never as a hospital with zero costs. An unrecognised CCN comes back as
`unknown_provider_number`. A filing CMS holds but has not yet worked through
comes back as `no_financial_data_in_filing`, and **is not billed**.

### Three things about HCRIS fiscal years

**Some filings carry no financial cells, and you are not charged for those.**
A report can be listed in the HCRIS index for a fiscal year and still have no
Worksheet C Part I line 202 rows in that year's worksheet release. It comes
back as `no_financial_data_in_filing` with its identity and period intact, and
it is not billed. This is per-report rather than per-year — measured
2026-08-03, both FY2023 and FY2024 carry line 202 for 99% of the reports in
their releases.

**A report's fiscal year is keyed on its period BEGIN date**, under the federal
fiscal year — not its end date and not the calendar year. A period running
2023-01-01 to 2023-12-31 is FY2023; one starting 2025-10-01 is FY2026. Measured
across all 88,376 reports in the current release, the begin-date rule holds
88,376 times; an end-date reading would be wrong 72,829 times.

**One hospital can hold several reports in one fiscal year** — usually a short
stub period plus a full year, around a change of ownership or a year-end move.
Each filing is returned as its own record, with its own period and status,
rather than being merged into a single total that was never filed.

### Source and licence

CMS HCRIS HOSPITAL-2010 (Medicare cost report form CMS-2552-10), from
`downloads.cms.gov/files/hcris/`. Field definitions follow the CMS *Cost Report
Data Dictionary*. This is a US Government work in the public domain, published
by CMS for programmatic reuse — no key, no CAPTCHA, no rate-limit
circumvention, no login.

Note that HCRIS is a settlement pipeline and lags by design: reports are filed
roughly five months after a fiscal year ends, and a report's status moves from
`As Submitted` through `Settled` as it is processed. The status is on every
record so you can see which you are looking at.

# Actor input Schema

## `providerNumbers` (type: `array`):

The hospitals to look up, by 6-character CMS Certification Number / Medicare provider number (e.g. 010005). Leading zeros are added for you, so 10005 also works. This is the precise way to ask — use it whenever you have the CCN. Leave empty to search by name and/or state instead.

## `hospitalName` (type: `string`):

Case-insensitive substring of the hospital's name, matched against the current HCRIS provider directory. Used only when no CCNs are given. Combine with a state to narrow it — 'MEMORIAL' alone matches hundreds of hospitals.

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

Two-letter state or territory code (e.g. CA, TX, PR). Filters a name search, or on its own returns that state's hospitals up to the maximum below.

## `fiscalYears` (type: `array`):

Which cost report years to return, e.g. \[2022, 2023]. Leave empty to get each hospital's most recent filing. HCRIS files a report under the federal fiscal year of its period BEGIN date, so a period running 2023-01-01 to 2023-12-31 is FY2023, and one starting 2025-10-01 is FY2026. A hospital can also hold more than one report in a year (a short stub period plus a full year), and each is returned separately. Some filings are listed in the index for a year but carry no Worksheet C line 202 rows in that year's release; those come back with a no\_financial\_data\_in\_filing status and are never billed. Each extra year is a separate ~136 MB CMS download, so ask only for the years you need.

## `includeUtilization` (type: `boolean`):

Include the Worksheet S-3 utilisation figures — staffed beds, total/Medicare/Medicaid patient days and discharges — alongside the financials. These come from the same file at no extra cost. Turn off for financials only.

## `maxProviders` (type: `integer`):

Safety cap on how many hospitals a name or state search may return, so a broad search cannot run up an unexpected bill. Ignored when you pass explicit CCNs beyond this count.

## Actor input object example

```json
{
  "providerNumbers": [
    "010005",
    "110130"
  ],
  "fiscalYears": [
    2023
  ],
  "includeUtilization": true,
  "maxProviders": 25
}
```

# 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 = {
    "providerNumbers": [
        "010005",
        "110130"
    ],
    "fiscalYears": [
        2023
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("malekh/hcris-hospital-cost-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 = {
    "providerNumbers": [
        "010005",
        "110130",
    ],
    "fiscalYears": [2023],
}

# Run the Actor and wait for it to finish
run = client.actor("malekh/hcris-hospital-cost-report").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 '{
  "providerNumbers": [
    "010005",
    "110130"
  ],
  "fiscalYears": [
    2023
  ]
}' |
apify call malekh/hcris-hospital-cost-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=malekh/hcris-hospital-cost-report",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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