Skip to content
AF
Google Health API reference

Food: the Google Health API food data type

Read from Google’s documentation on 2026-10-17 · discovery document revision 20261014 · Google’s data-types page last updated 2026-10-06

Food (food) is a Food data type in the Google Health API. Google's data-types table lists list and get for it under the .nutrition.readonly and .nutrition.writeonly scopes. The table marks it with neither webhook nor true-zeros support. Google's Fitbit migration table maps the Fitbit Web API's Food data to it.

Food at a glance

From the Food row of Google’s data-types table, joined to the discovery document’s DataPoint schema.

Display name
Food
dataType (in endpoint URLs)
food
filter parameter
foodGoogle: “The identifier separated by underscores (for example, active_minutes) used as the value for the dataType filter parameter in daily rollup and rollup requests.”
Record type
Food — Google: “Represents a food item or nutrition-related data entity.”
Storage resolution
not stated in Google’s table
Webhook support
Not marked in Google’s table
True zeros support
Not marked in Google’s table
Channel
v4
DataPoint field
DataPoint.food → FoodMatched by the kebab-case rule; its description: “Optional. The food details.”
Compatible devices
0 in Google’s table

Operations and request paths

The operations Google’s table lists for food, each matched to its users.dataTypes.dataPoints method in the discovery document. The path is the documented path template (the method’s flatPath on https://health.googleapis.com/) with {dataTypesId} filled in as food. Google on {user}: “The {user} can be either the alias me or the authenticated user's numeric Health User ID (retrieved via GetIdentity).”

Table listsMethodDocumented path template
listlistGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/food/dataPoints
getgetGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/food/dataPoints/{dataPointsId}

Every method, and how many of the data types list it: the methods overview.

Scopes

The scopes Google’s table lists for food, as full URLs, with the consent text Google’s Scopes page gives each. Every Google Health API scope.

ScopeAccessGoogle’s permission text
https://www.googleapis.com/auth/googlehealth.nutrition.readonlynot in the v4 discovery documentreadSee your Google Health nutrition data.
https://www.googleapis.com/auth/googlehealth.nutrition.writeonlywriteAdd nutrition data to Google Health, and edit or delete the data it adds.

Fields of Food

The schema the discovery document gives DataPoint.food, required fields first. Types are as the discovery document states them; the label is the word Google’s description opens with. The schemas its fields refer to follow, one level deep.

Food — Google: “Represents a food item.”

FieldTypeGoogle’s description
accessLevelRequiredstringRequired. The access level of the food.
  • FOOD_ACCESS_LEVEL_UNSPECIFIED — Unspecified food access level.
  • FOOD_ACCESS_LEVEL_PUBLIC — Public food access level.
  • FOOD_ACCESS_LEVEL_PRIVATE — Private food access level.
defaultServingRequiredFoodServingRequired. Value representing the default serving of the food.
displayNameRequiredstringRequired. The display name of the food.
brandOptionalstringOptional. The brand of the food.
descriptionOptionalstringOptional. The description of the food.
energyAvgOptionalEnergyQuantityOptional. Value representing the average energy of the food for the default serving.
energyFromFatOptionalEnergyQuantityOptional. Value representing the energy from fat of the food for the default serving.
energyMaxOptionalEnergyQuantityOptional. Value representing the maximum energy of the food for the default serving.
energyMinOptionalEnergyQuantityOptional. Value representing the minimum energy of the food for the default serving.
languageCodeOptionalstringOptional. The language code where the food is available in format xx-XX. Supported values are defined in Settings.food_language_code.
mealTypeOptionalstringOptional. The meal type associated with this food.
  • MEAL_TYPE_UNSPECIFIED — Unspecified meal type.
  • BEFORE_BREAKFAST — Value representing a meal before breakfast.
  • BREAKFAST — Value representing a breakfast.
  • BEFORE_LUNCH — Value representing a morning snack.
  • LUNCH — Value representing a lunch.
  • BEFORE_DINNER — Value representing an afternoon snack.
  • DINNER — Value representing dinner.
  • AFTER_DINNER — Value representing an evening snack.
  • SNACK — Value representing any meal outside of the usual three meals per day.
  • ANYTIME — Value representing any time (legacy NA).
nutrientsOptionalarray<NutrientQuantity>Optional. Value representing the nutrients of the food for the default serving.
servingsOptionalarray<FoodServing>Optional. The serving of the food.
totalCarbohydrateOptionalWeightQuantityOptional. Value representing the total carbohydrate of the food for the default serving.
totalFatOptionalWeightQuantityOptional. Value representing the total fat of the food for the default serving.

FoodServing

Google: “Represents different properties and information about the serving of a specific food.”

FieldTypeGoogle’s description
foodMeasurementUnitRequiredstringRequired. Food measurement unit
amountOptionalnumber/doubleOptional. Amount of food consumed, fractional values are supported.
foodMeasurementUnitDisplayNameOutput onlystringOutput only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
foodMeasurementUnitDisplayNamePluralOutput onlystringOutput only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams").
multiplierOptionalnumber/doubleOptional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving.

EnergyQuantity

Google: “Represents the energy quantity.”

FieldTypeGoogle’s description
kcalRequirednumber/doubleRequired. The energy value in kilocalories. Must be in the range [0, 100000].
userProvidedUnitOptionalstringOptional. Value representing the user provided unit.
  • ENERGY_UNIT_UNSPECIFIED — Unspecified energy unit.
  • JOULE — Value representing joule.
  • KILOJOULE — Value representing kilojoule.
  • KILOCALORIE — Value representing kilocalorie.
  • SMALL_CALORIE — Value representing small calorie.
  • CALORIE — Value representing calorie.

NutrientQuantity

Google: “Represents the quantity of a nutrient.”

FieldTypeGoogle’s description
nutrientRequiredstringRequired. The nutrient type.
  • NUTRIENT_UNSPECIFIED — Unspecified nutrient.
  • BIOTIN — Value representing biotin nutrient.
  • CAFFEINE — Value representing caffeine nutrient.
  • CALCIUM — Value representing calcium nutrient.
  • CHLORIDE — Value representing chloride nutrient.
  • CARBOHYDRATES — Value representing carbohydrates nutrient.
  • CHOLESTEROL — Value representing cholesterol nutrient.
  • CHROMIUM — Value representing chromium nutrient.
  • COPPER — Value representing copper nutrient.
  • DIETARY_FIBER — Value representing dietary fiber nutrient.
  • FOLIC_ACID — Value representing folic acid nutrient.
  • IODINE — Value representing iodine nutrient.
  • IRON — Value representing iron nutrient.
  • MAGNESIUM — Value representing magnesium nutrient.
  • MANGANESE — Value representing manganese nutrient.
  • MOLYBDENUM — Value representing molybdenum nutrient.
  • MONOUNSATURATED_FAT — Value representing monounsaturated fat nutrient.
  • NIACIN — Value representing niacin nutrient.
  • PANTOTHENIC_ACID — Value representing pantothenic acid nutrient.
  • PHOSPHORUS — Value representing phosphorus nutrient.
  • POLYUNSATURATED_FAT — Value representing polyunsaturated fat nutrient.
  • POTASSIUM — Value representing potassium nutrient.
  • PROTEIN — Value representing protein nutrient.
  • RIBOFLAVIN — Value representing riboflavin nutrient.
  • SATURATED_FAT — Value representing saturated fat nutrient.
  • SELENIUM — Value representing selenium nutrient.
  • SODIUM — Value representing sodium nutrient.
  • SUGAR — Value representing sugar nutrient.
  • THIAMIN — Value representing thiamin nutrient.
  • TRANS_FAT — Value representing trans fat nutrient.
  • UNSATURATED_FAT — Value representing unsaturated fat nutrient.
  • VITAMIN_A — Value representing vitamin A nutrient.
  • VITAMIN_B12 — Value representing vitamin B12 nutrient.
  • VITAMIN_B6 — Value representing vitamin B6 nutrient.
  • VITAMIN_C — Value representing vitamin C nutrient.
  • VITAMIN_D — Value representing vitamin D nutrient.
  • VITAMIN_E — Value representing vitamin E nutrient.
  • VITAMIN_K — Value representing vitamin K nutrient.
  • ZINC — Value representing zinc nutrient.
  • FOLATE — Value representing folate nutrient.
quantityRequiredWeightQuantityRequired. The quantity of the nutrient, measured in grams.

WeightQuantity

Google: “Represents the weight quantity.”

FieldTypeGoogle’s description
gramsRequirednumber/doubleRequired. The weight value in grams. Must be in the range [0, 100000].
userProvidedUnitOptionalstringOptional. Value representing the user provided unit.
  • WEIGHT_UNIT_UNSPECIFIED — Unspecified weight unit.
  • GRAM — Value representing gram.
  • KILOGRAM — Value representing kilogram.
  • OUNCE — Value representing ounce.
  • POUND — Value representing pound.
  • STONE — Value representing stone.
  • MILLIGRAM — Value representing milligram.
  • MICROGRAM — Value representing microgram.
  • NANOGRAM — Value representing nanogram.

Fitbit Web API predecessor

Google’s Fitbit Web API → Google Health API data-type table maps Food to food.

Fitbit Web API scopes Google maps to food’s scopes: nutrition.

Google’s full Fitbit Web API mapping tables · the migration playbook

Where Google’s pages disagree

Published as found, with the texts that disagree; nothing here is corrected by us.

  • Scope missing from the discovery document

    The table lists .nutrition.readonly for food, but the v4 discovery document defines no https://www.googleapis.com/auth/googlehealth.nutrition.readonly scope, and none of its methods accepts it.

    • Google's data-types page: “.nutrition.readonly”
    • Google's Scopes page: “See your Google Health nutrition data.”

Google’s documentation

Related on this site

Questions

Which OAuth scopes does the Google Health API food data type need?

Google's data-types table (read 2026-10-17) lists https://www.googleapis.com/auth/googlehealth.nutrition.readonly and https://www.googleapis.com/auth/googlehealth.nutrition.writeonly for food. The Scopes page's consent text: .nutrition.readonly, "See your Google Health nutrition data."; .nutrition.writeonly, "Add nutrition data to Google Health, and edit or delete the data it adds." Note that https://www.googleapis.com/auth/googlehealth.nutrition.readonly is not defined in the v4 discovery document, and none of its methods lists it among accepted scopes.

Can apps write food data to the Google Health API?

Not according to Google's data-types table, read 2026-10-17: it lists only list and get for food, and no create, update or batchDelete operation.

How do you aggregate food data with the Google Health API?

Not with rollUp or dailyRollUp, going by Google's data-types table: it lists only list and get for food. Read the data points with list (or reconcile, where listed) and compute any summary yourself.

What did the Google Health API food data type replace in the Fitbit Web API?

Google's Fitbit Web API migration table maps the Fitbit Web API's "Food" to food. The Fitbit Web API scope Google maps to its scopes: nutrition.

Other nutrition data types

All nutrition data types →

Sources checked

Google’s text is quoted for identification; each guide page’s footer reads: “Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.”. Generated from Google’s pages by scripts/fetch-google-health-api.mjs, not typed by hand; Google’s documentation remains the authority.

← All Google Health API data types