Skip to content

LDL Calculator API

Compute LDL using the Friedewald equation and return classification signals for cardiometabolic monitoring workflows.

Endpoint

  • GET /api/v1/ldl-calculator
  • POST /api/v1/ldl-calculator/post

Parameters

Name Type Required In Description
TC number (>0) Yes Query/Body Total cholesterol.
HDL number (>0) Yes Query/Body HDL cholesterol.
TG number (>0, <=400) Yes Query/Body Triglycerides (Friedewald valid up to 400 mg/dL).
lang string No Query Response language (en,es,de,fr,pt,ja,hi,ar).

Why Use This Endpoint

  • Production-ready LDL estimate for dashboards and reports.
  • Adds risk-band context beyond single-value output.
  • Supports preventive health and cardiometabolic tooling.

Get Started

Request Example

curl -X GET "https://api.hefitapi.com/api/v1/ldl-calculator?TC=210&HDL=52&TG=140&lang=en" \
  -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/ldl-calculator/post?lang=en" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"TC":210,"HDL":52,"TG":140}'

Response Example

Info

The response example below is for demonstration purposes only. Make a live request to this endpoint to receive the full, real-time, and potentially richer JSON structure.

{
  "LDL": 130.0,
  "ldl_band": "borderline_high",
  "ldl_band_label": "Borderline High",
  "tc_hdl_ratio": 4.04,
  "risk_signal": "Risk trend should be monitored and improved.",
  "action_plan": ["Increase fiber and activity consistency"],
  "monitoring_plan": "Retest lipids in the next planned review window.",
  "_enterprise": {
    "client": "Acme Health",
    "plan": "pro",
    "request_id": "ac2cc3f7e39a8cb8",
    "quota": 120,
    "usage_tracking": true
  },
  "_api_metadata_": {
    "endpoint_name": "ldl_calculator",
    "response_language": "en"
  }
}

Product Positioning

Ideal for preventive health apps, lab-summary tools, and enterprise care analytics.

Note

API returns HTTP 400 when TG > 400 because Friedewald estimation is not valid in that range.