5

I am using an API that provides a load of nutritional information for food, for example calories, protein, etc. However what it does not provide is any sort of categorization of that food. Can anyone recommend a database or API, free or paid, that would allow me to match food names to general categories (like meat, fruit, vegetable, etc)? I am thinking if this is not in the food-database related space perhaps it's in some kind of text processing or NLP library I might not be familiar with?

Thanks for any suggestions!

  • I assume you're familiar with ndb.nal.usda.gov ? – user3856 Feb 11 '16 at 20:53
  • @BarryCarter Yes I am. I don't see a food category in the info provided by that API. Am I missing something? – helloB Feb 11 '16 at 20:58
  • Page 35 of ars.usda.gov/sp2UserFiles/Place/80400525/Data/SR/SR28/… notes that the "FdGrp_Cd" field should have this value. It also shows up when you do simple web searches. Not sure about their API, but you can download the entire database if desired. directionsforme.org/categories may also help, though you'll have to tweak it some. – user3856 Feb 11 '16 at 21:05
  • @BarryCarter Wow thanks. I will check the API more carefully. Unfortunately downloading the full database is not an option as this is for a mobile application. – helloB Feb 11 '16 at 22:35
  • The db is tiny (I think), fewer than 9000 foods, and you don't need all the tables. github.com/spbriggs/USDA-SR26/tree/master/sr26 may help. – user3856 Feb 11 '16 at 23:05
1

All the information in this answer was provided in the comments section by Barry Carter. I'm just putting it an answer because comments can be arbitrarily deleted and the information lost.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.