The Google Health API provides data types for tracking a user's nutrition and
hydration. These types allow you to log meals, reference foods from the food
database, track nutrient quantities, and log liquid intake.

## Supported data types

<br />

| Data type | Available operations | Scope |
|---|---|---|
| **[Food](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#food)** **dataType:** `food` **filter parameter:** `food` **Record type:**Food [Nutrition guide](https://developers.google.com/health/data-types/nutrition.md.txt) | list, get | `.nutrition.readonly` `.nutrition.writeonly` |
| **[Food Measurement Unit](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#foodmeasurementunit)** **dataType:** `food-measurement-unit` **filter parameter:** `food_measurement_unit` **Record type:**Food [Nutrition guide](https://developers.google.com/health/data-types/nutrition.md.txt) | list, get | `.nutrition.readonly` `.nutrition.writeonly` |
| **[Hydration Log](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#hydrationlog)** **dataType:** `hydration-log` **filter parameter:** `hydration_log` **Record type:**Session [Webhook support](https://developers.google.com/health/webhooks.md.txt) | list, get, reconcile, rollup, dailyRollup, create, update, batchDelete | `.nutrition.readonly` `.nutrition.writeonly` |
| **[Nutrition Log](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#nutritionlog)** **dataType:** `nutrition-log` **filter parameter:** `nutrition_log` **Record type:**Session [Webhook support](https://developers.google.com/health/webhooks.md.txt) [Nutrition guide](https://developers.google.com/health/data-types/nutrition.md.txt) | list, get, reconcile, rollup, dailyRollup, create, update, batchDelete | `.nutrition.readonly` `.nutrition.writeonly` |
[*Table: Google Health API Nutrition data types*]

<br />

## Nutrition Log

A Nutrition Log represents food logged by a user. There are two ways to create a
nutrition log, depending on the food type:

1. **Identified food** : Set the `food` field to reference an existing
   [Food](https://developers.google.com/health/data-types/nutrition.md.txt#food) resource. The `nutrients`, `energy`, `energyFromFat`,
   `totalCarbohydrate`, `totalFat`, and `foodDisplayName` fields are populated
   automatically from the referenced food. This is the preferred method.

2. **Anonymous food** : Set the `foodDisplayName` field manually and provide
   values for `nutrients`, `energy`, `energyFromFat`, `totalCarbohydrate`, and
   `totalFat`. Nutrition logs created from anonymous food are not editable
   after creation.

### Create a nutrition log with anonymous food

To create a nutrition log entry, send a `POST` request to the `nutrition-log`
`dataPoints` endpoint.

### Request

```
POST https://health.googleapis.com/v4/users/me/dataTypes/nutrition-log/dataPoints
Authorization: Bearer access-token
Content-Type: application/json

{
  "nutritionLog": {
    "interval": {
      "startTime": "2026-06-16T18:00:00Z",
      "endTime": "2026-06-16T18:30:00Z"
    },
    "foodDisplayName": "Grilled Chicken Breast",
    "mealType": "DINNER",
    "energy": {
      "kcal": 165
    },
    "totalCarbohydrate": {
      "grams": 0
    },
    "totalFat": {
      "grams": 3.6
    },
    "nutrients": [
      {
        "nutrient": "PROTEIN",
        "quantity": {
          "grams": 31
        }
      },
      {
        "nutrient": "SODIUM",
        "quantity": {
          "grams": 0.074
        }
      }
    ],
    "serving": {
      "amount": 1.0
    }
  }
}
```

### Response

```
{
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.devicesandservices.health.v4.DataPoint",
    "name": "users/user-id/dataTypes/nutrition-log/dataPoints/data-point-id",
    "dataSource": {
      "recordingMethod": "UNKNOWN",
      "application": {
        "googleWebClientId": "google-web-client-id"
      },
      "platform": "GOOGLE_WEB_API"
    },
    "nutritionLog": {
      "interval": {
        "startTime": "2026-06-16T18:00:00Z",
        "startUtcOffset": "0s",
        "endTime": "2026-06-16T18:30:00Z",
        "endUtcOffset": "0s",
        "civilStartTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 18
          }
        },
        "civilEndTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 18,
            "minutes": 30
          }
        }
      },
      "energy": {
        "kcal": 165
      },
      "totalCarbohydrate": {
        "grams": 0
      },
      "totalFat": {
        "grams": 3.6
      },
      "nutrients": [
        {
          "quantity": {
            "grams": 31
          },
          "nutrient": "PROTEIN"
        },
        {
          "quantity": {
            "grams": 0.074
          },
          "nutrient": "SODIUM"
        }
      ],
      "mealType": "DINNER",
      "serving": {
        "amount": 1
      },
      "foodDisplayName": "Grilled Chicken Breast"
    }
  }
}
```

### Create a nutrition log with identified food

To log a food item from the food database, set the `food` field to reference a
Food resource. The API populates nutritional fields automatically.

### Request

```
POST https://health.googleapis.com/v4/users/me/dataTypes/nutrition-log/dataPoints
Authorization: Bearer access-token
Content-Type: application/json

{
  "nutritionLog": {
    "interval": {
      "startTime": "2026-06-16T12:00:00Z",
      "endTime": "2026-06-16T12:30:00Z"
    },
    "food": "users/me/dataTypes/food/dataPoints/food-id",
    "mealType": "LUNCH",
    "serving": {
      "amount": 1.0,
      "foodMeasurementUnit": "users/me/dataTypes/food-measurement-unit/dataPoints/food-measurement-unit-id"
    }
  }
}
```

### Response

```
{
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.devicesandservices.health.v4.DataPoint",
    "name": "users/user-id/dataTypes/nutrition-log/dataPoints/data-point-id",
    "dataSource": {
      "recordingMethod": "UNKNOWN",
      "application": {
        "googleWebClientId": "google-web-client-id"
      },
      "platform": "GOOGLE_WEB_API"
    },
    "nutritionLog": {
      "interval": {
        "startTime": "2026-06-16T12:00:00Z",
        "startUtcOffset": "0s",
        "endTime": "2026-06-16T12:30:00Z",
        "endUtcOffset": "0s",
        "civilStartTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 12
          }
        },
        "civilEndTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 12,
            "minutes": 30
          }
        }
      },
      "energy": {
        "kcal": 95
      },
      "energyFromFat": {
        "kcal": 3
      },
      "totalCarbohydrate": {
        "grams": 25
      },
      "totalFat": {
        "grams": 0.3
      },
      "nutrients": [
        {
          "quantity": {
            "grams": 4.4,
            "userProvidedUnit": "GRAM"
          },
          "nutrient": "DIETARY_FIBER"
        },
        {
          "quantity": {
            "grams": 19,
            "userProvidedUnit": "GRAM"
          },
          "nutrient": "SUGAR"
        },
        {
          "quantity": {
            "grams": 0.5,
            "userProvidedUnit": "GRAM"
          },
          "nutrient": "PROTEIN"
        }
      ],
      "mealType": "LUNCH",
      "serving": {
        "amount": 1,
        "foodMeasurementUnit": "users/me/dataTypes/food-measurement-unit/dataPoints/food-measurement-unit-id"
      },
      "food": "users/user-id/dataTypes/food/dataPoints/food-id",
      "foodDisplayName": "Apple"
    }
  }
}
```

> [!NOTE]
> **Note:** To obtain valid food IDs, use the `list` operation on the `food` data type with the `nutrition.readonly` scope.

### Delete nutrition logs

To delete one or more nutrition log entries, send a `POST` request to the
`batchDelete` method with the resource names of the entries to remove.

**Request:**

```
POST https://health.googleapis.com/v4/users/me/dataTypes/nutrition-log/dataPoints:batchDelete
Authorization: Bearer access-token
Content-Type: application/json

{
  "names": [
    "users/me/dataTypes/nutrition-log/dataPoints/data-point-id"
  ]
}
```

### Nutrition log fields

For a complete list of fields and descriptions, see
[`NutritionLog`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#NutritionLog).

### Energy quantity

Represents an energy measurement, measured in kilocalories (`kcal`). For
details, see [`EnergyQuantity`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#EnergyQuantity).

```json
{
  "kcal": 165
}
```

### Weight quantity

Represents a weight measurement, measured in grams. For details,
see [`WeightQuantity`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#WeightQuantity).

```json
{
  "grams": 27.3
}
```

### Nutrient quantity

Represents a specific nutrient and its measured quantity. For details, see
[`NutrientQuantity`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#NutrientQuantity).

```json
{
  "nutrient": "PROTEIN",
  "quantity": {
    "grams": 31
  }
}
```

### Nutrient values

For a complete list of supported nutrient types, see
[`Nutrient`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#Nutrient).

### Serving

Represents the serving information for a nutrition log entry. For details, see
[`Serving`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#NutritionLog.Serving).

```json
{
  "amount": 1.5
}
```

### Meal type values

For a complete list of supported meal types, see
[`MealType`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#MealType).

## Food

Food is a read-only data type that represents a food item in the food database.
Use the `list` and `get` operations to browse available foods and retrieve their
nutritional information.

### List foods

To list foods, send a `GET` request to the `food` `dataPoints` endpoint:

```
GET https://health.googleapis.com/v4/users/me/dataTypes/food/dataPoints
Authorization: Bearer access-token
Accept: application/json
```

> [!NOTE]
> **Note:** The `food` data type is read-only. You cannot create or modify food items through the API.

## Food Measurement Unit

Food Measurement Unit is a read-only data type that represents measurement units
used for food servings (for example, "cup", "tablespoon", or "piece").

### List available measurement units

To list available measurement units:

```
GET https://health.googleapis.com/v4/users/me/dataTypes/food-measurement-unit/dataPoints
Authorization: Bearer access-token
Accept: application/json
```

## Hydration Log

A Hydration Log represents liquid logged by a user. Unlike foods, which
reference a Food database and measure nutrient or energy intake, hydration
entries track the specific volume of liquid consumed over a given time interval.

### Create a hydration log

To create a hydration log entry, send a `POST` request to the `hydration-log`
`dataPoints` endpoint. All volume quantities are converted to milliliters in the
API format.

### Request

```
POST https://health.googleapis.com/v4/users/me/dataTypes/hydration-log/dataPoints
Authorization: Bearer access-token
Content-Type: application/json

{
  "hydrationLog": {
    "interval": {
      "startTime": "2026-06-16T14:00:00Z",
      "endTime": "2026-06-16T14:00:01Z"
    },
    "amountConsumed": {
      "milliliters": 500,
      "userProvidedUnit": "FLUID_OUNCE_US"
    }
  }
}
```

### Response

```
{
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.devicesandservices.health.v4.DataPoint",
    "name": "users/user-id/dataTypes/hydration-log/dataPoints/data-point-id",
    "dataSource": {
      "recordingMethod": "UNKNOWN",
      "application": {
        "googleWebClientId": "google-web-client-id"
      },
      "platform": "GOOGLE_WEB_API"
    },
    "hydrationLog": {
      "interval": {
        "startTime": "2026-06-16T14:00:00Z",
        "startUtcOffset": "0s",
        "endTime": "2026-06-16T14:00:01Z",
        "endUtcOffset": "0s",
        "civilStartTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 14
          }
        },
        "civilEndTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 14,
            "seconds": 1
          }
        }
      },
      "amountConsumed": {
        "milliliters": 500,
        "userProvidedUnit": "FLUID_OUNCE_US"
      }
    }
  }
}
```

### Update a hydration log

To update a hydration log entry, send a `PATCH` request to the `hydration-log`
`dataPoints` endpoint with the ID of the data point.

### Request

```
PATCH https://health.googleapis.com/v4/users/me/dataTypes/hydration-log/dataPoints/data-point-id
Authorization: Bearer access-token
Content-Type: application/json

{
  "hydrationLog": {
    "interval": {
      "startTime": "2026-06-16T10:00:00Z",
      "endTime": "2026-06-16T10:00:01Z"
    },
    "amountConsumed": {
      "milliliters": 500
    }
  }
}
```

### Response

```
{
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.devicesandservices.health.v4.DataPoint",
    "name": "users/user-id/dataTypes/hydration-log/dataPoints/data-point-id",
    "dataSource": {
      "recordingMethod": "UNKNOWN",
      "application": {
        "googleWebClientId": "google-web-client-id"
      },
      "platform": "GOOGLE_WEB_API"
    },
    "hydrationLog": {
      "interval": {
        "startTime": "2026-06-16T10:00:00Z",
        "startUtcOffset": "0s",
        "endTime": "2026-06-16T10:00:01Z",
        "endUtcOffset": "0s",
        "civilStartTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 10
          }
        },
        "civilEndTime": {
          "date": {
            "year": 2026,
            "month": 6,
            "day": 16
          },
          "time": {
            "hours": 10,
            "seconds": 1
          }
        }
      },
      "amountConsumed": {
        "milliliters": 500
      }
    }
  }
}
```

### Delete hydration logs

To delete one or more hydration log entries, send a `POST` request to the
`batchDelete` method.

### Request

```
POST https://health.googleapis.com/v4/users/me/dataTypes/hydration-log/dataPoints:batchDelete
Authorization: Bearer access-token
Content-Type: application/json

{
  "names": [
    "users/me/dataTypes/hydration-log/dataPoints/data-point-id"
  ]
}
```

### Response

```
{
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.devicesandservices.health.v4.BatchDeleteDataPointsResponse",
    "dataPoints": [
      {
        "name": "users/user-id/dataTypes/hydration-log/dataPoints/data-point-id",
        "dataSource": {
          "recordingMethod": "UNKNOWN",
          "application": {
            "googleWebClientId": "google-web-client-id"
          },
          "platform": "GOOGLE_WEB_API"
        },
        "hydrationLog": {
          "interval": {
            "startTime": "2026-06-16T14:00:00Z",
            "startUtcOffset": "0s",
            "endTime": "2026-06-16T14:00:01Z",
            "endUtcOffset": "0s",
            "civilStartTime": {
              "date": {
                "year": 2026,
                "month": 6,
                "day": 16
              },
              "time": {
                "hours": 14
              }
            },
            "civilEndTime": {
              "date": {
                "year": 2026,
                "month": 6,
                "day": 16
              },
              "time": {
                "hours": 14,
                "seconds": 1
              }
            }
          },
          "amountConsumed": {
            "milliliters": 500,
            "userProvidedUnit": "FLUID_OUNCE_US"
          }
        }
      }
    ]
  }
}
```

> [!WARNING]
> **Warning:** Direct HTTP `DELETE` requests to individual data point URIs (such as `DELETE https://health.googleapis.com/v4/users/me/dataTypes/hydration-log/dataPoints/<data-point-id>`) are not supported and return a `404 Not Found` error. You must perform all deletions using the `batchDelete` method.

### Hydration log fields

For a complete list of fields and descriptions, see
[`HydrationLog`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#HydrationLog).

### Volume quantity

Represents a volume measurement, measured in milliliters. For details,
see [`VolumeQuantity`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#VolumeQuantity).

```json
{
  "milliliters": 250,
  "userProvidedUnit": "MILLILITER"
}
```

### Volume unit values

For a complete list of supported volume units, see
[`VolumeUnit`](https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints.md.txt#VolumeUnit). Common values include
`MILLILITER`, `LITER`, `CUP_US`, and `FLUID_OUNCE_US`.

## Guidelines

- Use identified food when possible. The API populates nutritional fields automatically, reducing errors and ensuring consistency with the food database.
- Nutrition logs created from anonymous food cannot be updated after creation. If you need to correct an anonymous food log, delete it and create a new one.
- Unlike anonymous food nutrition logs, hydration log entries are fully mutable and can be updated after creation using a `PATCH` request.
- All nutrient quantities in the `nutrients` array use grams as the unit of measurement.
- The `energy` and `energyFromFat` fields use kilocalories (`kcal`) as the unit of measurement.
- The API converts and stores all hydration quantities in milliliters. The optional `userProvidedUnit` field in `VolumeQuantity` is only used for client-side user-facing display.
- Direct HTTP `DELETE` requests to individual `hydration-log` data points return `404 Not Found`. Use the `batchDelete` method to remove these resource entries.
- Hydration logs use a short interval where the `startTime` and `endTime` represent the period of time in which the liquid was consumed.