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 thedataTypefilter 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 lists | Method | Documented path template |
|---|---|---|
list | list | GET https://health.googleapis.com/v4/users/{usersId}/dataTypes/food/dataPoints |
get | get | GET 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.
| 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 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.”
| Field | Type | Google’s description |
|---|---|---|
accessLevelRequired | string | Required. The access level of the food.
|
defaultServingRequired | FoodServing | Required. Value representing the default serving of the food. |
displayNameRequired | string | Required. The display name of the food. |
brandOptional | string | Optional. The brand of the food. |
descriptionOptional | string | Optional. The description of the food. |
energyAvgOptional | EnergyQuantity | Optional. Value representing the average energy of the food for the default serving. |
energyFromFatOptional | EnergyQuantity | Optional. Value representing the energy from fat of the food for the default serving. |
energyMaxOptional | EnergyQuantity | Optional. Value representing the maximum energy of the food for the default serving. |
energyMinOptional | EnergyQuantity | Optional. Value representing the minimum energy of the food for the default serving. |
languageCodeOptional | string | Optional. The language code where the food is available in format xx-XX. Supported values are defined in Settings.food_language_code. |
mealTypeOptional | string | Optional. The meal type associated with this food.
|
nutrientsOptional | array<NutrientQuantity> | Optional. Value representing the nutrients of the food for the default serving. |
servingsOptional | array<FoodServing> | Optional. The serving of the food. |
totalCarbohydrateOptional | WeightQuantity | Optional. Value representing the total carbohydrate of the food for the default serving. |
totalFatOptional | WeightQuantity | Optional. 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.”
| Field | Type | Google’s description |
|---|---|---|
foodMeasurementUnitRequired | string | Required. Food measurement unit |
amountOptional | number/double | Optional. Amount of food consumed, fractional values are supported. |
foodMeasurementUnitDisplayNameOutput only | string | Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram"). |
foodMeasurementUnitDisplayNamePluralOutput only | string | Output only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams"). |
multiplierOptional | number/double | Optional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving. |
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. |
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.
|
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
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.