{"openapi":"3.1.0","info":{"title":"BMR & Calorie API","version":"1.0.0","description":"Energy-expenditure and nutrition maths as an API, computed locally and deterministically. The bmr endpoint computes the basal metabolic rate — the calories the body burns at rest — from weight, height, age and sex, using the modern Mifflin-St Jeor equation (BMR = 10·kg + 6.25·cm − 5·age + 5 for men, −161 for women) and reporting the classic revised Harris-Benedict value alongside for comparison. The tdee endpoint computes the total daily energy expenditure, TDEE = BMR × an activity factor from sedentary (1.2) to very active (1.9), and the goal calories for maintenance, mild and standard weight loss and weight gain — a 500 kcal/day deficit or surplus is about 0.45 kg per week. The macros endpoint splits a calorie target into protein, fat and carbohydrate grams, with protein set per kilogram of bodyweight (4 kcal/g protein and carbs, 9 kcal/g fat). Everything is computed locally and deterministically, so it is instant and private. Ideal for fitness, nutrition and health-app developers, diet and meal-planning tools, gym and coaching apps, and wellness dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. Estimates only, not medical advice. 3 endpoints. This is metabolic-rate and calorie maths; for body-mass-index use a BMI calculator.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bmr-api","description":"oanor gateway"}],"tags":[{"name":"BMR"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/bmr":{"get":{"operationId":"get_v1_bmr","tags":["BMR"],"summary":"Basal metabolic rate","description":"","parameters":[{"name":"weight","in":"query","required":true,"description":"Weight (kg)","schema":{"type":"string"},"example":"80"},{"name":"height","in":"query","required":true,"description":"Height (cm)","schema":{"type":"string"},"example":"180"},{"name":"age","in":"query","required":true,"description":"Age (years)","schema":{"type":"string"},"example":"30"},{"name":"sex","in":"query","required":true,"description":"male | female","schema":{"type":"string"},"example":"male"},{"name":"formula","in":"query","required":false,"description":"mifflin | harris (default mifflin)","schema":{"type":"string"},"example":"mifflin"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"BMR is resting energy. Mifflin-St Jeor is the modern default; Harris-Benedict is the classic revised form.","inputs":{"age":30,"sex":"male","height":180,"weight":80,"formula":"mifflin"},"bmr_kcal_day":1780,"harris_kcal_day":1853.63,"mifflin_kcal_day":1780},"meta":{"timestamp":"2026-06-04T18:38:22.031Z","request_id":"99bfda17-2f61-48ae-910d-37966baca2d1"},"status":"ok","message":"Basal metabolic rate","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/macros":{"get":{"operationId":"get_v1_macros","tags":["BMR"],"summary":"Macronutrient split","description":"","parameters":[{"name":"calories","in":"query","required":true,"description":"Calorie target (kcal)","schema":{"type":"string"},"example":"2500"},{"name":"weight","in":"query","required":false,"description":"Bodyweight (kg) for protein per kg","schema":{"type":"string"},"example":"80"},{"name":"protein_per_kg","in":"query","required":false,"description":"Protein g per kg (default 2.0)","schema":{"type":"string"},"example":"2.0"},{"name":"fat_percent","in":"query","required":false,"description":"Fat as % of calories (default 25)","schema":{"type":"string"},"example":"25"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Protein and carbs are 4 kcal/g, fat is 9 kcal/g. Protein from g/kg when a weight is given, otherwise 30 % of calories.","fat_g":69.4,"inputs":{"weight":80,"calories":2500,"fat_percent":25,"protein_per_kg":2},"carbs_g":308.8,"fat_kcal":625,"carb_kcal":1235,"protein_g":160,"protein_kcal":640},"meta":{"timestamp":"2026-06-04T18:38:22.137Z","request_id":"a6bd798b-6b2b-4ca7-8a0a-cee1513c459f"},"status":"ok","message":"Macronutrient split","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/tdee":{"get":{"operationId":"get_v1_tdee","tags":["BMR"],"summary":"Total daily energy","description":"","parameters":[{"name":"bmr","in":"query","required":false,"description":"BMR (kcal/day)","schema":{"type":"string"},"example":"1780"},{"name":"weight","in":"query","required":false,"description":"Or weight (kg)","schema":{"type":"string"},"example":"80"},{"name":"height","in":"query","required":false,"description":"height (cm)","schema":{"type":"string"},"example":"180"},{"name":"age","in":"query","required":false,"description":"age (years)","schema":{"type":"string"},"example":"30"},{"name":"sex","in":"query","required":false,"description":"male | female","schema":{"type":"string"},"example":"male"},{"name":"activity_level","in":"query","required":false,"description":"sedentary | light | moderate | active | very_active","schema":{"type":"string"},"example":"moderate"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"TDEE = BMR × activity factor. A ~500 kcal/day deficit or surplus is roughly 0.45 kg per week.","inputs":{"bmr":1780,"activity_level":"moderate","activity_factor":1.55},"tdee_kcal_day":2759,"mild_loss_kcal":2509,"maintenance_kcal":2759,"weight_gain_kcal":3259,"weight_loss_kcal":2259},"meta":{"timestamp":"2026-06-04T18:38:22.253Z","request_id":"9a862609-41ad-41a7-87f2-bfaae208dc84"},"status":"ok","message":"Total daily energy","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Weight in kg, height in cm, age in years. Activity: sedentary 1.2, light 1.375, moderate 1.55, active 1.725, very_active 1.9. Estimates only — not medical advice.","service":"bmr-api","formulae":{"tdee":"TDEE = BMR × activity factor (1.2–1.9)","macros":"protein/carb 4 kcal/g, fat 9 kcal/g","mifflin":"BMR = 10·kg + 6.25·cm − 5·age + (male:+5 / female:−161)"},"endpoints":{"GET /v1/bmr":"Basal metabolic rate from weight, height, age and sex (both formulae).","GET /v1/meta":"This document.","GET /v1/tdee":"Total daily energy expenditure and goal calories from BMR (or body data) and activity level.","GET /v1/macros":"Protein/fat/carb split (grams and kcal) from a calorie target."},"description":"Energy-expenditure calculator: basal metabolic rate (Mifflin-St Jeor and Harris-Benedict), total daily energy expenditure and macronutrient split."},"meta":{"timestamp":"2026-06-04T18:38:22.369Z","request_id":"cd93fc03-6aa5-4477-a432-123608e63d59"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":3000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":400,"monthly_call_quota":40000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1100,"monthly_call_quota":250000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3900,"monthly_call_quota":1500000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bmr-api"}