Hospital Price Transparency Scraper avatar

Hospital Price Transparency Scraper

Pricing

Pay per event

Go to Apify Store
Hospital Price Transparency Scraper

Hospital Price Transparency Scraper

Normalize CMS hospital price transparency MRF JSON/CSV files into facility, code, payer, plan, gross, cash, and negotiated-rate rows.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Normalize CMS hospital price transparency machine-readable files into clean, analysis-ready rate rows.

What does Hospital Price Transparency Scraper do?

Hospital Price Transparency Scraper downloads public hospital machine-readable files (MRFs) in CMS JSON or CSV formats and converts nested charge data into a flat Apify dataset.

It is designed for analysts who need payer, plan, billing code, gross charge, discounted cash price, and negotiated rate rows without hand-parsing very large hospital files.

Who is it for?

  • 🏥 Healthcare pricing analysts comparing rates across hospitals.
  • 💳 Revenue-cycle and compliance teams checking published MRF contents.
  • 📊 Benefits consultants benchmarking negotiated rates by payer or plan.
  • 🔬 Market researchers studying price transparency adoption and rate variation.
  • 🧾 Data teams building internal hospital-rate warehouses.

Why use this actor?

Hospital MRFs can be deeply nested JSON or wide/tall CSV files. This actor gives you one normalized row per facility, code, payer/plan, and rate.

What data can you extract?

FieldDescription
facilityNameHospital or facility name from the MRF
stateState parsed from metadata or address
mrfUrlSource machine-readable file URL
lastUpdatedMRF update date when present
codeSystemCPT, HCPCS, MS-DRG, RC, NDC, or other code type
codeBilling code
serviceDescriptionItem or service description
grossChargeGross charge
discountedCashPriceDiscounted cash price
payerPayer name for negotiated rows
planPlan name for negotiated rows
negotiatedRatePayer-specific negotiated amount
rateTypeStandard, negotiated, fee schedule, or source methodology

How much does it cost to extract hospital price transparency data?

This actor uses pay-per-event pricing. You pay a small run start fee plus a per-row charge for each normalized rate row saved to the dataset.

Use filters and maxItems to keep early tests inexpensive.

Quick start

  1. Open the actor on Apify.
  2. Paste one or more public hospital MRF URLs.
  3. Set maxItems to a small number for the first run.
  4. Add filters such as state, codeTypes, codes, or payerNames.
  5. Run the actor.
  6. Export the dataset as JSON, CSV, Excel, or through the API.

Input

The main input is mrfUrls.

If you leave it empty, the actor uses official CMS example files so you can see the output shape safely.

Input example

{
"mrfUrls": [
{ "url": "https://raw.githubusercontent.com/CMSgov/hospital-price-transparency/master/examples/JSON/v3_json_format_example.json" }
],
"maxItems": 100,
"state": "CA",
"codeTypes": ["CPT"],
"codes": ["70551"],
"includeGrossAndCash": true,
"includePayerRates": true
}

Output example

{
"facilityName": "West Mercy Hospital",
"state": "CA",
"mrfUrl": "https://raw.githubusercontent.com/CMSgov/hospital-price-transparency/master/examples/JSON/v3_json_format_example.json",
"lastUpdated": "2026-04-01",
"mrfVersion": "3.0.0",
"codeSystem": "CPT",
"code": "70551",
"serviceDescription": "MRI of brain (no contrast)",
"setting": "outpatient",
"grossCharge": 1200,
"discountedCashPrice": 1080,
"payer": "Platform Health Insurance",
"plan": "PPO",
"negotiatedRate": 400,
"rateType": "fee schedule"
}

Tips for large MRFs

  • Start with maxItems set to 100 or 500.
  • Filter by codeTypes and codes before requesting thousands of rows.
  • Use payerNames when you only need selected commercial payers.
  • Run separate jobs for separate hospitals when auditing compliance.
  • Export to CSV when loading results into spreadsheets.

Supported MRF formats

The actor supports CMS-style JSON files with standard_charge_information and CMS CSV files following the published hospital price transparency templates.

JSON parsing behavior

For JSON files, the actor expands every code in code_information, every charge in standard_charges, and every payer entry in payers_information.

CSV parsing behavior

For CSV files, the actor reads the metadata row, detects the data header row, and maps common CMS tall-format columns into normalized fields.

Filters

Filters are applied after parsing and before saving rows.

  • state matches two-letter state values.
  • codeTypes matches code systems such as CPT or HCPCS.
  • codes matches exact billing codes.
  • payerNames and planNames are case-insensitive contains filters.

Integrations

Use the dataset export to feed:

  • Snowflake or BigQuery hospital pricing warehouses.
  • Excel workbooks for payer-rate comparison.
  • Compliance dashboards for MRF audit workflows.
  • Internal reimbursement analytics pipelines.
  • Apify webhooks for recurring hospital file monitoring.

API usage with Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/hospital-price-transparency-scraper').call({
mrfUrls: [{ url: 'https://raw.githubusercontent.com/CMSgov/hospital-price-transparency/master/examples/JSON/v3_json_format_example.json' }],
maxItems: 100,
});
console.log(run.defaultDatasetId);

API usage with Python

from apify_client import ApifyClient
client = ApifyClient('APIFY_TOKEN')
run = client.actor('automation-lab/hospital-price-transparency-scraper').call(run_input={
'maxItems': 100,
})
print(run['defaultDatasetId'])

API usage with cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~hospital-price-transparency-scraper/runs?token=APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"maxItems":100}'

MCP usage

Use this actor from Claude Desktop or Claude Code through the Apify MCP server.

MCP URL:

https://mcp.apify.com/?tools=automation-lab/hospital-price-transparency-scraper

Claude Code setup:

$claude mcp add apify-hospital-price-transparency https://mcp.apify.com/?tools=automation-lab/hospital-price-transparency-scraper

Claude Desktop JSON config:

{
"mcpServers": {
"apify-hospital-price-transparency": {
"url": "https://mcp.apify.com/?tools=automation-lab/hospital-price-transparency-scraper"
}
}
}

Example prompts:

  • "Run the hospital price transparency scraper for this MRF URL and summarize CPT 70551 payer rates."
  • "Extract 500 rows from this hospital MRF and return only negotiated rates for PPO plans."
  • "Compare gross charge and cash price rows in this CMS hospital price transparency file."

Legality

This actor processes public machine-readable files that hospitals publish for compliance with CMS Hospital Price Transparency requirements. You are responsible for using the data lawfully and respecting the source website's terms.

FAQ

Use these answers when a run returns fewer rows than expected.

Common troubleshooting

Why did I get zero rows?

Your filters may be too strict or the source file may not follow CMS JSON/CSV structures. Try removing payer/code filters and set maxItems to 20.

Why is my hospital file slow?

Some MRF files are very large. Use strict filters and smaller maxItems for discovery runs.

Can the actor discover every hospital MRF URL automatically?

No. The most reliable workflow is to provide direct public MRF URLs from hospital transparency pages or an internal URL inventory.

Changelog

  • Initial version: JSON and CSV MRF normalization, filters, and payer/gross/cash rows.

Field notes

The actor preserves sourceRow, sourceFormat, and mrfUrl so downstream reviewers can trace every normalized row back to source evidence.

Data quality notes

Hospital MRFs vary widely. Numeric fields are parsed from dollars when possible. Non-dollar formulas may appear as methodology text and may not have a numeric negotiated rate.

Performance notes

The actor is HTTP-only and runs at 256 MB by default. It does not use a browser or proxy for the official CMS sample files.

Export options

Apify supports JSON, JSONL, CSV, XML, RSS, HTML table, and Excel exports from the dataset.

Support

If a public MRF URL fails, include the URL and a small maxItems input when reporting the issue.