TDEE BMR Macro Calculator API for Fitness App Onboarding
Published May 30, 2026
Fitness app onboarding is where users decide if your product "gets them." A TDEE BMR macro calculator API fitness app onboarding flow collects age, weight, height, activity, and goal, then returns daily calories plus protein, carbs, and fat targets before the first meal log.
Technical reference: TDEE macro calculator API. This guide focuses on onboarding UX and integration.
Onboarding Screen Flow
| Step | Collect | Why |
|---|---|---|
| 1 | Gender, age | BMR formula input |
| 2 | Height, weight | BMR + TDEE |
| 3 | Activity level | TDEE multiplier |
| 4 | Goal (lose/maintain/gain) | Calorie adjustment |
| 5 | Results screen | Show targets before paywall |
API Call at Step 5
curl "https://api.calorieapi.com/api/v1/public/calc/macros\
?age=28&gender=female&weight_kg=65&height_cm=165\
&activity=moderately_active&goal=lose"
Store daily_targets in your user profile table.
React Onboarding Example
async function completeOnboarding(profile) {
const params = new URLSearchParams({
age: profile.age,
gender: profile.gender,
weight_kg: profile.weightKg,
height_cm: profile.heightCm,
activity: profile.activity,
goal: profile.goal,
});
const res = await fetch(`/api/onboarding/macros?${params}`);
const targets = await res.json();
await saveUserProfile({ ...profile, targets: targets.daily_targets });
}
Proxy through your backend even though the calc endpoint is public, so you can add analytics and rate limits.
Results UI Mapping
| API field | Onboarding UI |
|---|---|
daily_targets.calories | "Your daily goal: 1,850 kcal" |
daily_targets.protein_g | Protein ring starting value |
tdee | "Maintenance: 2,200 kcal" tooltip |
bmr | "At rest you burn ~1,420 kcal" |
Conversion Tips
- Show targets before asking for email when possible
- Pre-fill activity with "moderately active" as default
- Let users adjust protein upward for gym apps (bodybuilding guide)
After Onboarding
Food logging uses search and portion scaling against these targets.
Frequently Asked Questions
How do I add TDEE calculation to fitness app onboarding?
Collect age, gender, weight, height, activity, and goal during onboarding, call Calorie API GET /public/calc/macros, and store daily_targets before the user logs their first meal.
What is the difference between BMR and TDEE in onboarding?
BMR is calories burned at rest. TDEE multiplies BMR by activity level. Show both so users understand their maintenance calories vs goal calories.
Should onboarding call the macro API from the client?
Route through your backend proxy to add analytics, rate limits, and consistent error handling even for public calc endpoints.
Which Calorie API endpoint returns macro targets?
GET /api/v1/public/calc/macros returns BMR, TDEE, and daily_targets with calories, protein_g, carbohydrates_g, and fat_g.
Can I customize macro splits after the API response?
Yes. Use API targets as defaults, then let coaches or advanced users override protein or carb percentages in your app logic.
