Skip to content

Protein Calculator API

Return protein recommendations in multiple frameworks for robust nutrition planning.

Endpoint

  • GET /api/v1/protein-calculator
  • POST /api/v1/protein-calculator/post

Parameters

Name Type Required In Description
sex string Yes Query/Body male or female.
age number (>0) Yes Query/Body Age in years.
height number (>0) Yes Query/Body Height in cm (metric) or inches (imperial).
weight number (>0) Yes Query/Body Weight in kg (metric) or lb (imperial).
activity_level string Yes Query/Body sedentary,lightly_active,moderately_active,very_active,extra_active.
unit string No Query/Body metric (default) or imperial.
lang string No Query Response language (en,es,de,fr,pt,ja,hi,ar).

Why Use This Endpoint

  • Combine baseline and performance protein guidance in one call.
  • Support personalized macro engines and meal plans.
  • Return implementation guidance fields for UX clarity.

Get Started

Request Example

curl -X GET "https://api.hefitapi.com/api/v1/protein-calculator?sex=male&age=34&height=178&weight=82&activity_level=very_active&unit=metric&lang=en" \
  -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/protein-calculator/post?lang=en" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"sex":"female","age":31,"height":66,"weight":148,"activity_level":"moderately_active","unit":"imperial"}'

Response Example

Info

The response example below is for demonstration purposes only. Make a live request to this endpoint to receive the full, real-time, and potentially richer JSON structure.

{
  "sex": "male",
  "age": 34.0,
  "height_cm": 178.0,
  "weight_kg": 82.0,
  "unit": "metric",
  "activity_level": "very_active",
  "tdee_kcal_per_day": 2949.41,
  "usda_protein_grams_range": [73.74, 221.21],
  "who_protein_grams": 68.06,
  "activity_target_protein_g": 131.2,
  "activity_target_g_per_kg": 1.6,
  "protein_band": "moderate",
  "protein_band_label": "Moderate",
  "distribution_guidance": ["Split protein across 3-5 meals"],
  "action_plan": ["Keep daily protein target consistent"],
  "quality_guardrails": ["Prioritize high-quality protein sources"],
  "_enterprise": {"client": "Acme Health", "plan": "pro", "request_id": "dad775e89ecac88f", "quota": 120, "usage_tracking": true},
  "_api_metadata_": {"endpoint_name": "protein_calculator", "response_language": "en"}
}

Product Positioning

A core endpoint for nutrition products, coaching platforms, and metabolic health apps.

Note

Age, height, and weight must be positive numbers.