API

REST reference

base https://api.vladahealth.com·auth: Authorization: Bearer <key>·CORS: open·rate: 100 req/s per key·58 tools

Routes

MethodPathKeyReturns
GET/v1/healthnoliveness, version, tool count
GET/v1/toolsoptionalevery tool with its JSON schema; with a key, the tools that key may call
GET/v1/tools/{name}/schemanoone tool's schema, as deployed
POST/v1/tools/{name}yesthe envelope; body = the tool's inputs
GET, POST/v1/price-proofs/{receipt_id}yesa hospital-price receipt; /replay re-runs it on the same snapshot

Request

curl -X POST https://api.vladahealth.com/v1/tools/get_stars \
  -H "Authorization: Bearer $VLADA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contract_id":"H5521","year":2026}'
import requests
r = requests.post("https://api.vladahealth.com/v1/tools/get_stars",
                  headers={"Authorization": f"Bearer {KEY}"},
                  json={"contract_id": "H5521", "year": 2026})
answer = r.json()          # status, value, source, caveats, response_hash
const r = await fetch("https://api.vladahealth.com/v1/tools/get_stars", {
  method: "POST",
  headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ contract_id: "H5521", year: 2026 }),
});
const answer = await r.json();

Response envelope

FieldTypeHolds
statusenumcomplete · partial · refused · failed · queued
valueobjectrows or the figure, with its unit
sourceobjectdataset, publisher, vintage
caveatsstring[]read before citing
invariants_appliedstring[]rules honoured
response_hashstringreplayable
refusalobjectcode, message, recover_with[]
errorobjectcode, message; correlation_id on a failure

HTTP status

StatusWhen
200complete or partial
400INVALID_ARGUMENTS, invalid_input
401missing or unrecognised key
402PLAN_REQUIRED
403entitlement_denied, scope_forbidden
404unknown_tool
422every other refusal (NO_DATA, NO_COVERAGE, REQUIRED_FILTER_MISSING, ...)
429DATA_ALLOWANCE_REACHED, rate_limit_exceeded
500TOOL_FAILED, ENGINE_* (ours; correlation_id in the body)

Limits

LimitValueOn the wire
Synchronous budget40 sSCAN_LIMIT_EXCEEDED; narrow the predicate
Bytes scanned per querycapped per workgroupSCAN_LIMIT_EXCEEDED
Rows per call, rows per monthby planDATA_ALLOWANCE_REACHED with resets_on
Heavy price toolsone at a time per serverbusy: wait 25 s, retry
Cache15 minidentical call served from cache
Answer size~50,000 charstruncated; page or narrow

Gotchas that decide whether an answer resolves

RuleWhy
Pass state on hospital price lookupsresolution is state-scoped; without it the answer is a refusal naming the filter
NPI vs CCNhospital tools are keyed by CCN (a facility), provider tools by NPI (a person or group); the same hospital appears under both; resolve_provider crosswalks them
Facility vs professionala hospital file and a payer file carry different fees for the same code; compare within a class
Years are separate fieldsplan year, rating year, measurement period and retrieval date; the answer names which
Star Ratings are contract-levelnever a plan or county rating
Negotiated price is not out-of-pocketwhat a plan agreed to pay a provider, not what a patient owes
Provenance on every resultsource, vintage, response_hash; prove_* and replay_* turn a number into a re-runnable receipt

Per tool

WhatWhere
Inputs, defaults, outputs, limits, a real answer/docs/tools
Machine-readable catalog/api/catalog
Schemas, no keyhttps://api.vladahealth.com/v1/tools

This page as markdown: /docs-md/errors.md · every page in one file: /llms-full.txt