2

On the USDA FoodData Central API, I can successfully fetch foods, and get all of their details. However, I realized that the USDA FoodData Central API does not return an image for the foods. As per my requirements, I need an image to accompany the food.

I tried using the UPC number to fetch the image by using a barcode API, however a lot of the time it does not work and doesn't return any data. Also, this method won't work for Foundational Food types.

Also, if someone knows of a better food API which provides images, please tell me. I would be willing to switch to another API if that one has food images (as well as food names, branded and general).

2
  • Can you get me name of food items? Oct 2, 2023 at 11:54
  • 1
    If you want examples of what I'm looking for, they are like apples, Doritos, tacos, Taco Bell burrito, salad, cheddar cheese, etc.
    – undevable
    Oct 2, 2023 at 23:13

1 Answer 1

0

You can get images for food and other items on USDA Photos Search Engine. Here, after searching you have to look for search result with description "News Image Number..". For example : You can see for "onion" in given images.Search results for "onion".. On following mentioned search result.I tried to automate result with web scrapping, but it is not working with well.

2
  • @undevable Please let me whether it helps or not? Oct 7, 2023 at 8:57
  • 1
    Nope, doesn't work. It only works for very general foods (i.e. Onions, Cheese), but for branded foods, it does not work (i.e. Doritos). Thanks for the answer though.
    – undevable
    Oct 7, 2023 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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