🏥 Health Calculator API

Comprehensive health calculations with BMI, BMR, Daily Intake, and Water Intake

📖 Overview

The Health Calculator API provides comprehensive health-related calculations including BMI (Body Mass Index), BMR (Basal Metabolic Rate), Daily Caloric Intake, and Water Intake requirements. All calculations are based on scientifically proven formulas and provide detailed recommendations.

🧮 BMI Calculator

Calculate Body Mass Index with WHO standard categories and health recommendations

🔥 BMR Calculator

Basal Metabolic Rate calculation using the accurate Mifflin-St Jeor equation

🍽️ Daily Intake Calculator

Personalized caloric needs with detailed macronutrient breakdown

💧 Water Intake Calculator

Daily water requirements based on multiple health and environmental factors

🌐 Base URL

https://api.lorwongam.com/api/health-calculator/

🔐 Authentication

No authentication required. This is a public API that can be accessed without any API keys or tokens.

📡 API Endpoints

POST / Unified Health Calculator

Calculate BMI, BMR, Daily Intake, or Water Intake based on the calculation type specified.

Request Parameters

Parameter Type Required Description
calculator string Required Calculation type: "bmi", "bmr", "intake", or "water"
weight number Required Weight in kilograms (or pounds if unit=imperial)
height number Required Height in centimeters (or inches if unit=imperial). Not required for water calculator.
unit string Optional "metric" (default) or "imperial" - Unit system for weight/height conversion
age number Optional* Age in years (required for BMR, Daily Intake, Water Intake)
gender string Optional* "male" or "female" (required for BMR, Daily Intake, Water Intake)
activity string Optional Activity level: "sedentary", "light", "moderate", "active", "extra"
goal string Optional For Daily Intake: "maintain", "lose", "lose-fast", "gain", "gain-fast"
climate string Optional For Water Intake: "cold", "temperate", "hot", "very-hot"
health_condition string Optional For Water Intake: "pregnant", "breastfeeding", "fever", "vomiting", "diarrhea"

Example Request - BMI Calculation

curl -X POST "https://api.lorwongam.com/api/health-calculator/" \ -H "Content-Type: application/json" \ -d '{ "calculator": "bmi", "weight": 70, "height": 175 }'

Example Request - Daily Intake Calculation

curl -X POST "https://api.lorwongam.com/api/health-calculator/" \ -H "Content-Type: application/json" \ -d '{ "calculator": "intake", "weight": 70, "height": 175, "age": 30, "gender": "male", "activity": "moderate", "goal": "maintain" }'

Example Request - Water Intake Calculation

curl -X POST "https://api.lorwongam.com/api/health-calculator/" \ -H "Content-Type: application/json" \ -d '{ "calculator": "water", "weight": 70, "age": 30, "gender": "male", "activity": "moderate", "climate": "temperate" }'

📊 Response Format

Success Response

BMI Response Example

{ "success": true, "data": { "bmi": 22.86, "category": "Normal weight", "advice": "Great! Maintain your current lifestyle with a balanced diet and regular exercise." }, "message": "BMI calculated successfully", "timestamp": "2025-09-09T12:00:00Z" }

Daily Intake Response Example

{ "success": true, "data": { "bmr": 1705, "maintenanceCalories": 2643, "targetCalories": 2643, "macronutrients": { "protein": { "grams": 112, "calories": 448, "percentage": 17 }, "fat": { "grams": 73, "calories": 661, "percentage": 25 }, "carbs": { "grams": 384, "calories": 1534, "percentage": 58 } }, "advice": "Based on your moderate activity level and maintenance goal..." }, "message": "Daily intake calculated successfully", "timestamp": "2025-09-09T12:00:00Z" }

Error Response

{ "success": false, "error": "Missing required parameter: weight", "code": "MISSING_PARAMETER", "timestamp": "2025-09-09T12:00:00Z" }

⚠️ Error Codes

Code Description
MISSING_PARAMETER Required parameter is missing
INVALID_TYPE Invalid calculation type specified
INVALID_VALUE Parameter value is invalid or out of range
CALCULATION_ERROR Error occurred during calculation

🚦 Rate Limits

Currently, there are no rate limits imposed on this API. However, please use it responsibly and avoid excessive requests that might impact service availability for other users.

🎯 Ready to Try?

Test the Health Calculator API with our interactive web interface or start integrating it into your application.

Try Web Interface Test API Endpoint