Nutritionix
全球最大的经核实的营养数据库
- 认证方式
- API Key
- HTTPS
- Yes
- CORS
- Unknown
- 分类
- 健康
简介
Nutritionix 提供食物营养数据——搜索食物、获取卡路里/宏量和记录餐食。认证需要两个密钥(App ID + App Key)——无效密钥返回 401(已实测)。
快速开始
即时搜索(替换 APP_ID、APP_KEY):
curl "https://trackapi.nutritionix.com/v2/search/instant?query=apple" \
-H "x-app-id: APP_ID" \
-H "x-app-key: APP_KEY"
{
"common": [
{ "food_name": "apple", "serving_unit": "medium", "full_nutrition_xref": "513fceb375b8dbbc21000021" }
]
}
自然语言营养解析:
curl "https://trackapi.nutritionix.com/v2/natural/nutrients" \
-H "x-app-id: APP_ID" \
-H "x-app-key: APP_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "2 eggs and 1 toast"}'
认证方式
- 在 developer.nutritionix.com 注册 → App ID + App Key(邮件发送)。
- 同时发送
x-app-id和x-app-key请求头(缺失 → 401,已实测)。
速率限制与注意事项
- 免费层:约 1,000 次/月(以文档为准);付费档可扩展。
- 端点:
/v2/search/instant、/v2/search/item、/v2/natural/nutrients、/v2/natural/exercise。 - 自然语言解析器(“2 eggs and 1 toast”)是招牌功能。
常见问题
Nutritionix 免费吗? 免费层带月度额度;更多需要付费。
如何获取密钥? 在 developer.nutritionix.com 注册——App ID + Key 会邮件发送。
认证风格是什么?
两个请求头:x-app-id + x-app-key(已实测)。
健康 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| Clinical Trials Directory Every clinical trial registered with ClinicalTrials.gov, indexed by condition and sponsor | No auth | Yes | Yes | ↗ |
| CMS.gov Access to the data from the CMS - medicare.gov | API Key | Yes | Unknown | ↗ |
| Coronavirus HTTP API for Latest Covid-19 Data | No auth | Yes | Unknown | ↗ |
| Coronavirus in the UK UK Government coronavirus data, including deaths and cases by region | No auth | Yes | Unknown | ↗ |
| Covid Tracking Project Covid-19 data for the US | No auth | Yes | No | ↗ |