Calorie Calculator: API and MCP
Calorie Calculator over REST and MCP: input fields, limits, outputs, one example request and its real answer. Free, no sign-up.
GET /api/v1/tools/health.calorie/mcp/health
- Id
health.calorie- Version
- 1.0.0
- Access
- Free
- Tool page
- Calorie Calculator
- Schema
GET /api/v1/tools/health.calorie
Input
| Field | Type | Constraints | Default | Description |
|---|---|---|---|---|
sex (required) | string | female | male | Sex | |
age (required) | integer | ≥ 18, ≤ 100 | Age (years) | |
units | string | metric | pounds | stones | metric | Units |
weight | number | ≥ 30, ≤ 300 | Weight (kg) | |
height | number | ≥ 120, ≤ 230 | Height (cm) | |
weightSt | integer | ≥ 1, ≤ 55 | Weight, stones (st) | |
weightLb | number | ≥ 0, ≤ 800 | Weight, pounds (lb) · With stones: the pounds over the stones. | |
heightFt | integer | ≥ 3, ≤ 8 | Height, feet (ft) | |
heightIn | number | ≥ 0, ≤ 11.99 | 0 | Height, inches (in) |
activity | string | sedentary | light | moderate | active | veryActive | sedentary | Activity level |
goal | string | maintain | lose | loseMore | gain | maintain | Goal |
carbsPct | number | ≥ 0, ≤ 100 | 50 | Carbohydrate share (%) |
proteinPct | number | ≥ 0, ≤ 100 | 20 | Protein share (%) |
fatPct | number | ≥ 0, ≤ 100 | 30 | Fat share (%) |
Output
| Field | Type | Description |
|---|---|---|
bmr | number | Basal metabolic rate (BMR) (kcal/day) |
tdee | number | Daily calorie need (kcal/day) |
tdeeKj | number | Daily energy need in kJ (kJ/day) |
goalCalories | number | Daily calories for your goal (kcal/day) |
goalKj | number | Daily energy for your goal in kJ (kJ/day) |
carbs | number | Carbohydrate (g/day) |
protein | number | Protein (g/day) |
fat | number | Fat (g/day) |
Example request
curl -X POST https://hesaplayici.com/api/v1/tools/health.calorie/execute \
-H 'Content-Type: application/json' \
-d '{"input":{"sex":"female","age":31,"units":"metric","weight":65,"height":168,"heightIn":0,"activity":"moderate","goal":"maintain","carbsPct":50,"proteinPct":20,"fatPct":30},"locale":"en"}'Example answer
{
"output": {
"bmr": 1384,
"tdee": 2145,
"tdeeKj": 8976,
"goalCalories": 2145,
"goalKj": 8976,
"carbs": 268,
"protein": 107,
"fat": 72
},
"steps": [
{
"id": "bmr",
"formula": "BMR = 10 × weight + 6.25 × height − 5 × age − 161",
"substitution": "BMR = 10 × 65 + 6.25 × 168 − 5 × 31 − 161",
"value": 1384,
"unit": "kcal"
},
{
"id": "tdee",
"formula": "daily energy need = BMR × activity factor",
"substitution": "daily energy need = 1,384 × 1.55",
"value": 2145,
"unit": "kcal"
},
{
"id": "tdeeKj",
"formula": "daily energy need (kJ) = BMR × activity factor × 4.184",
"substitution": "daily energy need (kJ) = 1,384 × 1.55 × 4.184",
"value": 8976,
"unit": "kJ"
},
{
"id": "goalCalories",
"formula": "goal calories = daily energy need",
"substitution": "goal calories = 2,145",
"value": 2145,
"unit": "kcal"
},
{
"id": "goalKj",
"formula": "goal energy (kJ) = goal calories × 4.184",
"substitution": "goal energy (kJ) = 2,145.2 × 4.184",
"value": 8976,
"unit": "kJ"
},
{
"id": "carbs",
"formula": "carbohydrate = goal calories × carbohydrate share / 4",
"substitution": "carbohydrate = 2,145 × 50% / 4",
"value": 268,
"unit": "g"
},
{
"id": "protein",
"formula": "protein = goal calories × protein share / 4",
"substitution": "protein = 2,145 × 20% / 4",
"value": 107,
"unit": "g"
},
{
"id": "fat",
"formula": "fat = goal calories × fat share / 9",
"substitution": "fat = 2,145 × 30% / 9",
"value": 72,
"unit": "g"
}
],
"notes": [],
"meta": {
"toolVersion": "1.0.0",
"locale": "en"
},
"citation": {
"url": "https://hesaplayici.com/en/health/calorie-calculator",
"title": "Calorie Calculator"
}
}