Nutritionix · Schema

NaturalNutrientsRequest

Request body for the natural language nutrients endpoint.

RestaurantHealthNutritionFoodFitnessPublic APIs

Properties

Name Type Description
query string Plain-text description of the food(s) to analyze.
num_servings integer Multiplier applied to the parsed serving quantities.
aggregate string When set, aggregates all foods into a single named result.
line_delimited boolean Treat each newline in the query as a separate food.
use_raw_foods boolean Prefer raw (uncooked) USDA foods when resolving the query.
include_subrecipe boolean Include sub-recipe ingredient breakdowns where available.
timezone string IANA timezone used for consumed_at calculations.
consumed_at string Timestamp the food was consumed.
use_branded_foods boolean Allow branded foods to satisfy the query.
locale string Locale code used to localize results.
View JSON Schema on GitHub

JSON Schema

track-natural-nutrients-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nutritionix/refs/heads/main/json-schema/track-natural-nutrients-request-schema.json",
  "title": "NaturalNutrientsRequest",
  "description": "Request body for the natural language nutrients endpoint.",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Plain-text description of the food(s) to analyze.",
      "example": "1 cup mashed potatoes and 2 tbsp gravy"
    },
    "num_servings": {
      "type": "integer",
      "description": "Multiplier applied to the parsed serving quantities."
    },
    "aggregate": {
      "type": "string",
      "description": "When set, aggregates all foods into a single named result."
    },
    "line_delimited": {
      "type": "boolean",
      "description": "Treat each newline in the query as a separate food.",
      "default": false
    },
    "use_raw_foods": {
      "type": "boolean",
      "description": "Prefer raw (uncooked) USDA foods when resolving the query.",
      "default": false
    },
    "include_subrecipe": {
      "type": "boolean",
      "description": "Include sub-recipe ingredient breakdowns where available.",
      "default": false
    },
    "timezone": {
      "type": "string",
      "description": "IANA timezone used for consumed_at calculations.",
      "example": "US/Eastern"
    },
    "consumed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp the food was consumed."
    },
    "use_branded_foods": {
      "type": "boolean",
      "description": "Allow branded foods to satisfy the query.",
      "default": false
    },
    "locale": {
      "type": "string",
      "description": "Locale code used to localize results.",
      "example": "en_US"
    }
  },
  "required": [
    "query"
  ]
}