Fit-n-Bites API is a free light-weight RESTful API providing nutrition facts of common food. No redundant information is provided. Perfect for small to medium size projects, especially school demos.
An API key is necessary to use this API. Please contact landau@fitnbites.com to access API key.
By default, clients must pass their API key via the Authorization header. It must be formatted as follows:
Authorization: Api-Key ********
Example
curl -H 'Authorization: Api-Key ********' www.fitnbites.com/api/v1/foods/
/foods
Listing information of all available foods (Calorie, protein, etc.)
/foods/alcoholfree
Listing information of all alcohol free foods
/foods/caffeinefree
Listing information of all caffeine free foods
/food/id
Retrieving information of a specific target
/foods/?keyword=
Retrieving food descriptions with given keyword
/foods/?max=
Retrieving food with a calorie upper bound per 100 gram
/foods/?min=
Retrieving food with a calorie lower bound per 100 gram
Example
/api/v1/foods/alcoholfree/?keyword=cookie&max=300&min=200
Nutrient | Unit |
---|---|
Energy | kCal |
Protein | g |
Carbohydrate | g |
Sugar | g |
Fiber | g |
Alcohol | g |
Vitamin C | mg |
Vitamin A | mcg |
Vitamin B12 | mcg |
Vitamin D | mcg |
Calcium | mg |
Phosphorus | mg |
Magnesium | mg |
Iron | mg |
Zinc | mg |
Copper | mg |
Selenium | mcg |
Potassium | mg |
Sodium | mg |
Theobromine | mg |
Caffeine | mg |
- Django - Web Framework
- Django REST Framework - API Framework
- Amazon RDS for Postgresql - Database
- Heroku - Deployment Environment
- @LyapunovJingci - Framework, Deployment
- @ShuyiHuo - Idea, Data Cleaning