fooddata-central
Node.js client and API types for USDA FoodData Central.
FoodData Central is an API provided by the U.S. Department of Agriculture that provides expanded nutrient profile data for foods.
Getting Started
yarn add fooddata-central
Prerequisites
An API key is required to interact with the FoodData Central API. Sign-up for an API key.
Usage
; async { // initialize a new client const client = api_key: "API_KEY" ; // search foods based on an input const results = await client; if resultssuccess // get details for food item const details = await client; if detailssuccess console; };