Free REST API · No API Key Required

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.

9+ Endpoints
0ms Auth delay
3 Languages
∞ Free forever

Authentication

This API is completely free with no API key or account required. Just make requests.

✓
No API key needed. All endpoints are public and free. We ask only that you include a small attribution link on pages where you use our calculators — this is how we keep the API free forever.
ℹ
Rate limit: 200 requests/minute per IP. For higher limits, contact us.

Base URL

All API endpoints are available under the following base URL.

BASE URL https://healthcalcshub.com/api/v1

Available Calculators

All calculators support English, Hindi (hi), and Arabic (ar) response labels via the lang parameter.

⚖
BMI Calculator
/api/v1/bmi
Body Mass Index with WHO classification and health risk level.
🔥
TDEE Calculator
/api/v1/tdee
Total Daily Energy Expenditure with 5 activity levels.
📊
Body Fat %
/api/v1/bodyfat
Body fat percentage via Navy method with category.
🏋
Ideal Weight
/api/v1/idealweight
4 formulas: Devine, Robinson, Miller, Hamwi.
💪
Lean Body Mass
/api/v1/lbm
Lean mass, fat mass, and muscle percentage breakdown.
🥗
Calorie Needs
/api/v1/calories
Daily calories for loss, maintenance, and gain goals.
🥩
Protein Intake
/api/v1/protein
Optimal daily protein range based on weight and goal.
💧
Water Intake
/api/v1/water
Daily water requirements including exercise adjustment.
📐
Macros Split
/api/v1/macros
Carb, protein, and fat grams for any calorie target.

BMI Calculator

Calculate Body Mass Index and receive WHO classification.

GET /api/v1/bmi Calculate BMI score and category ▼

Parameters

ParameterTypeRequiredDescription
weightnumberRequiredWeight in kilograms (e.g. 70)
heightnumberRequiredHeight in centimeters (e.g. 175)
unitstringOptionalmetric (default) or imperial
langstringOptionalen (default), hi, ar
# GET request — no auth required
curl "https://healthcalcshub.com/api/v1/bmi?weight=70&height=175&lang=en"
200 OK
{
  "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.

GET /api/v1/tdee Total Daily Energy Expenditure ▼
ParameterTypeRequiredDescription
weightnumberRequiredWeight in kg
heightnumberRequiredHeight in cm
agenumberRequiredAge in years
genderstringRequiredmale or female
activitystringRequiredsedentary · light · moderate · active · very_active
curl "https://healthcalcshub.com/api/v1/tdee?weight=75&height=180&age=28&gender=male&activity=moderate"
200 OK
{
  "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.

GET /api/v1/water Daily water intake recommendation ▼
ParameterTypeRequiredDescription
weightnumberRequiredWeight in kg
activitystringOptionalsedentary (default) · light · moderate · active
climatestringOptionaltemperate (default) or hot
curl "https://healthcalcshub.com/api/v1/water?weight=70&activity=moderate&climate=hot"
200 OK
{
  "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.

▶ BMI API — Live Test
Fill in the fields and hit Run to see a real API response.
GET https://healthcalcshub.com/api/v1/bmi?weight=70&height=175&lang=en
// Response will appear here...

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.

<!-- Add this near your calculator on your page -->
<p>Powered by <a href="https://healthcalcshub.com" target="_blank">HealthCalcsHub</a></p>
🔗
The attribution link acts as a dofollow backlink — it also improves your site's perceived credibility by linking to a well-established health resource.

Code Examples

Copy-paste ready snippets for the most common languages.

JavaScript (fetch)
// 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
<?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'];
Python
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

CodeMeaningExample
400Bad Request — missing or invalid params"weight is required"
422Unprocessable — value out of range"height must be 50–300 cm"
429Rate limit exceeded"200 req/min limit reached"
500Server error — please retry"Internal server error"