Skip to content
AF
Google Health API reference

Nutrition Log: the Google Health API nutrition-log 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

Nutrition Log (nutrition-log) is a Session data type in the Google Health API. Google's data-types table lists list, get, reconcile, rollup, dailyRollup, create, update and batchDelete for it under the .nutrition.readonly and .nutrition.writeonly scopes. The table marks it with webhook support. Google's Fitbit migration table maps the Fitbit Web API's Food Log data to it.

Nutrition Log at a glance

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

Display name
Nutrition Log
dataType (in endpoint URLs)
nutrition-log
filter parameter
nutrition_logGoogle: “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
Session — Google: “Represents a continuous block of recording, such as a workout or an electrocardiogram (ECG) session.”
Storage resolution
not stated in Google’s table
Webhook support
Yes · automatic-subscription token WEBHOOK_DATA_TYPE_NUTRITION_LOG
True zeros support
Not marked in Google’s table
Channel
v4
DataPoint field
DataPoint.nutritionLog → NutritionLogIts description: “Optional. Data for points in the nutrition-log session data type collection.”
Compatible devices
18 in Google’s table

Operations and request paths

The operations Google’s table lists for nutrition-log, 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 nutrition-log. 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/nutrition-log/dataPoints
getgetGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints/{dataPointsId}
reconcilereconcileGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:reconcile
rolluprollUpsame name, different casePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:rollUp
dailyRollupdailyRollUpsame name, different casePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:dailyRollUp
createcreatePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints
updatepatchvia Google’s endpoint-mapping table (flagged below)PATCH https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints/{dataPointsId}
batchDeletebatchDeletePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:batchDelete

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

Scopes

The scopes Google’s table lists for nutrition-log, 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 Nutrition Log

The schema the discovery document gives DataPoint.nutritionLog, 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.

NutritionLog — Google: “Holds information about food logged by a user. There are two ways of creating a nutrition log based on the food type: 1. Identified food: Using the food field, which is a reference to a Food resource. In this case fields nutrients, energy, energy_from_fat, total_carbohydrate, total_fat, food_display_name will be populated based on the referenced food. 2. Anonymous food: Using the food_display_name field and setting the nutrients, energy, energy_from_fat, total_carbohydrate, total_fat fields manually. The identified food is preferred over the anonymous food. Nutrition logs created from anonymous food are not editable.”

FieldTypeGoogle’s description
intervalRequiredSessionTimeIntervalRequired. The time window when the food was logged.
energyOptionalEnergyQuantityOptional. The total energy of the food, measured in kilocalories (kcal).
energyFromFatOptionalEnergyQuantityOptional. The energy from fat, measured in kilocalories (kcal).
foodOptionalstringOptional. The resource name of the Food item. Required when creating a nutrition log from an identified food. For anonymous food logs, use the food_display_name field instead.
foodDisplayNamestringThe display name of the food. For identified food logs, this is populated automatically from the referenced food.
mealTypeOptionalstringOptional. The meal category. One of BREAKFAST, LUNCH, DINNER, or SNACK.
  • 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. An array of individual nutrient values for the nutrition log.
servingOptionalServingOptional. The serving information for the logged food.
totalCarbohydrateOptionalWeightQuantityOptional. The total carbohydrate content, measured in grams.
totalFatOptionalWeightQuantityOptional. The total fat content, measured in grams.

SessionTimeInterval

Google: “Represents a time interval of session data point, which bundles multiple observed metrics together.”

FieldTypeGoogle’s description
endTimeRequiredstring/google-datetimeRequired. The end time of the observed session.
endUtcOffsetRequiredstring/google-durationRequired. The offset of the user's local time at the end of the session relative to the Coordinated Universal Time (UTC).
startTimeRequiredstring/google-datetimeRequired. The start time of the observed session.
startUtcOffsetRequiredstring/google-durationRequired. The offset of the user's local time at the start of the session relative to the Coordinated Universal Time (UTC).
civilEndTimeOutput onlyCivilDateTimeOutput only. Session end time in civil time in the timezone the subject is in at the end of the session.
civilStartTimeOutput onlyCivilDateTimeOutput only. Session start time in civil time in the timezone the subject is in at the start of the session.

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.

Serving

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

FieldTypeGoogle’s description
foodMeasurementUnitRequiredstringRequired. Food measurement unit
amountOptionalnumber/doubleOptional. The number of servings.
foodMeasurementUnitDisplayNameOutput onlystringOutput only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").

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.

Rollup fields

rollUp returns RollupDataPoint.nutritionLog

The discovery document: “Returned by default when rolling up data points from the nutrition-log data type, or when requested explicitly using the nutrition-log rollup type identifier.”

NutritionLogRollupValue — Google: “Represents the result of the rollup of the nutrition log data type.”

FieldTypeGoogle’s description
energyEnergyQuantityRollupEnergy rollup.
energyFromFatEnergyQuantityRollupValue Energy from fat rollup.
nutrientsarray<NutrientQuantityRollup>List of the nutrient roll-ups by the nutrient type.
totalCarbohydrateWeightQuantityRollupTotal carbohydrate rollup.
totalFatWeightQuantityRollupTotal fat rollup.

EnergyQuantityRollup

Google: “Rollup for the energy quantity.”

FieldTypeGoogle’s description
kcalSumRequirednumber/doubleRequired. The sum of the energy in kilocalories.
userProvidedUnitLastOptionalstringOptional. The user provided unit on the last element.
  • 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.

NutrientQuantityRollup

Google: “Nutrient quantity rollup.”

FieldTypeGoogle’s description
nutrientRequiredstringRequired. Aggregated nutrient.
  • 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.
quantityRequiredWeightQuantityRollupRequired. Aggregated nutrient weight.

WeightQuantityRollup

Google: “Rollup for the weight.”

FieldTypeGoogle’s description
gramsSumRequirednumber/doubleRequired. The sum of the weight in grams.
userProvidedUnitLastOptionalstringOptional. The user provided unit on the last element.
  • 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.

dailyRollUp returns DailyRollupDataPoint.nutritionLog

The discovery document: “Returned by default when rolling up data points from the nutrition-log data type, or when requested explicitly using the nutrition-log rollup type identifier.”

The same NutritionLogRollupValue as the rollUp result above.

Fitbit Web API predecessor

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

Fitbit Web API scopes Google maps to nutrition-log’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.

  • Operation name differs

    The table lists "update" for nutrition-log, but the discovery document has no method named update; Google's endpoint-mapping table points updates at patch.

    • Google's Fitbit migration API specifications: “CREATE & UPDATE Logs”
    • Google's Fitbit migration API specifications: “patch method”
    • the v4 discovery document: “Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.”
  • Scope missing from the discovery document

    The table lists .nutrition.readonly for nutrition-log, 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.”

Compatible devices

The 18 devices Google’s table lists as able to record and sync nutrition-log.

  • Fitbit Air
  • Fitbit Charge 3
  • Fitbit Charge 4
  • Fitbit Charge 5
  • Fitbit Charge 6
  • Fitbit Inspire 2
  • Fitbit Inspire 3
  • Fitbit Luxe
  • Pixel Watch
  • Pixel Watch 2
  • Pixel Watch 3
  • Pixel Watch 4
  • Fitbit Sense
  • Fitbit Sense 2
  • Fitbit Versa 2
  • Fitbit Versa 3
  • Fitbit Versa 4
  • Fitbit Versa Lite

Google’s documentation

Related on this site

Questions

Which OAuth scopes does the Google Health API nutrition-log 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 nutrition-log. 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 nutrition log data to the Google Health API?

Yes. Google's data-types table lists create, update and batchDelete for nutrition-log. create is POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints. The table's "update" has no method of that name in the discovery document; Google's endpoint-mapping table points updates at patch, which is PATCH https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints/{dataPointsId}. batchDelete is POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:batchDelete. Writes need https://www.googleapis.com/auth/googlehealth.nutrition.writeonly.

How do you aggregate nutrition-log data with the Google Health API?

With the rollup methods Google's table lists for it. rollUp (POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:rollUp) returns RollupDataPoint.nutritionLog, a NutritionLogRollupValue with energy, energyFromFat, nutrients, totalCarbohydrate and totalFat; dailyRollUp (POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:dailyRollUp) returns DailyRollupDataPoint.nutritionLog, a NutritionLogRollupValue with energy, energyFromFat, nutrients, totalCarbohydrate and totalFat. Each field is described on this page as the discovery document describes it.

What did the Google Health API nutrition-log data type replace in the Fitbit Web API?

Google's Fitbit Web API migration table maps the Fitbit Web API's "Food Log" to nutrition-log. 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