Method: users.dataTypes.dataPoints.list

Query user health and fitness data points.

HTTP request

GET https://health.googleapis.com/v4/{parent=users/*/dataTypes/*}/dataPoints

The URL uses gRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the service error catalog

Path parameters

Parameters
parent

string

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{dataType}, e.g.:

  • users/me/dataTypes/steps
  • users/me/dataTypes/weight

For a list of the supported data types see the DataPoint data union field. It takes the form users/{user}/dataTypes/{datatype}.

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly. For exercise and sleep the default page size is 25. The maximum page size for exercise and sleep is 25.

pageToken

string

Optional. The nextPageToken from a previous request, if any.

filter

string

Optional. Filter expression following https://google.aip.dev/160.

A time range (either physical or civil) can be specified.

The supported filter fields are:

  • Interval start time:

    • Pattern: {interval_data_type}.interval.start_time
    • Supported comparison operators: >=, <
    • Timestamp literal expected in RFC-3339 format
    • Supported logical operators: AND
    • Example:
      • steps.interval.start_time >= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"
      • distance.interval.start_time >= "2024-08-14T12:34:56Z"
  • Interval civil start time:

    • Pattern: {interval_data_type}.interval.civil_start_time
    • Supported comparison operators: >=, <
    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format
    • Supported logical operators: AND
    • Example:
      • steps.interval.civil_start_time >= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"
      • distance.interval.civil_start_time >= "2024-08-14T12:34:56"
  • Sample observation physical time:

    • Pattern: {sample_data_type}.sample_time.physical_time
    • Supported comparison operators: >=, <
    • Timestamp literal expected in RFC-3339 format
    • Supported logical operators: AND
    • Example:
      • weight.sample_time.physical_time >= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"
      • weight.sample_time.physical_time >= "2024-08-14T12:34:56Z"
  • Sample observation civil time:

    • Pattern: {sample_data_type}.sample_time.civil_time
    • Supported comparison operators: >=, <
    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format
    • Supported logical operators: AND
    • Example:
    • weight.sample_time.civil_time >= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"
    • weight.sample_time.civil_time >= "2024-08-14T12:34:56"
  • Daily summary date:

    • Pattern: {daily_summary_data_type}.date
    • Supported comparison operators: >=, <
    • Date literal expected in ISO 8601 YYYY-MM-DD format
    • Supported logical operators: AND
    • Example:
    • dailyHeartRateVariability.date < "2024-08-15"
  • Session civil start time (**Excluding Sleep and ECG**):

    • Pattern: {session_data_type}.interval.civil_start_time
    • Supported comparison operators: >=, <
    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format
    • Supported logical operators: AND
    • Example:
    • exercise.interval.civil_start_time >= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"
    • exercise.interval.civil_start_time >= "2024-08-14T12:34:56"
  • Session start time (**ECG specific**):

    • Pattern: electrocardiogram.interval.start_time
    • Supported comparison operators: >=
    • Timestamp literal expected in RFC-3339 format
    • Example:
      • electrocardiogram.interval.start_time >= "2024-08-14T12:34:56Z"
    • Note: Only filtering by start time is supported for ECG. Filtering by end time (e.g., electrocardiogram.interval.end_time) is not supported.
  • Session end time (**Sleep specific**):

    • Pattern: sleep.interval.end_time
    • Supported comparison operators: >=, <
    • Timestamp literal expected in RFC-3339 format
    • Supported logical operators: AND, OR
    • Example:
      • sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"
  • Session civil end time (**Sleep specific**):

    • Pattern: sleep.interval.civil_end_time
    • Supported comparison operators: >=, <
    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format
    • Supported logical operators: AND, OR
    • Example:
    • sleep.interval.civil_end_time >= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"

Data points in the response will be ordered by the interval start time in descending order.

dataSourceFamily

string

Optional. The data source family name to filter by.

If empty, data points from all available data sources will be returned.

Format: users/me/dataSourceFamilies/{dataSourceFamily}

The supported values are:

  • users/me/dataSourceFamilies/all-sources - Default value. Includes data from all available data sources.
  • users/me/dataSourceFamilies/google-wearables - Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data.
  • users/me/dataSourceFamilies/google-sources - Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect.
  • users/me/dataSourceFamilies/self-sources - Includes only the data the calling client wrote through this API, that is, data points whose data source was registered through this API with the same OAuth client ID as the caller.

Callers that were only granted write scopes for the requested data types may only read the data they wrote themselves: their requests are implicitly restricted to self-sources, and requesting any other data source family fails with PERMISSION_DENIED.

If no data point matches the requested data source family, the response is an empty list rather than an error.

Filtering by data source family is not supported for the sleep, food and food-measurement-unit data types, because the underlying listing implementation cannot restrict results by data source. Such requests fail with INVALID_ARGUMENT when the data source family is set explicitly, and with PERMISSION_DENIED when the restriction is only implied by the caller's scopes. For sleep, use dataPoints.reconcile instead.

Request body

The request body must be empty.

Response body

Response containing raw data points matching the query

If successful, the response body contains data with the following structure:

JSON representation
{
  "dataPoints": [
    {
      object (DataPoint)
    }
  ],
  "nextPageToken": string
}
Fields
dataPoints[]

object (DataPoint)

Data points matching the query

nextPageToken

string

Next page token, empty if the response is complete

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly
  • https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
  • https://www.googleapis.com/auth/googlehealth.location.readonly
  • https://www.googleapis.com/auth/googlehealth.nutrition.readonly
  • https://www.googleapis.com/auth/googlehealth.sleep.readonly
  • https://www.googleapis.com/auth/googlehealth.reproductive_health.readonly
  • https://www.googleapis.com/auth/googlehealth.logged_symptoms.readonly
  • https://www.googleapis.com/auth/googlehealth.mindfulness.readonly
  • https://www.googleapis.com/auth/googlehealth.ecg.readonly
  • https://www.googleapis.com/auth/googlehealth.irn.readonly
  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly
  • https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly
  • https://www.googleapis.com/auth/googlehealth.nutrition.writeonly
  • https://www.googleapis.com/auth/googlehealth.sleep.writeonly
  • https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly
  • https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly
  • https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly

For more information, see the OAuth 2.0 Overview.