Welcome to the how to guide for using the USDA API
Next

What is an API?

API stands for Application Programming Interface. The link below will take you to the Wikipedia page, which explains very thoroughly what an API is. But for our purposes, here is an example. Let's say that myFitnessPal had never been created, and I (or you) would be the soon-to-be-very-rich genius to come up with the idea for this app. I would need nutritional data for every potential food item that can possibly be consumed. So using the USDA API, I can get data from USDA, such as nutrition facts, which I can then use in my own app, which could then hopefully make me a ton of money.

Intro to JS and JSON

JS (Javascript) is the language and JSON (Javascript Object Notation) is the format that we need to know to use the USDA API. This section assumes that you have basic knowledge of Javascript.

The USDA API

United States Department of Agriculture

  • Click here to go to the USDA API documentation



    Click here for a deeper look into the API



Example Code

Click here to open up the example code page

Image credits

Click here for citations for the images on this website listed in the order that they appear