Skip to content

costkits/costkits-api

Repository files navigation

CostKits API

Healthcare cost estimation, provider pricing, insurance benefits, and medical bill analysis for applications.

API Docs OpenAPI License: MIT

Use the CostKits API to add US healthcare cost estimates, patient out-of-pocket calculations, provider price comparisons, coverage rules, and bill analysis to your application.

Building an AI assistant or agent instead? Use the CostKits MCP server.

What you can build

  • Healthcare cost estimators — estimate patient out-of-pocket costs for 30 procedures across all 50 US states
  • Provider price comparisons — compare negotiated prices from hospital transparency data
  • Insurance benefit calculators — apply deductibles, copays, coinsurance, and out-of-pocket limits
  • Coverage explainers — retrieve prior-authorization rules, cost sharing, frequency limits, and billing triggers
  • Medical bill review tools — detect duplicate charges, unbundling, and suspicious reclassification
  • Embedded consumer tools — add CostKits widgets to websites and benefits platforms

Building for an AI agent? See costkits-mcp.

Try the API in 30 seconds

curl https://api.costkits.com/v1/demo/estimate

No API key needed for the demo endpoint above — it returns a full sample estimate (colonoscopy in Connecticut) so you can see the response shape immediately. Get a free key →

With a key:

curl -X POST https://api.costkits.com/v1/estimate/procedure \
  -H "Authorization: Bearer $COSTKITS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"procedure": {"type": "colonoscopy"}, "location": {"state": "CT"}}'

Example response:

{
  "procedure": "Colonoscopy",
  "procedure_slug": "colonoscopy",
  "state": "Connecticut",
  "estimated_total_allowed_amount": {
    "low": 800, "median": 1800, "high": 4500,
    "source": "hospital_transparency + cms_medicare_rates"
  },
  "percentiles": { "p25": 800, "p50": 1800, "p75": 4500 },
  "estimated_patient_responsibility": { "low": 0, "median": 360, "high": 1800 },
  "confidence_score": 0.75,
  "data_sources": ["hospital_transparency", "cms_medicare_rates", "costkits_bundle_model_v1"],
  "data_vintage": "2026-Q1",
  "model_version": "v1.0"
}

Next step: the Quickstart guide.

Architecture

CostKits architecture — one API, two ways in: your app, or an AI agent

One underlying API, two ways in: integrate the REST API directly in your application (this repo), or give an AI agent live healthcare cost data through the MCP server.

Core endpoints

Capability Endpoint Typical use
Procedure estimate POST /v1/estimate/procedure Estimate expected cost by procedure and geography
Patient liability POST /v1/estimate/liability Apply deductible, coinsurance, copay, and OOP maximum
Combined estimate POST /v1/estimate/full Procedure, cost, providers, and liability in one call
Provider search GET /v1/providers Find providers with observed negotiated prices
Provider profile GET /v1/providers/{npi} Look up a single provider by NPI
Coverage rules GET /v1/coverage/summary (+ prior-auth, cost-sharing, frequency, triggers) Retrieve prior auth and benefit rules
Bill analysis POST /v1/bill-analysis Flag possible billing anomalies
Procedure resolution GET /v1/procedures/resolve Convert free text into a supported procedure slug

Documentation

Examples

Plans & Pricing

Plan Monthly Requests Price
Free 100 $0
Builder 5,000 $99/mo
Pro 50,000 $499/mo

Full endpoint-by-plan breakdown → docs/plans-and-pricing.md. Sign up at costkits.com/api-keys/.

Use Cases

Agent-friendly API responses

Although this repository is for direct REST integration, the API is designed to behave predictably inside AI tool loops. Every error response includes an agent_hint — a plain-English instruction telling an LLM tool chain what to call next:

{
  "title": "Procedure not found",
  "status": 404,
  "code": "PROCEDURE_NOT_FOUND",
  "agent_hint": "Call GET /v1/procedures/resolve?q=knee xray to find the canonical slug. Closest matches: mri-knee, x-ray."
}

For most agent integrations, use the CostKits MCP server, which exposes these endpoints as ready-to-use MCP tools.

Data and methodology

Cost estimates are built from:

  • CMS hospital price-transparency files
  • Medicare physician, outpatient, and ASC fee schedules
  • The NPI provider registry
  • Commercial payer coverage rules

Responses include:

  • data_vintage
  • model_version
  • source metadata
  • estimate ranges rather than unsupported point estimates

Data refreshes quarterly.

Read the full data and pricing methodology or explore the wider public-data landscape in awesome-healthcare-cost-data.md.

Links

costkits.com · API docs · Interactive demo · Get an API key · MCP server

About CostKits

CostKits is a healthcare cost-transparency platform built by John Caruso, FSA, MAAA, a healthcare actuary with more than 20 years of experience in insurance pricing, medical billing systems, and healthcare cost analytics.

The API powers CostKits consumer tools including cost estimates, provider comparisons, insurance calculations, and bill analysis.

Methodology · Editorial policy

Support

About

Docs, OpenAPI spec, and integration examples for the CostKits healthcare cost API — estimates, provider pricing, coverage rules, bill analysis

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors