桑帛云API

体脂率计算

GET 无需 Key 运行中

接口简介

体脂率计算API,输入体重、性别、腰围、身高4项基础数据,快速精准计算并返回体脂率结果,算法科学权威,响应即时,适配健康管理、健身APP、个人健康监测等场景。

接口地址

https://api.lolimi.cn/API/xxjc/api2

请求示例

测试访问
https://api.lolimi.cn/API/xxjc/api2?weight=50&gender=男&waist=10&height=1.85

返回预览

JSON
{
    "code": 2,
    "text": "获取成功!",
    "msg": "您的体脂率大约为:27.840242971826%"
}

请求参数

参数名类型必填描述
weightintRequired体重(公斤)
genderstringRequired性别(男/女)
waistintRequired围腰(厘米)
heightintRequired身高(米,例如1米86应写作1.86)

返回参数

参数名类型描述
codeint状态码
textstring获取状态
textstring计算体脂率结果

参数配置

登录获取 Key
<?php
$url = "https://api.lolimi.cn/API/xxjc/api2";
$params = array (
  'weight' => 'value',
  'gender' => 'value',
  'waist' => 'value',
  'height' => 'value',
);
$url .= '?' . http_build_query($params);
$res = file_get_contents($url);
echo $res;
概览
文档
调试
代码
已复制到剪贴板