Usda Fdc Search Foods Example

Federal GovernmentAgricultureFood SafetyNutritionRural DevelopmentClimate

Usda Fdc Search Foods Example is an example object payload from United States Department of Agriculture, with 3 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdrequestresponse

Example Payload

Raw ↑
{
  "operationId": "searchFoods",
  "request": {
    "method": "GET",
    "url": "https://api.nal.usda.gov/fdc/v1/foods/search",
    "parameters": {
      "api_key": "DEMO_KEY",
      "query": "cheddar cheese",
      "dataType": "Foundation",
      "pageSize": 5
    }
  },
  "response": {
    "status": 200,
    "contentType": "application/json",
    "body": {
      "totalHits": 42,
      "currentPage": 1,
      "totalPages": 9,
      "foods": [
        {
          "fdcId": 328637,
          "description": "Cheese, cheddar",
          "dataType": "Foundation",
          "publishedDate": "2019-04-01",
          "score": 932.8
        },
        {
          "fdcId": 173414,
          "description": "Cheese, cheddar, reduced fat",
          "dataType": "SR Legacy",
          "publishedDate": "2019-04-01",
          "score": 908.5
        }
      ]
    }
  }
}