# Hospital Price Transparency Finder & MRF Checker (`hydrocore/hospital-price-transparency-finder`) Actor

Find every hospital's CMS machine-readable price files from cms-hpt.txt and check each one: format, size, last update, CMS template version, EIN, NPIs, payer count, naming and stale-file issues.

- **URL**: https://apify.com/hydrocore/hospital-price-transparency-finder.md
- **Developed by:** [Hydrocore Data](https://apify.com/hydrocore) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 price files

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hospital Price Transparency Finder & MRF Checker (cms-hpt.txt)

Give it **hospital websites** and get **every machine-readable standard-charges file (MRF)** each hospital lists in its **cms-hpt.txt** discovery file, one row per file, with a quick **compliance check**: format (CSV, JSON, ZIP or a web page by mistake), **file size**, **last_updated_on**, **CMS template version**, attestation, the **CMS file-name convention**, **EIN**, **type 2 NPIs**, state license, the number of **payer/plan columns** in wide CSV files, and a plain list of **issues** such as stale (>12 months) or unreachable files. It reads only the first 256 KB of each file, so even 500 MB files are checked in seconds. No API keys, no logins.

### ✅ What you get

- Every price file listed in cms-hpt.txt, with its locations and source page
- Format, CSV layout (tall or wide), size, Last-Modified
- last_updated_on, days since update, stale flag
- CMS template version, attestation, file-name convention
- EIN, type 2 NPIs, license number and state, address
- Payer/plan columns in wide CSV files
- Issues list and issue count, monitor status

### 🏆 Why this Actor

- **Finds the files the official way:** uses the cms-hpt.txt file hospitals must publish at their website root under 45 CFR 180.50, instead of guessing links on web pages.
- **Checks without downloading:** reads only the file header, so a whole health system is checked in seconds and costs almost nothing in compute.
- **Identity included:** EIN, NPIs, license number and address from the file header, ready to join with claims, NPPES or CMS data.
- **Issues in plain words:** stale, unreachable, web page instead of file, non-template format, no attestation, naming, missing source page or contact.
- **Fair billing:** one charge per distinct file (locations sharing a file are listed together); status, filtered and unchanged files are free.

### 💡 Use cases

- Price transparency data teams and health-tech startups: build and refresh a list of MRF URLs before downloading
- Payers, TPAs and employers: find which hospitals updated their files this month
- Compliance consultants and hospital revenue-cycle teams: audit a system's files against the CMS basics
- Journalists and researchers: find stale or broken price files across many hospitals
- AI agents: answer "where is this hospital's price file and is it current?" with a sourced row

### 🚀 How to use

1. Paste **hospital websites** (default example: nyulangone.org, stanfordhealthcare.org, uclahealth.org).
2. Optional: files per website, only files with issues, the sort and monitor mode.
3. Run, then open **Overview**, **Compliance checks** or **Hospital identity**, or export.

### ⚙️ Input

| Field | What it does |
|---|---|
| `domains` | Hospital or health-system websites (default example: nyulangone.org, stanfordhealthcare.org, uclahealth.org). |
| `checkFiles` | Read the first 256 KB of each file (default true). Off = list files only. |
| `maxFilesPerDomain` | Most files per website, default 25. |
| `onlyWithIssues` | Keep only files with issues (default false). |
| `sortBy` | input (default), mostIssues, stalest, largest, hospitalName. |
| `maxResults` | Most files to save, default 100. |
| `onlyChanges / monitorKey` | Monitor mode: only new or changed files since the last run with the same monitor name. |

Example input:

```json
{
  "domains": [
    "nyulangone.org",
    "my.clevelandclinic.org",
    "massgeneralbrigham.org"
  ],
  "onlyWithIssues": true,
  "sortBy": "mostIssues",
  "maxResults": 200
}
```

### ⬆️ Output

One row per distinct price file. Invalid domains, websites without a usable cms-hpt.txt and websites that block automated access get a free row with `recordType` = `status` and the reason in `summaryText`. Every row has the same 36 keys in the same order; missing values are `null`. The example is a real row from a test run of the current build.

Overview fields:

| Field | Type | Example | Description |
|---|---|---|---|
| `domain` | string | "stanfordhealthcare.org" | Hospital website the cms-hpt.txt was read from. |
| `locationName` | string | "Stanford Health Care" | location-name entries from cms-hpt.txt that point to this file (joined with "; " when several share it). |
| `hospitalName` | string | "Stanford Health Care" | hospital_name from the file header. |
| `fileFormat` | string | "json" | csv, json, zip, xlsx, html (a web page instead of a file) or other. |
| `fileSizeMb` | number | 157.7 | File size in MB from Content-Range or Content-Length (zipped size for zip files). |
| `lastUpdatedOn` | string | "2026-04-01" | last_updated_on from the file header (YYYY-MM-DD). |
| `templateVersion` | string | "3.0.0" | version from the file header (CMS template, e.g. 2.2.0 or 3.0.0). |
| `issueCount` | integer | 0 | Number of issues. |
| `issues` | string | null | Issues found, separated by "; " (stale, unreachable, web page instead of file, non-template format, no last_updated_on, no attestation, naming, missing source page or contact). null when none. |
| `mrfUrl` | string | "https://stanfordhealthcare.org/content/dam/SHC/patientsandv… | The machine-readable file (mrf-url). |
| `summaryText` | string | "Stanford Health Care (stanfordhealthcare.org): JSON price f… | Plain-English summary of the file and its issues; on status rows, the reason. |

All 36 fields (in order): `recordType`, `domain`, `locationName`, `hospitalName`, `mrfUrl`, `fileFormat`, `csvLayout`, `reachable`, `httpStatus`, `fileSizeMb`, `lastModified`, `lastUpdatedOn`, `daysSinceUpdate`, `isStale`, `templateVersion`, `usesCmsTemplate`, `hasAttestation`, `followsNamingConvention`, `ein`, `hospitalAddress`, `licenseNumber`, `licenseState`, `type2Npis`, `npiCount`, `payerPlanCount`, `issues`, `issueCount`, `sourcePageUrl`, `cmsHptUrl`, `mrfHost`, `hasContact`, `locationCount`, `fileChange`, `summaryText`, `inputValue`, `scrapedAt`.

Real row from a test run of the current build:

```json
{
  "recordType": "price-file",
  "domain": "stanfordhealthcare.org",
  "locationName": "Stanford Health Care",
  "hospitalName": "Stanford Health Care",
  "mrfUrl": "https://stanfordhealthcare.org/content/dam/SHC/patientsandvisitors/pricingtransparency/946174066_stanford-health-care_standardcharges.json",
  "fileFormat": "json",
  "csvLayout": null,
  "reachable": true,
  "httpStatus": 206,
  "fileSizeMb": 157.7,
  "lastModified": "2026-11-11T18:11:44.000Z",
  "lastUpdatedOn": "2026-04-01",
  "daysSinceUpdate": 227,
  "isStale": false,
  "templateVersion": "3.0.0",
  "usesCmsTemplate": true,
  "hasAttestation": true,
  "followsNamingConvention": true,
  "ein": "946174066",
  "hospitalAddress": "300 Pasteur Drive, Stanford, CA 94305",
  "licenseNumber": "070000662",
  "licenseState": "CA",
  "type2Npis": "1871543215, 1265581086, 1982753711, 1437292927",
  "npiCount": 4,
  "payerPlanCount": null,
  "issues": null,
  "issueCount": 0,
  "sourcePageUrl": "https://stanfordhealthcare.org/for-patients-visitors/price-transparency.html",
  "cmsHptUrl": "https://stanfordhealthcare.org/cms-hpt.txt",
  "mrfHost": "stanfordhealthcare.org",
  "hasContact": true,
  "locationCount": 1,
  "fileChange": null,
  "summaryText": "Stanford Health Care (stanfordhealthcare.org): JSON price file of 157.7 MB, last updated 2026-04-01, CMS template v3.0.0. No issues found in the checks.",
  "inputValue": "stanfordhealthcare.org",
  "scrapedAt": "2026-11-14T21:31:02.796Z"
}
```

Views: **Overview**, **Compliance checks**, **Hospital identity**, **Detailed (all fields)**. Export as JSON, CSV, Excel, XML or HTML from the Storage tab or the API (`/datasets/{id}/items?format=csv&view=overview`). The run summary (`OUTPUT` record in the key-value store) counts domain inputs, invalid and duplicate domains, websites with and without cms-hpt.txt, blocked websites, files listed, locations sharing a file, files over the per-website limit, files checked, filtered, unchanged (monitor), over the cap and saved.

### 💰 Pricing

Competitive pricing, pay per result: **$0.003 per price file** on the Free plan, less on higher plans, plus the $0.0005 Actor start. The default run (3 health systems, 11 files) costs about $0.034; 1,000 files about $3 (+ start). Status, filtered and unchanged (monitor mode) files are never charged.

| Event | What it is | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|---|
| Price file | One machine-readable price file saved (locations, URL, format, size, last update, template version, identifiers, issues). Status, filtered and unchanged (monitor) files are free. | $0.003 | $0.0027 | $0.0025 | $0.0024 |
| Actor start | Once per run (Apify standard start event, per GB of memory; the default 256 MB = one fee) | $0.0005 | $0.0005 | $0.0005 | $0.0005 |

### 🔁 Integrations

Works with the Apify API, MCP (AI agents), Make, n8n, Zapier, Google Sheets and webhooks. Field names are stable camelCase, so mappings do not break between runs.

### ❓ FAQ

**What is cms-hpt.txt?**

Since 2024, US hospitals must publish a plain-text file at the root of their website (for example https://www.uclahealth.org/cms-hpt.txt) that lists each location, the page with its prices and the URL of its machine-readable standard-charges file. The Actor reads that file.

**Does it download the full price files?**

No. It reads only the first 256 KB of each file to get the header (hospital name, last_updated_on, version, license, NPIs, attestation and, for wide CSV files, the payer/plan columns). Files are often hundreds of MB, so this keeps runs fast and cheap.

**Does it extract the negotiated prices?**

No. This Actor finds and checks the files. Parsing millions of price rows is a different job; use the mrfUrl column to feed your own pipeline or a dedicated parser.

**What counts as stale?**

A file whose last_updated_on is more than 365 days old. CMS requires hospitals to update the file at least once a year.

**Why do some websites return a status row?**

Either the website has no cms-hpt.txt at the root (the hospital may publish it on another domain, so try that one) or the website blocks automated access (HTTP 403). The Actor does not try to get around bot protection.

**Why is lastUpdatedOn empty for ZIP files?**

The header is inside the compressed file, so it cannot be read from the first bytes. Format, size and Last-Modified are still shown.

**Is the file-name check a legal requirement?**

CMS asks hospitals to name files <EIN>\_<hospital-name>\_standardcharges.<format>. A file that does not follow it is flagged as an issue, but the check is a quick signal, not a legal opinion.

**Are contact names and emails included?**

No. cms-hpt.txt includes a contact for each file; the Actor only reports hasContact (true or false) and never copies the name or email.

**How does monitor mode work?**

With onlyChanges on, the Actor remembers each file's last_updated_on, size, Last-Modified, template version, reachability and issue count under your monitor name and saves only new or changed files. A weekly schedule tells you when a hospital posts a new file.

**Is it good for AI agents?**

Yes. A website is enough, and each row has a summaryText sentence with the format, size, last update and issues, so an agent can answer price transparency questions with the official file link.

### Ready-made examples

- [Hospital price transparency files, stalest first](https://apify.com/hydrocore/hospital-price-transparency-finder/examples/hospital-price-files-by-staleness-nyu-stanford-ucla)

### 🛟 Support

Found a problem or need a field? Open an issue on the Issues tab; we read every issue.

### Changelog

- 1.0 (2026-11-14): first release.

# Actor input Schema

## `domains` (type: `array`):

Hospital or health-system domains, e.g. nyulangone.org or https://www.uclahealth.org. The Actor reads https://<domain>/cms-hpt.txt (then www.).

## `checkFiles` (type: `boolean`):

Read the first 256 KB of every machine-readable file (never the whole file) for size, last update, template version, NPIs, payer count and issues. Off = only list the files from cms-hpt.txt.

## `maxFilesPerDomain` (type: `integer`):

Most price files to keep per website (large systems list hundreds of hospitals).

## `onlyWithIssues` (type: `boolean`):

Keep only files with at least one issue (stale, unreachable, wrong format, no attestation, naming...). Filtered files are free.

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

Order of rows. Sorting happens before Max results.

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

Most price files to save.

## `onlyChanges` (type: `boolean`):

Save only files that are new, or whose last update date, size, Last-Modified, template version, reachability or issue count changed since the last run with the same monitor name.

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

Name for remembered files (letters, digits, dashes). Different names keep separate histories.

## Actor input object example

```json
{
  "domains": [
    "nyulangone.org",
    "stanfordhealthcare.org",
    "uclahealth.org"
  ],
  "checkFiles": true,
  "maxFilesPerDomain": 25,
  "onlyWithIssues": false,
  "sortBy": "input",
  "maxResults": 100,
  "onlyChanges": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Each price file with format, size, last update and issues.

## `compliance` (type: `string`):

The checks behind the issues.

## `identity` (type: `string`):

Identifiers from the file header and name.

## `results` (type: `string`):

Every field for each row.

## `summary` (type: `string`):

Run summary: domain inputs, invalid and duplicate domains, sites with and without cms-hpt.txt, blocked sites, files listed, locations sharing a file, files over the per-site limit, files checked, filtered, unchanged (monitor), over the cap, saved and status rows.

# 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 = {
    "domains": [
        "nyulangone.org",
        "stanfordhealthcare.org",
        "uclahealth.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydrocore/hospital-price-transparency-finder").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 = { "domains": [
        "nyulangone.org",
        "stanfordhealthcare.org",
        "uclahealth.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hydrocore/hospital-price-transparency-finder").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 '{
  "domains": [
    "nyulangone.org",
    "stanfordhealthcare.org",
    "uclahealth.org"
  ]
}' |
apify call hydrocore/hospital-price-transparency-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydrocore/hospital-price-transparency-finder"
        }
    }
}
```

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/FAYZnXS6YYkCATm8v/builds/GZeEi163Bc07JLQ6L/openapi.json
