{"openapi":"3.1.0","info":{"title":"PricePlain","description":"Posted US hospital prices (CMS price-transparency files), cleaned: Twin Cities, MN first. Cash and payer-negotiated rates per CPT/DRG code with canonical insurer names, provenance (source file URL + date) and data-quality flags. Posted prices, not quotes.","version":"1.0.0","x-guidance":"Call a paid endpoint without payment to receive HTTP 402 with the x402 v2 requirements in the PAYMENT-REQUIRED header (scheme 'exact', USDC). Sign and retry with the PAYMENT-SIGNATURE (v2) or X-PAYMENT header. The live 402 is the authoritative quote. GET /, /health, /v1/coverage, /openapi.json, /.well-known/x402 and POST /feedback are free. Requests for unsupported regions/codes/hospitals get a free 404 listing coverage (no payment needed).","contact":{"name":"Feedback (POST /feedback, free)","email":"js4336638@gmail.com","url":"https://priceplain.onrender.com/feedback"}},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[],"x-agentcash-auth":{"mode":"free"}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[],"x-agentcash-auth":{"mode":"free"}}},"/v1/coverage":{"get":{"summary":"Coverage (free)","operationId":"coverage_v1_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[],"x-agentcash-auth":{"mode":"free"}}},"/v1/price":{"get":{"summary":"Price for one code at one hospital ($0.02)","operationId":"price_v1_price_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"}},{"name":"hospital","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Hospital"}},{"name":"payer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Payer"}},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Region"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"object"},"payer":{"type":["object","null"]},"summary":{"type":"object","properties":{"hospital_id":{"type":"string"},"cash":{"type":["number","null"]},"gross":{"type":["number","null"]},"negotiated_min":{"type":["number","null"]},"negotiated_median":{"type":["number","null"]},"negotiated_max":{"type":["number","null"]},"flags":{"type":"array","items":{"type":"string"}},"source":{"type":"object","description":"Provenance: hospital MRF URL, its last_updated_on, cms-hpt.txt"}}},"rows":{"type":"array","items":{"type":"object"}},"source":{"type":"object","description":"Provenance: hospital MRF URL, its last_updated_on, cms-hpt.txt"},"disclaimer":{"type":"string"}},"required":["summary","rows","source","disclaimer"]},"example":{"code":{"code":"70553","code_type":"CPT","label":"MRI brain without and with contrast"},"payer":{"payer_id":"bcbs-mn","name":"Blue Cross and Blue Shield of Minnesota (incl. Blue Plus)"},"summary":{"hospital_id":"abbott","hospital":"Abbott Northwestern Hospital","city":"Minneapolis","cash":912.0,"gross":1900.0,"cash_row_description":"HCHG RAD MRI HEAD BRAIN WWO","cash_values_all_rows":[912.0],"negotiated_min":370.38,"negotiated_median":885.14,"negotiated_max":1201.56,"negotiated_dollar_rates":7,"percent_of_charges_only_rates":0,"algorithm_only_rates":0,"deidentified_min":325.21,"deidentified_max":1869.0,"rows_used":2,"row_selection":"facility, outpatient/both settings","flags":[],"rate_flag_counts":{},"source":{"hospital_id":"abbott","mrf_url":"https://www.allinahealth.org/-/media/allina-health/files/customer-service/billing-and-insurance/price-transparency/363261413_abbott-northwestern-hospital_standardcharges.csv","last_updated_on":"2026-06-16","http_last_modified":"Wed, 24 Jun 2026 13:53:28 GMT","source_page_url":"https://www.allinahealth.org/customer-service/billing-and-insurance","cms_hpt_txt":"https://www.allinahealth.org/cms-hpt.txt","template_version":"3.0.0","listed_mrf_url":null,"note":null}},"rows":[{"description":"HCHG RAD MRI HEAD BRAIN WWO","setting":"outpatient","billing_class":"facility","modifiers":null,"other_codes":"CDM:116619;RC:610","gross":1900.0,"cash":912.0,"deidentified_min":325.21,"deidentified_max":1869.0,"flags":[],"rates":[{"payer_id":"bcbs-mn","plan_type":"medicaid_managed_care","payer_name_raw":"Blue Cross Blue Shield of Minnesota","plan_name_raw":"BC PMAP (AMU)","negotiated_dollar":370.38,"negotiated_percent_of_charges":null,"algorithm":"Procedure Lookup: Procedure Code Tables: [[BC Commodities Fee Schedule]] 43.76% of Table Per Unit Multipliers: 100.00% Sort By: Allowed Amount Conditions: Process Daily: N Do not limit reimbursement When duplicate code found in Procedure Co","methodology":"other","median_paid":null,"p10_paid":null,"p90_paid":null,"count":"0","flags":[]},{"payer_id":"bcbs-mn","plan_type":"commercial","payer_name_raw":"Blue Cross Blue Shield of Minnesota","plan_name_raw":"BC State Health Plan (A)","negotiated_dollar":833.94,"negotiated_percent_of_charges":null,"algorithm":"Procedure Lookup: Procedure Code Tables: [[BC Commodities Fee Schedule]] 98.53% of Table Per Unit Multipliers: 100.00% Sort By: Allowed Amount Conditions: Process Daily: N Do not limit reimbursement When duplicate code found in Procedure Co","methodology":"other","median_paid":null,"p10_paid":null,"p90_paid":null,"count":"0","flags":[]}],"rates_truncated":false}],"source":{"hospital_id":"abbott","mrf_url":"https://www.allinahealth.org/-/media/allina-health/files/customer-service/billing-and-insurance/price-transparency/363261413_abbott-northwestern-hospital_standardcharges.csv","last_updated_on":"2026-06-16","http_last_modified":"Wed, 24 Jun 2026 13:53:28 GMT","source_page_url":"https://www.allinahealth.org/customer-service/billing-and-insurance","cms_hpt_txt":"https://www.allinahealth.org/cms-hpt.txt","template_version":"3.0.0","listed_mrf_url":null,"note":null},"disclaimer":"These are prices hospitals posted in their federally required machine-readable files (45 CFR 180), not quotes or estimates of what you will pay. Your cost depends on your plan, deductible, the services actually billed, and professional fees billed separately. Confirm with the hospital and your insurer."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 requirements in the PAYMENT-REQUIRED header"}},"description":"PricePlain: posted US hospital prices for one shoppable code at one hospital (Twin Cities, MN first): gross charge, discounted cash price, payer-specific negotiated rates with canonical insurer names (raw names kept), percent/algorithm rates flagged (never shown as dollars), data-quality flags, and the source file URL + last_updated_on. Posted prices from hospital machine-readable files, not quotes. Feedback/support: POST /feedback (free) or js4336638@gmail.com.","security":[{"x402":[]}],"x-agentcash-auth":{"mode":"paid"},"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"20000","payTo":"0x4c6BEb8b77365524A24f21d9111dF5c65033a758"}},"x-example-query":{"code":"70553","hospital":"abbott","payer":"bcbs-mn"}}},"/v1/compare":{"get":{"summary":"Compare one code across a region ($0.05)","operationId":"compare_v1_compare_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"}},{"name":"payer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Payer"}},{"name":"region","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"twin-cities","title":"Region"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"object"},"region":{"type":"string"},"sorted_by":{"type":"string"},"hospitals":{"type":"array","items":{"type":"object","properties":{"hospital_id":{"type":"string"},"cash":{"type":["number","null"]},"gross":{"type":["number","null"]},"negotiated_min":{"type":["number","null"]},"negotiated_median":{"type":["number","null"]},"negotiated_max":{"type":["number","null"]},"flags":{"type":"array","items":{"type":"string"}},"source":{"type":"object","description":"Provenance: hospital MRF URL, its last_updated_on, cms-hpt.txt"}}}},"disclaimer":{"type":"string"}},"required":["hospitals","disclaimer"]},"example":{"code":{"code":"70553","code_type":"CPT","label":"MRI brain without and with contrast"},"region":"twin-cities","payer":null,"sorted_by":"cash ascending (nulls last)","hospitals":[{"hospital_id":"methodist","hospital":"Methodist Hospital","city":"St. Louis Park","cash":390.52,"gross":1502.0,"cash_row_description":"MRI brain with and without contrast","cash_values_all_rows":[390.52],"negotiated_min":217.32,"negotiated_median":370.3,"negotiated_max":2335.0,"negotiated_dollar_rates":15,"percent_of_charges_only_rates":0,"algorithm_only_rates":0,"deidentified_min":217.32,"deidentified_max":2335.0,"rows_used":1,"row_selection":"facility, outpatient/both settings","flags":[],"rate_flag_counts":{"outlier_low_vs_peers":1,"dollar_computed_from_percent":2,"count_is_privacy_bucket":2,"not_per_service_rate":4},"source":{"hospital_id":"methodist","mrf_url":"https://www.healthpartners.com/content/dam/brand-identity/pdfs/care/410832080_methodisthospital_standardcharges.csv","last_updated_on":"2026-03-31","http_last_modified":"Wed, 07 Oct 2026 21:43:16 GMT","source_page_url":"https://www.healthpartners.com/care/hospitals/methodist/patient-guest/patient-information/financial-support/","cms_hpt_txt":"https://www.healthpartners.com/cms-hpt.txt","template_version":"3.0.0","listed_mrf_url":"https://www.healthpartners.com/content/dam/brand-identity/pdfs/care/410832080_MethodistHospital_StandardCharges.csv","note":"cms-hpt.txt lists ..._MethodistHospital_StandardCharges.csv, which returns 404 (checked 2026-10-15); the lowercase file name resolves."}},{"hospital_id":"southdale","hospital":"M Health Fairview Southdale Hospital","city":"Edina","cash":640.0,"gross":1596.0,"cash_row_description":"HC MRI BRAIN WO&W CONTRAST","cash_values_all_rows":[640.0,1145.79,1158.43,1162.1,1162.21],"negotiated_min":335.92,"negotiated_median":816.92,"negotiated_max":2608.44,"negotiated_dollar_rates":225,"percent_of_charges_only_rates":0,"algorithm_only_rates":15,"deidentified_min":335.92,"deidentified_max":2608.44,"rows_used":5,"row_selection":"facility, outpatient/both settings","flags":["multiple_chargemaster_rows"],"rate_flag_counts":{"dollar_computed_from_percent":45,"not_per_service_rate":25,"count_is_privacy_bucket":10,"algorithm_only_no_dollar":15,"outlier_high_vs_peers":4},"source":{"hospital_id":"southdale","mrf_url":"https://requiredlearning.fairview.org/price_transparency/410991680-1699752915_fairview-health-services_standardcharges.csv","last_updated_on":"2026-02-06","http_last_modified":"Tue, 19 May 2026 18:16:26 GMT","source_page_url":"https://www.mhealthfairview.org/resources/policies-and-documentation/hospital-price-transparency","cms_hpt_txt":"https://www.mhealthfairview.org/cms-hpt.txt","template_version":"3.0.0","listed_mrf_url":null,"note":null}}],"hospitals_without_this_code":[],"disclaimer":"These are prices hospitals posted in their federally required machine-readable files (45 CFR 180), not quotes or estimates of what you will pay. Your cost depends on your plan, deductible, the services actually billed, and professional fees billed separately. Confirm with the hospital and your insurer."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 requirements in the PAYMENT-REQUIRED header"}},"description":"PricePlain: compare one shoppable code across all indexed hospitals in a region, sorted cheapest first (by cash price, or by negotiated median when payer is given), with cash, negotiated min/median/max, flags and source file links. Posted prices from hospital machine-readable files, not quotes. Feedback/support: POST /feedback (free) or js4336638@gmail.com.","security":[{"x402":[]}],"x-agentcash-auth":{"mode":"paid"},"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"50000","payTo":"0x4c6BEb8b77365524A24f21d9111dF5c65033a758"}},"x-example-query":{"code":"70553","region":"twin-cities"}}},"/feedback":{"post":{"tags":["feedback"],"summary":"Send feedback (free)","operationId":"post_feedback_feedback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[],"x-agentcash-auth":{"mode":"free"}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment. Call without it, read PAYMENT-REQUIRED from the 402 response, sign an 'exact' USDC authorization and retry (v1 clients may send X-PAYMENT)."}}},"servers":[{"url":"https://priceplain.onrender.com"}],"x-discovery":{"wellKnown":"/.well-known/x402"}}