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 thedataTypefilter 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 thenutrition-logsession 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 lists | Method | Documented path template |
|---|---|---|
list | list | GET https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints |
get | get | GET https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints/{dataPointsId} |
reconcile | reconcile | GET https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:reconcile |
rollup | rollUpsame name, different case | POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:rollUp |
dailyRollup | dailyRollUpsame name, different case | POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints:dailyRollUp |
create | create | POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints |
update | patchvia Google’s endpoint-mapping table (flagged below) | PATCH https://health.googleapis.com/v4/users/{usersId}/dataTypes/nutrition-log/dataPoints/{dataPointsId} |
batchDelete | batchDelete | POST 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.
| Scope | Access | Google’s permission text |
|---|---|---|
https://www.googleapis.com/auth/googlehealth.nutrition.readonlynot in the v4 discovery document | read | See your Google Health nutrition data. |
https://www.googleapis.com/auth/googlehealth.nutrition.writeonly | write | Add 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.”
| Field | Type | Google’s description |
|---|---|---|
intervalRequired | SessionTimeInterval | Required. The time window when the food was logged. |
energyOptional | EnergyQuantity | Optional. The total energy of the food, measured in kilocalories (kcal). |
energyFromFatOptional | EnergyQuantity | Optional. The energy from fat, measured in kilocalories (kcal). |
foodOptional | string | Optional. 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. |
foodDisplayName | string | The display name of the food. For identified food logs, this is populated automatically from the referenced food. |
mealTypeOptional | string | Optional. The meal category. One of BREAKFAST, LUNCH, DINNER, or SNACK.
|
nutrientsOptional | array<NutrientQuantity> | Optional. An array of individual nutrient values for the nutrition log. |
servingOptional | Serving | Optional. The serving information for the logged food. |
totalCarbohydrateOptional | WeightQuantity | Optional. The total carbohydrate content, measured in grams. |
totalFatOptional | WeightQuantity | Optional. The total fat content, measured in grams. |
SessionTimeInterval
Google: “Represents a time interval of session data point, which bundles multiple observed metrics together.”
| Field | Type | Google’s description |
|---|---|---|
endTimeRequired | string/google-datetime | Required. The end time of the observed session. |
endUtcOffsetRequired | string/google-duration | Required. The offset of the user's local time at the end of the session relative to the Coordinated Universal Time (UTC). |
startTimeRequired | string/google-datetime | Required. The start time of the observed session. |
startUtcOffsetRequired | string/google-duration | Required. The offset of the user's local time at the start of the session relative to the Coordinated Universal Time (UTC). |
civilEndTimeOutput only | CivilDateTime | Output only. Session end time in civil time in the timezone the subject is in at the end of the session. |
civilStartTimeOutput only | CivilDateTime | Output 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.”
| Field | Type | Google’s description |
|---|---|---|
kcalRequired | number/double | Required. The energy value in kilocalories. Must be in the range [0, 100000]. |
userProvidedUnitOptional | string | Optional. Value representing the user provided unit.
|
NutrientQuantity
Google: “Represents the quantity of a nutrient.”
| Field | Type | Google’s description |
|---|---|---|
nutrientRequired | string | Required. The nutrient type.
|
quantityRequired | WeightQuantity | Required. The quantity of the nutrient, measured in grams. |
Serving
Google: “Represents different properties and information about the serving of a specific food.”
| Field | Type | Google’s description |
|---|---|---|
foodMeasurementUnitRequired | string | Required. Food measurement unit |
amountOptional | number/double | Optional. The number of servings. |
foodMeasurementUnitDisplayNameOutput only | string | Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram"). |
WeightQuantity
Google: “Represents the weight quantity.”
| Field | Type | Google’s description |
|---|---|---|
gramsRequired | number/double | Required. The weight value in grams. Must be in the range [0, 100000]. |
userProvidedUnitOptional | string | Optional. Value representing the user provided unit.
|
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.”
| Field | Type | Google’s description |
|---|---|---|
energy | EnergyQuantityRollup | Energy rollup. |
energyFromFat | EnergyQuantityRollup | Value Energy from fat rollup. |
nutrients | array<NutrientQuantityRollup> | List of the nutrient roll-ups by the nutrient type. |
totalCarbohydrate | WeightQuantityRollup | Total carbohydrate rollup. |
totalFat | WeightQuantityRollup | Total fat rollup. |
EnergyQuantityRollup
Google: “Rollup for the energy quantity.”
| Field | Type | Google’s description |
|---|---|---|
kcalSumRequired | number/double | Required. The sum of the energy in kilocalories. |
userProvidedUnitLastOptional | string | Optional. The user provided unit on the last element.
|
NutrientQuantityRollup
Google: “Nutrient quantity rollup.”
| Field | Type | Google’s description |
|---|---|---|
nutrientRequired | string | Required. Aggregated nutrient.
|
quantityRequired | WeightQuantityRollup | Required. Aggregated nutrient weight. |
WeightQuantityRollup
Google: “Rollup for the weight.”
| Field | Type | Google’s description |
|---|---|---|
gramsSumRequired | number/double | Required. The sum of the weight in grams. |
userProvidedUnitLastOptional | string | Optional. The user provided unit on the last element.
|
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: “
patchmethod” - the v4 discovery document: “Updates a single identifiable data point. If a data point with the specified
nameis 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
Sources checked
- Google Health API data types — last updated 2026-10-06 · read 2026-10-17
- Google Health API discovery document (v4) — revision 20261014 · read 2026-10-17
- Scopes — last updated 2026-10-09 · read 2026-10-17
- API specifications — last updated 2026-09-22 · read 2026-10-17
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.