## 营养成分表 >[danger]### 会员接口,仅限会员使用,购买[API会员](https://market.topthink.com/product/210) ![](https://img.kancloud.cn/f3/50/f350d36e706d443bc9cf34e36177ec41_200x200.png) > 查询近两千种食物的具体详细的营养成分及重量在100克情况下的含量、支持食品种类检索和成分含量排序。注意mode参数,为0时搜索食品的营养成分含量(例如油条、黄瓜),为1是搜索食品分类(例如谷类、水果类),为2为搜索营养成分含量排名从高到低(例如热量rl、钙含量gai),为3就是成分含量从低到高。 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ### 请求地址 ``` GET https://api.topthink.com/food/nutrient ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是| string|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | word| 是 | string | 食品名称、类型名称、营养成分缩写| | mode| 是 | int | 搜索模式:0营养成分(默认)、1食品类型、2营养正序、3营养倒序| | num| 否 | int | 返回数量,默认1,最大20| | page| 否 | int | 分页| ### 返回`data`参数 | 名称 | 类型 | 示例值 | 说明 | | --- | --- | --- | --- | | name | string | 油条 | 食品名称 | | rl | float | 386 | 热量(大卡) | | las | float | 0.01 | 硫胺素 | | gai | float | 6 | 钙(毫克) | | dbz | float | 6.9 | 蛋白质 | | su | float | 0.07 | 核黄素 | | mei | float | 19 | 镁 | | zf | float | 17.6 | 脂肪 | | ys | float | 0.7 | 烟酸 | | tei | float | 1 | 铁 | | shhf | float | 50.1 | 碳水化合物 | | wsfc | float | 0 | 维生素C | | meng | float | 0.52 | 锰 | | ssxw | float | 0.9 | 膳食纤维 | | wsse | float | 3.19 | 维生素E | | xin | float | 0.75 | 锌 | | wssa | float | 0 | 维生素A | | dgc | float | 0 | 胆固醇 | | tong | float | 0.19 | 铜 | | lb | float | 2.7 | 胡罗卜素 | | jia | float | 227 | 钾 | | ling | float | 77 | 磷 | | shc | float | 21.8 | 视黄醇当量 | | la | float | 585.2 | 钠 | | xi | float | 8.6 | 硒 | | type | string | 谷类 | 食品种类 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->foodNutrient() ->withWord('油条') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功的返回", "data": { "name":"油条", "rl":386, "las":0.01, "gai":6, "dbz":6.9, "su":0.07, "mei":19, "zf":17.6, "ys":0.7, "tei":1, "shhf":50.1, "wsfc":0, "meng":0.52, "ssxw":0.9, "wsse":3.19, "xin":0.75, "wssa":0, "dgc":0, "tong":0.19, "lb":2.7, "jia":227, "ling":77, "shc":21.8, "la":585.2, "xi":8.6, "type":"谷类" } } ~~~