{"uid":"cap_i_mPboVcF7Q9dzDbLvrUG","slug":"hospital-posted-prices-by-billing-code-and-location-ed009272","name":"Hospital Posted Prices by Billing Code and Location","description":"Posted hospital prices for one billing code near a US ZIP code or point","url":"https://data.spencermcw.com/v1/hospital/prices?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["code"],"properties":{"lat":{"type":"number","maximum":90,"minimum":-90},"lon":{"type":"number","maximum":180,"minimum":-180},"zip":{"type":"string","pattern":"^\\d{5}$"},"code":{"type":"string","pattern":"^[0-9A-Za-z]{3,5}$"},"plan":{"type":"string","maxLength":80,"minLength":2},"limit":{"type":"integer","maximum":50,"minimum":1},"payer":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"setting":{"enum":["inpatient","outpatient"],"type":"string"},"code_type":{"enum":["CPT","HCPCS","MS-DRG"],"type":"string"},"plan_type":{"enum":["commercial","medicare_advantage","medicaid","medicare","exchange","tricare","va","workers_comp","auto","supplemental","other","unspecified"],"type":"string"},"radius_miles":{"type":"number","maximum":100,"exclusiveMinimum":0},"billing_class":{"enum":["facility","professional"],"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"data":{"type":"object","required":["code","location","filters","hospitals_in_radius","hospitals_with_file","hospitals_with_prices","hospitals","summary"],"properties":{"code":{"type":"object","required":["type","code","description","description_source","drg","mrfs_statewide"],"properties":{"drg":{"anyOf":[{"type":"object"},{"type":"null"}]},"code":{"type":"string"},"type":{"enum":["CPT","HCPCS","MS-DRG"],"type":"string"},"description":{"type":["string","null"]},"mrfs_statewide":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"description_source":{"anyOf":[{"enum":["cms_hcpcs_level_ii","cms_ms_drg"],"type":"string"},{"type":"null"}]}},"additionalProperties":false},"filters":{"type":"object","required":["payer","plan_type","plan","setting","billing_class"],"properties":{"plan":{"type":["string","null"]},"payer":{"type":["string","null"]},"setting":{"type":["string","null"]},"plan_type":{"type":["string","null"]},"billing_class":{"type":["string","null"]}},"additionalProperties":false},"summary":{"type":"object","required":["hospitals","items","rates","negotiated_dollar","discounted_cash","gross"],"properties":{"gross":{"anyOf":[{"type":"object"},{"type":"null"}]},"items":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"rates":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"hospitals":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"discounted_cash":{"anyOf":[{"type":"object"},{"type":"null"}]},"negotiated_dollar":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false},"location":{"type":"object","required":["zip","lat","lon","radius_miles"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"},"zip":{"type":["string","null"]},"radius_miles":{"type":"number"}},"additionalProperties":false},"hospitals":{"type":"array","items":{"type":"object","required":["id","ccn","name","city","zip","distance_miles","mrfs","items","confidence"],"properties":{"id":{"type":"string"},"ccn":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"mrfs":{"type":"array"},"name":{"type":"string"},"items":{"type":"array"},"confidence":{"type":"number"},"distance_miles":{"type":"number"}},"additionalProperties":false}},"hospitals_in_radius":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"hospitals_with_file":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"hospitals_with_prices":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991}},"additionalProperties":false}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ieRp__HMkX0Y5nnRiKVTb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns posted hospital prices for a single billing code (CPT, HCPCS, or MS-DRG) near a US ZIP code or lat/lon point","exampleAgentPrompt":"What do hospitals near ZIP 90210 charge for CPT code 99213 as an outpatient facility visit — give me up to 10 results for commercial insurance plans within 25 miles.","exampleUseCases":[{"title":"Pre-surgery cost comparison","prompt":"I'm having knee replacement surgery soon — can you find what hospitals within 30 miles of ZIP 60614 charge for MS-DRG code 470 (major joint replacement) for inpatient facility stays? Show me up to 15 results."},{"title":"Medicare Advantage price lookup","prompt":"What do hospitals near latitude 37.7749, longitude -122.4194 charge for CPT code 93000 (EKG) billed under Medicare Advantage plans? Outpatient only, within 20 miles."},{"title":"Insurance plan negotiation research","prompt":"I want to see posted prices for HCPCS code G0008 at hospitals near ZIP 30301 — show up to 10 results and filter to commercial insurance plans so I can compare what different facilities charge."}],"resultDescription":"Returns a structured object containing code metadata (type, description, DRG info), applied location and filters, counts of hospitals in radius with and without price files, a list of individual hospital price rows with negotiated rates by payer and plan type, and summary statistics across all found prices.","failureModes":["Missing required 'code' parameter returns validation error","Invalid ZIP code format (not 5 digits) returns schema error","Neither zip nor lat/lon provided may return empty or error response","Billing code not found in any hospital MRF files returns empty hospitals list","Radius too large (over 100 miles) rejected by schema validation","Unknown code_type or plan_type enum value returns validation error","ZIP code in a region with no hospital MRF data returns zero results"],"whenToPreferThis":"Use this endpoint when you need to look up real posted or negotiated hospital prices for a specific billing code near a geographic location. Ideal for healthcare cost transparency tools, insurance comparison apps, patient cost estimators, and price shopping agents. Prefer this over general web search when you need structured, machine-readable price data sourced directly from hospital machine-readable files (MRFs). Use the companion 'one billing code across named hospitals' endpoint when you have specific hospital names rather than a location radius.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:40:50.346Z","isFirstParty":false,"canonicalSlug":"hospital-posted-prices-by-billing-code-and-location-ed009272"}