Single-page reference for MVP. The machine-readable contract lives in docs/openapi.yaml in the repository.
GET /api/v1/npi/{npi} with header Authorization: Bearer YOUR_API_KEY.All lookup requests use bearer API key authentication. Keys are issued from your account; rate limiting is post-MVP—monthly quota per plan still applies.
GET https://api.npi-api.com/api/v1/npi/{npi} (production) or GET http://localhost:3000/api/v1/npi/{npi} (local, when the route is wired).
Path parameter npi must be exactly 10 digits (leading or trailing whitespace is trimmed; invalid input returns 400 with code invalid_npi).
curl -sS \ -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.npi-api.com/api/v1/npi/1003000126"
const res = await fetch("https://api.npi-api.com/api/v1/npi/1003000126", {
headers: { Authorization: `Bearer ${process.env.NPI_API_KEY}` },
});
const body = await res.json();import os, httpx
r = httpx.get(
"https://api.npi-api.com/api/v1/npi/1003000126",
headers={"Authorization": f"Bearer {os.environ['NPI_API_KEY']}"},
)
r.raise_for_status()
print(r.json())See OpenAPI schema NpiLookupResponse: top-level data (provider) and meta.requestId; optional meta.cached.
400 — invalid_npi401 — invalid_api_key403 — subscription_inactive or quota_exceeded404 — npi_not_found500 — internal_error502 — upstream_unavailableMonthly lookup quotas and key limits depend on your plan. Overage billing and transactional email alerts are out of scope for MVP; see pricing for included quota.