realdentalcosts-go

Zero-dependency Go client for the Real Dental Costs Open Data API · code MIT · data CC BY 4.0 · source on Codeberg · reference on pkg.go.dev

What the API contains

The API is a set of static JSON files published by the Real Dental Costs Data & Research Team. Every payload carries a meta block (licence, attribution, DOI, methodology) and a provenance block with basis (observed or estimated), modeled, confidence (0-100) and sample_n, so a program can tell a measured figure from an index-scaled estimate before displaying it.

EndpointContentHuman-readable page
/procedures.json12 procedures, national cash price rangesUS dental cost index
/procedure/root-canal.json51-state low / average / high, confidence per stateRoot canal cost by state
/procedure/dentures.jsonsame table for full and partial denturesDenture cost by state
/procedure/dental-implant.jsonimplant price table (observed state averages)Dental implant cost by state
/state/{code}.jsonRestorative Cost Index, affordability score, Medicaid dentist acceptance, all procedurese.g. Texas
/medicaid/{cdt}.jsonMedicaid paid amount per claim line for 62 CDT codes, national and by state, 2018-2024 (HHS/CMS T-MSIS)Medicaid dental coverage by state · dataset DOI 10.7910/DVN/7F2BZI

Install

go get codeberg.org/tresor2k/realdentalcosts-go

Quick start

c := realdentalcosts.NewClient(nil)

p, _ := c.Procedure(ctx, "root-canal")
tx, _ := p.StateFor("TX")
fmt.Println(p.National.AvgUSD, tx.LowUSD, tx.HighUSD, p.Provenance.Confidence)

m, _ := c.Medicaid(ctx, "D3330") // molar root canal
fmt.Println(m.National.PaidPerLineWAvg, m.CashBenchmark.RatioCashAvgToMedicaidPaid)

s, _ := c.State(ctx, "CA")
fmt.Println(s.RestorativeCostIndex.Value, s.Medicaid.PctDentistsAccepting)

ErrNotFound is returned (wrapped) for unknown slugs, state codes or CDT codes; other non-2xx responses come back as *APIError. The client has no third-party dependencies and is tested offline against embedded JSON fixtures.

Reading the numbers correctly

Maintained by the Real Dental Costs Data & Research Team. Issues and pull requests: codeberg.org/tresor2k/realdentalcosts-go/issues.