/v1/macros
Macronutrient split
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
curl "https://api.oanor.com/bmr-api/v1/macros" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bmr-api/v1/macros", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bmr-api/v1/macros");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/bmr-api/v1/macros",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"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
}