0

I am using USDA API for personal use but stuck at a problem on food central website, there is an option to select portion or serving size, but I am not sure how to do this with the API.

I have API key as well and have read all its documentation, but didn't find how to use serving size in API.

Neither of these links work:

  • https://api.nal.usda.gov/fdc/v1/foods/search?api_key=&description=Standard Reference&pageSize=1&dataType=Branded&pageSize=1&householdServingFullText=1 ONZ

  • https://api.nal.usda.gov/fdc/v1/foods/search?api_key=api_key&description=Standard Reference&pageSize=1&dataType=Branded&pageSize=1&servingSize=100&servingSizeUnit=g

By "not working" I mean on hitting API it gives standard response (JSON data) but the serving is not mentioned.

James
  • 1,124
  • 3
  • 17
  • 37

0 Answers0