hesaplayıcı
Menu

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

FieldTypeConstraintsDefaultDescription
sex (required)stringfemale | maleSex
age (required)integer≥ 18, ≤ 100Age (years)
unitsstringmetric | pounds | stonesmetricUnits
weightnumber≥ 30, ≤ 300Weight (kg)
heightnumber≥ 120, ≤ 230Height (cm)
weightStinteger≥ 1, ≤ 55Weight, stones (st)
weightLbnumber≥ 0, ≤ 800Weight, pounds (lb) · With stones: the pounds over the stones.
heightFtinteger≥ 3, ≤ 8Height, feet (ft)
heightInnumber≥ 0, ≤ 11.990Height, inches (in)
activitystringsedentary | light | moderate | active | veryActivesedentaryActivity level
goalstringmaintain | lose | loseMore | gainmaintainGoal
carbsPctnumber≥ 0, ≤ 10050Carbohydrate share (%)
proteinPctnumber≥ 0, ≤ 10020Protein share (%)
fatPctnumber≥ 0, ≤ 10030Fat share (%)

Output

FieldTypeDescription
bmrnumberBasal metabolic rate (BMR) (kcal/day)
tdeenumberDaily calorie need (kcal/day)
tdeeKjnumberDaily energy need in kJ (kJ/day)
goalCaloriesnumberDaily calories for your goal (kcal/day)
goalKjnumberDaily energy for your goal in kJ (kJ/day)
carbsnumberCarbohydrate (g/day)
proteinnumberProtein (g/day)
fatnumberFat (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"
  }
}