I built Clearcost to make New York hospital prices readable. It parses real hospital machine-readable files (MRFs) and lays prices for the same procedure alongside one another. U.S. hospitals publish these files under federal rule 45 CFR 180.50, but they are large and messy. Clearcost is a research prototype, not medical or billing advice. The data is published under 45 CFR 180.50 and used for research and transparency; the project is MIT-licensed.
I parsed 3 GB of spring 2026 filings from nine New York hospitals. The README names Mount Sinai, NYU Langone, and NewYork-Presbyterian. In the examples, an MRI of the brain ranges from about $1,043 to $4,860, a 4.7x gap, while a diagnostic colonoscopy ranges from about $352 to $3,060, an 8.7x gap. Hospitals within the same system share one price list, so the README describes the meaningful price gap as being between systems.
- The default displayed figure is the cash price. Cash prices may be blank for surgeries and deliveries, where the insurer-rate tab is suggested. The insurer range covers many plans and may include outlier or case-rate contracts, so I present it as indicative rather than a quote for a specific plan. Published prices reflect spring 2026 files and change over time; rerun the pipeline to refresh.
- I designed the parser around the inconsistencies in real hospital files:
The repository is a complete, deployable project: a streaming parser, real parsed data, and a single self-contained web app that runs without a server or database. index.html is the built app; clearcost.template.html contains a __DATA__ placeholder; build.py embeds data/data.json into index.html; pipeline/ingest.py parses MRFs; data/data.json is the comparable dataset; and data/mrfs/ is where I put downloaded MRFs (it is git-ignored). requirements.txt lists ijson, and the Makefile provides install, data, build, and serve targets.
pip install -r requirements.txt
# or: make install
# Put .json or .csv hospital MRFs in data/mrfs/
python pipeline/ingest.py data/mrfs data/data.json
# or: make data
python build.py
# or: make build
python -m http.server 8000
# or: make serve
# Open http://localhost:8000
To add a hospital, I put its MRF in data/mrfs/ and rerun the pipeline. To add a procedure, I add its billing code to the SHOPPABLE dictionary in pipeline/ingest.py. Each hospital hosts its own MRF; the recommended discovery route is https://www.<hospital>.org/cms-hpt.txt, which by law points to the file, or a search for "<hospital name> standard charges machine readable file". Turquoise Health and PatientRightsAdvocate.org are named as aggregators, and the CMS format reference is https://github.com/CMSgov/hospital-price-transparency.
Because index.html contains the data and is self-contained, I can deploy it to any static host. The included .github/workflows/deploy.yml publishes to GitHub Pages on every push to main after setting Pages source to “GitHub Actions”; the site URL follows https://<you>.github.io/<repo>/. I can also drag the project folder onto Netlify or run vercel in the folder. Locally, I can open index.html or run make serve. If I separate data.json and load it with fetch(), I need to serve over HTTP rather than file://, because the browser blocks the read over the file protocol.
- Mount Sinai labels CPT codes as HCPCS, so strict CPT-only matching finds nothing; the matcher treats CPT and HCPCS as equivalent.
- A procedure may be split between a chargemaster line with gross and cash prices and a separate negotiated line with payer rates; the parser merges them.
- Mount Sinai and NewYork-Presbyterian provide JSON, while NYU Langone provides a wide CSV with 3,841 columns. The parser handles JSON, wide CSV, and tall CSV.
- CSVs of 470 MB are stream-parsed, with a cheap row pre-filter that skips most rows so memory stays flat. The project is designed for major-hospital files that may be hundreds of MB to a few GB.
- NYU exports contain Windows-1252 characters, so the reader decodes leniently rather than crashing.
- NewYork-Presbyterian bundles multiple campuses under one name; a lookup normalizes campus names for the interface.