Nutrition data types

  • Nutrition data includes information about hydration and food consumption.

  • Hydration data points represent the volume of water consumed in a single drink.

  • Nutrition data points detail nutrients consumed as part of a meal or food item, requiring a nutrients field and either a meal type or food item field.

  • Both hydration and nutrition data types have defined names and fields for use with REST and Android interfaces.

  • Specific fields like volume for hydration and meal type, food item, and nutrients for nutrition are detailed with their formats and units.

Data types for nutrition data.

Hydration

Each data point represents how much water a user drank in a single drink.

REST

Namecom.google.hydration
OAuth permission scopes
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
Fields (format—units) volume (float—liters)
Volume of water consumed.

Android

Namecom.google.hydration
Data type objectTYPE_HYDRATION
Fields (format—units) FIELD_VOLUME (float—liters)
Volume of liquid consumed.

Nutrition

Each data point represents what nutrients were consumed as part of a meal or a food item. The data point contains several fields. The nutrients field is required. And either one, or both, of the meal type and food item fields are required.

REST

Namecom.google.nutrition
OAuth permission scopes
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
Fields (format—units)
meal type (int—enum) (optional field)
What kind of meal the user ate.
food item (string—n/a)
The specific food item for the entry. For example, "banana" or "porridge".
nutrients (Map<String>—calories/grams)
The nutritional breakdown of the food item eaten.

Android

Namecom.google.nutrition
Data type objectTYPE_NUTRITION
Fields (format—units)
FIELD_MEAL_TYPE (int—enum) (optional field)
What kind of meal the user ate.
FIELD_FOOD_ITEM (string—free-form text)
A description of the food for the entry. For example, "banana" or "porridge".
FIELD_NUTRIENTS (Map<String>—kilocalories/grams/milligrams)
The nutritional breakdown of the food item eaten.