Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of## Inspiration

Since 2021, federal law (45 CFR 180.50) has required every US hospital to publish its prices in a machine-readable file. In practice those files are 100 MB–21 GB spreadsheets hidden on obscure pages, and many hospitals don't even post the required cms-hpt.txt that says where the file lives. Patients find out the price when the bill arrives. We wanted an AI employee that does the legwork no person has time for.

What it does

  • Finds the files. Reads each hospital system's /cms-hpt.txt with TinyFish Fetch. Where it's missing (Dignity Health), TinyFish agents open the hospital website, click "Price Transparency" and dig out the price file and the Patient Price Estimator. They run in parallel, and you watch them in a live browser view.
  • Reads the files. It loads 15 Phoenix-area hospital files (60–540 MB each, CSV and JSON) into DuckDB: 81 common procedures, ~73,500 prices, in ~25 seconds.
  • Shows your cost. Pick a procedure, an insurer and a plan type, and enter your deductible and coinsurance. Hospitals are ranked by your estimated cost, and the formula shows on hover. MRI brain: $428 cash at Valleywise vs $4,947 at HonorHealth.
  • Gets live quotes. An agent fills in a hospital's public Patient Price Estimator as a self-pay patient (Valleywise: $372.28) and compares it with the hospital's own file.
  • Shows compliance. A ✓/✗ strip shows which hospitals follow the posting rule.

How we built it

  • Python + FastAPI backend, DuckDB for the big files, vanilla JS + Tailwind frontend.
  • TinyFish Fetch for cms-hpt.txt. It also gets past the 403s Mayo Clinic and Abrazo return to plain HTTP clients.
  • TinyFish Agent run-sse: the server streams the agent's progress to the browser and embeds STREAMING_URL as a live iframe. The API key stays server-side. run-async is used for batch runs.
  • Lite → stealth fallback: each run starts with the lite profile and retries with stealth plus a US proxy.
  • Gemini API sorts new insurer names (only high-confidence answers are used) and writes a plain-English summary. Every number in it is checked against the data.
  • Format detection for CMS v3 tall CSV and JSON, payer-name normalization, ZIP-based distance, and data-quality filters that remove placeholder prices like $1.00.

Challenges we ran into

  • Size: files range from 60 MB to 21.5 GB (Mayo's was too big to load during the hackathon).
  • Messy payer names: "AETNA / ALL PRODUCTS", "Commercial|PPO" and "AHC MERCY CARE" all had to map to standard insurers and plan types.
  • Rates that aren't dollars: some negotiated rates are only a percentage or a formula. We show "not listed in dollars" and never make up a number.
  • Hostile estimators: Banner shows a CAPTCHA, Dignity asks for name and date of birth, and Abrazo sits behind Cloudflare. We built a guard that stops the agent at any human-verification step. It never enters personal data or submits forms.

Accomplishments that we're proud of

  • Every price links back to the file row it came from. No number is made up.
  • The finder agent found price files for 3 Dignity hospitals that no cms-hpt.txt listed, in ~97 seconds, live.
  • We got a real quote from a hospital's own estimator tool and checked it against the hospital's published file.

What we learned

  • Price transparency compliance is spotty, and that gap is exactly where an agent helps.
  • Browser agents can do work a scraper can't: clicking through menus and filling in forms.
  • An honest "not listed in dollars" earns more trust than a confident guess.

What's next

  • Cover all of Arizona, then the whole country.
  • Use TinyFish Monitors to flag new price files.
  • Stream-load giant files like Mayo's.
  • Add physician fees.
  • Send compliance reports to CMS.

What we learned

What's next for Hospital Price Finder

Built With

Share this project:

Updates

Submission history