Health Calculator API
Embed free BMI, TDEE, body fat, calorie, and nutrition calculators on your website with a single API call. All calculations run on our servers — zero setup, zero cost.
Authentication
This API is completely free with no API key or account required. Just make requests.
Base URL
All API endpoints are available under the following base URL.
Available Calculators
All calculators support English, Hindi (hi), and Arabic (ar) response labels via the lang parameter.
BMI Calculator
Calculate Body Mass Index and receive WHO classification.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| weight | number | Required | Weight in kilograms (e.g. 70) |
| height | number | Required | Height in centimeters (e.g. 175) |
| unit | string | Optional | metric (default) or imperial |
| lang | string | Optional | en (default), hi, ar |
# GET request — no auth required curl "https://healthcalcshub.com/api/v1/bmi?weight=70&height=175&lang=en"
{
"success": true,
"calculator": "bmi",
"inputs": { "weight_kg": 70, "height_cm": 175 },
"result": {
"bmi": 22.9,
"category": "Normal weight",
"healthy_range": { "min": 18.5, "max": 24.9 },
"risk": "Low"
},
"attribution": "Powered by healthcalcshub.com"
}
TDEE Calculator
Total Daily Energy Expenditure with BMR and goal-based calorie targets.
| Parameter | Type | Required | Description |
|---|---|---|---|
| weight | number | Required | Weight in kg |
| height | number | Required | Height in cm |
| age | number | Required | Age in years |
| gender | string | Required | male or female |
| activity | string | Required | sedentary · light · moderate · active · very_active |
curl "https://healthcalcshub.com/api/v1/tdee?weight=75&height=180&age=28&gender=male&activity=moderate"
{
"success": true,
"result": {
"bmr": 1847, "tdee": 2866,
"goals": { "weight_loss": 2366, "maintenance": 2866, "muscle_gain": 3116 }
}
}
Water Intake
Daily water requirements adjusted for activity level and climate.
| Parameter | Type | Required | Description |
|---|---|---|---|
| weight | number | Required | Weight in kg |
| activity | string | Optional | sedentary (default) · light · moderate · active |
| climate | string | Optional | temperate (default) or hot |
curl "https://healthcalcshub.com/api/v1/water?weight=70&activity=moderate&climate=hot"
{
"success": true,
"result": {
"daily_liters": 3.2, "daily_ml": 3200, "glasses_8oz": 14,
"breakdown": { "base": 2400, "activity_add": 400, "climate_add": 400 }
}
}
Live API Tester
Try the API right now — no account, no setup.
Attribution (Required)
In exchange for free API access, please include a small attribution link on any page using our calculators.
Why attribution?
Attribution keeps this API free forever. A single "Powered by" link on your page is all we ask — no payment, no account, no strings attached.
<p>Powered by <a href="https://healthcalcshub.com" target="_blank">HealthCalcsHub</a></p>
Code Examples
Copy-paste ready snippets for the most common languages.
// Fetch BMI data and display on your page const getBMI = async (weight, height) => { const res = await fetch( `https://healthcalcshub.com/api/v1/bmi?weight=${weight}&height=${height}` ); const data = await res.json(); return data.result; }; // Usage getBMI(70, 175).then(result => { console.log(`BMI: ${result.bmi} (${result.category})`); });
<?php function getHealthCalc($endpoint, $params) { $url = "https://healthcalcshub.com/api/v1/" . $endpoint . "?" . http_build_query($params); $json = file_get_contents($url); return json_decode($json, true); } $result = getHealthCalc('bmi', ['weight' => 70, 'height' => 175, 'lang' => 'en']); echo "BMI: " . $result['result']['bmi'];
import requests def get_bmi(weight_kg, height_cm, lang='en'): response = requests.get( "https://healthcalcshub.com/api/v1/bmi", params={"weight": weight_kg, "height": height_cm, "lang": lang} ) return response.json() data = get_bmi(70, 175) print(f"BMI: {data['result']['bmi']} — {data['result']['category']}")
Error Codes
| Code | Meaning | Example |
|---|---|---|
| 400 | Bad Request — missing or invalid params | "weight is required" |
| 422 | Unprocessable — value out of range | "height must be 50–300 cm" |
| 429 | Rate limit exceeded | "200 req/min limit reached" |
| 500 | Server error — please retry | "Internal server error" |