API Documentation
The Medical Costs API provides free, open access to medical procedure costs, drug prices, hospital data, and more.
Base URL: https://medical-costs-api.david-568.workers.dev
•
Download OpenAPI Spec (YAML)
Response Format
All endpoints return JSON:
{ "success": true, "data": { ... } } Procedures
/api/procedures List medical procedures with optional search, category, and body system filters.
/api/procedures/{code} Get full procedure details including RVUs, rates, and geographic data.
/api/procedures/by-slug/{slug} Look up procedure by URL slug.
/api/procedures/{code}/consumer Get consumer-friendly procedure description.
/api/related/{code} Get related procedures in the same category.
/api/alternatives/{code} Get alternative treatment options with cost comparison.
/api/categories List all procedure categories with counts.
/api/body-systems List body systems with procedure counts.
/api/body-systems/{slug} Get body system detail with its procedures.
Injuries
/api/injuries List injury categories. Filter by crash relevance or body region.
/api/injuries/{slug} Get injury category detail with mapped procedures.
/api/injuries/{slug}/estimate Get cost estimate for an injury by severity and state.
/api/crash-estimate Get crash severity cost estimate (NHTSA-based).
/api/settlement-estimate Estimate personal injury settlement range.
Hospital
/api/drg List DRG (hospital stay) codes with average costs.
/api/drg/{code} Get DRG detail with hospital-level cost breakdown.
/api/hospitals Search hospitals with cost and payment data.
/api/hospitals/rankings Get hospital cost rankings nationally.
/api/hospitals/states List states with hospital data counts.
/api/hospitals/{state}/drgs Get top DRGs for a state.
Drugs
/api/drugs/compare Compare brand vs generic drug prices.
/api/drugs/categories List drug therapeutic categories.
/api/drugs/glp1 Get GLP-1 drug prices (Ozempic, Wegovy, etc.).
/api/medications/{conditionSlug} Get medications commonly used for a condition.
Insurance
/api/insurers List insurance companies with payment data.
/api/insurance-plans Search ACA marketplace insurance plans.
/api/oop-calculator Calculate out-of-pocket costs based on insurance parameters.
/api/auto-insurance/{state} Get auto insurance requirements by state.
Geographic
/api/compare Compare procedure costs across states.
Transparency
/api/negotiated-rates Get negotiated rates from payers.
/api/bill-check Check if a medical bill is reasonable.
Search
/api/search Unified search across procedures, conditions, and drugs.
/api/graph/{type}/{id} Get knowledge graph relationships.
Meta
/api/statistics Get database statistics and counts.
/api/metrics Get key platform metrics.
/api/metrics/facts Get interesting medical cost facts.
/api/trends Get medical cost trends over time.
/api/og Generate dynamic OG image (SVG, 1200x630).
/api/embed/{code} Get embeddable HTML widget for a procedure.
Usage Notes
- All data is based on publicly available CMS Medicare fee schedules (CY 2026, CF $33.40)
- Commercial rates are estimated at 150-250% of Medicare rates
- No API key required — free and open access
- CORS is enabled for allowed origins
- Rate limiting may apply; please be respectful with request volumes
- Data is for informational purposes only and is not medical or financial advice