# Hospital Price Transparency MRF Normalizer (`businessquik/hospital-mrf-normalizer`) Actor

Turn any hospital's federally mandated price file (tall CSV, wide CSV, or JSON) into one clean, comparable schema. Compare negotiated rates across hospitals without writing a parser per hospital. Filter by billing code, payer, or charge type.

- **URL**: https://apify.com/businessquik/hospital-mrf-normalizer.md
- **Developed by:** [Carlos Garcia](https://apify.com/businessquik) (community)
- **Categories:** Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1,000.00 / 1,000 mrf file normalizeds

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

## Hospital Price Transparency MRF Normalizer

Every US hospital is federally required to publish a machine-readable file (MRF) of its standard charges. In practice those files arrive as **tall CSV, wide CSV, or JSON**, hundreds of columns wide, formatted differently by every hospital and EHR vendor. This Actor turns any of them into **one clean, flat schema** — so prices from different hospitals become directly comparable.

### What you get

One row per (service, charge type, payer):

```json
{
  "hospital_name": "Example General Hospital",
  "mrf_last_updated": "2026-07-01",
  "mrf_version": "2.2.0",
  "mrf_format": "wide-csv",
  "description": "Office visit established patient level 3",
  "code": "99213",
  "code_type": "CPT",
  "setting": "outpatient",
  "charge_type": "negotiated_dollar",
  "amount": 142.10,
  "payer_name": "Aetna",
  "plan_name": "PPO Broad",
  "methodology": "fee schedule"
}
```

**All CMS template versions supported — including the new CY2026 v3.0 template** (verified against CMS's official example files). Charge types: gross, discounted cash, payer-negotiated dollar / percentage / algorithm, de-identified min/max, estimated allowed amount (v2.x), and the v3.0 payer statistics (median, 10th/90th percentile).

### Filters (pay only for what you need)

- `codes` — only these CPT/HCPCS/MS-DRG/NDC codes (secondary codes matched too)
- `payerContains` — only payers matching this text
- `chargeTypes` — only these charge types
- `maxRowsPerFile` — hard cap per file (default 100k; hospital files can hold millions of rows)

### Typical uses

- **Benefits consultants** — compare negotiated rates for a service across the hospitals in a market
- **Revenue-cycle teams** — see competitors' negotiated rates by payer
- **Health-tech builders** — a normalization step you don't have to write or maintain
- **Researchers & journalists** — comparable price data without an ETL project

### Where to find MRF URLs

CMS requires every hospital to link its MRF from its website footer ("Price Transparency"). Paste those URLs straight in. CSV files are streamed, so large files are fine; JSON is capped at 400 MB per file.

### Notes

- April 1, 2026: CMS began enforcing the CY2026 (v3.0) MRF template — hospitals are actively reformatting, which is exactly why a normalizer beats hand-written parsers. This Actor reads v3.0 files (including the spaced-pipe tall CSV headers many parsers choke on) as well as legacy v2.x files.
- This data is public by federal mandate (45 CFR 180.50). No logins, no ToS friction.
- Output is provided as-is and is not pricing, billing, or legal advice. Hospitals occasionally publish erroneous data; `mrf_last_updated` tells you what vintage you're looking at.

### Pricing

| Event | Price |
|---|---|
| Run start | $0.05 |
| Per file normalized | $1.00 |
| Per 1,000 output rows | $0.02 |

Normalizing one hospital's file to a filtered set of 5,000 comparable rows: **~$1.15** — versus hours of custom parsing per hospital format, or an enterprise platform subscription.

### FAQ

**Which file formats does it support?**
All CMS machine-readable templates: v2.0, v2.2, and the CY2026 v3.0 — in tall CSV, wide CSV, and JSON. Verified against CMS's official example files, including the v3.0 tall format's spaced-pipe headers that break naive parsers.

**Where do I find a hospital's MRF URL?**
Every US hospital is required to link its machine-readable file from its website footer (look for "Price Transparency"). Copy that link directly into `mrfUrls`.

**How big a file can it handle?**
CSVs are streamed, so hundreds of MB is fine. JSON is capped at 400 MB. Use `maxRowsPerFile` and the code/payer filters to control output size and cost.

**Why do some rows have an algorithm instead of a dollar amount?**
Hospitals may express negotiated charges as a percentage or contractual algorithm when no dollar figure exists. Those come through as `negotiated_percentage` / `negotiated_algorithm` rows with the text preserved — that's the data as filed, not a parsing gap.

**Is this data legal to use?**
Yes — these files are public by federal mandate (45 CFR 180.50). No logins, no terms-of-service issues.

**Can I compare hospitals?**
That's the point: every file normalizes to the same flat schema, so rows from different hospitals join directly on code + payer.

### Changelog

- **2026-08-22** — **CMS v3.0 (CY2026) template support**: spaced-pipe tall headers, `location_name`, payer statistics (median, 10th/90th percentile). Verified against official CMS example files.
- **2026-08-20** — Launch: v2.0/v2.2 tall CSV, wide CSV, and JSON with code/payer/charge-type filters.

***

### More tools by Businessquik

Verified data tools built on official and public-mandate sources — no logins, no gray areas, no fragile scrapers:

- [Bank Statement Extractor — PDF statements to reconciled CSV/JSON](https://apify.com/businessquik/bank-statement-extractor)
- [FDA Recall Monitor — new-recalls-only alerts for drugs, devices & food](https://apify.com/businessquik/fda-recall-monitor)
- [Patent Signals — filing velocity, new entrants & expiry intel](https://apify.com/businessquik/patent-signals)
- [US Location Profile — economy, labor & weather in one call](https://apify.com/businessquik/location-profile)

**Support:** open an issue on this Actor's Issues tab — layout/format reports are usually fixed within days. Describe the *shape* of your file or query; never post real bank statements or sensitive data.

# Actor input Schema

## `mrfUrls` (type: `array`):

Direct links to hospital machine-readable files (.csv or .json). Find them on any hospital's price-transparency page — CMS requires a standard link in the page footer.

## `codes` (type: `array`):

Only output rows for these codes (CPT/HCPCS/MS-DRG/NDC, e.g. 99213, 470). Empty = all rows.

## `payerContains` (type: `string`):

Only output payer-specific rows whose payer name contains this text (case-insensitive), e.g. "Aetna". Gross/cash/min/max rows are always kept.

## `chargeTypes` (type: `array`):

Which charge types to include. Empty = all.

## `maxRowsPerFile` (type: `integer`):

Safety cap. Hospital files can contain millions of rows; raise this deliberately.

## Actor input object example

```json
{
  "mrfUrls": [],
  "maxRowsPerFile": 100000
}
```

# 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 = {
    "mrfUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("businessquik/hospital-mrf-normalizer").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 = { "mrfUrls": [] }

# Run the Actor and wait for it to finish
run = client.actor("businessquik/hospital-mrf-normalizer").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 '{
  "mrfUrls": []
}' |
apify call businessquik/hospital-mrf-normalizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,businessquik/hospital-mrf-normalizer"
        }
    }
}

```

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/gRY9lDmyd3ciKhEe3/builds/SjhqaWSjulnoanyiL/openapi.json
