Zum Hauptinhalt springen

Google Health

The Google Health API gives D4L Collect access to the health and fitness data that participants sync from their wearable to their Google account. This is how D4L Collect gets data from Fitbit trackers and smartwatches and from the Google Pixel Watch. Some data, such as steps, can also come from the participant's phone.

D4L Collect never connects to the wearable directly. It only receives what the wearable has synced to Google. For the data that the companion app records directly on the Google Pixel Watch, see Google Pixel Watch.

At a glance​

TopicDetails
Source typeCloud API (Google Health API v4)
DevicesFitbit trackers and smartwatches, Google Pixel Watch, phones
In Research StudioUnder Background recordings, select Google Health account
What participants doMake sure their wearable syncs to their Google account, sign in with Google in the study app, and allow access to their data
Data rangeFrom the moment participants give their study consent. Data recorded before that is never collected.
CollectionThe study app fetches new data periodically in the background.
ExportCSV, one file per signal and day. See Exported files.
Approval by Google

Some data types require Google's approval for the study app release. Research Studio marks these data types with **. Before you enable them, check with your engineering team which data types have been approved.

Available signals​

Signal (Research Studio label)UnitSampling typeWhen it's measured
CalorieskcalIntervalAll day
StepsstepsIntervalAll day
DistancemIntervalAll day
FloorsfloorsIntervalAll day
Elevation gainmIntervalAll day
Active Zone MinutesActive Zone Minutes (weighted minutes)IntervalAll day
Activitylevel 0–3IntervalAll day
Heart ratebpmSampleAll day, including sleep
Resting heart ratebpmDaily summaryOnce per day
VO2 maxml/kg/minDaily summaryOnce per day
Heart rate variabilityms (RMSSD)SampleMain sleep, compatible wearable only
Breathing ratebreaths/minSample once per nightMain sleep, compatible wearable only
SpO2%SampleMain sleep, compatible wearable only
Variation in skin temperature°CDaily summaryMain sleep, compatible wearable only
Sleepstage + sInterval one row per sleep stageSleep sessions

For which devices support which data, see Google's list of data types. Not every participant's device delivers every signal.

Signal reference​

The tables show example rows from the CSV files.

Activity signals​

Calories​

Active energy burned per interval, in kcal. Google Health only provides active calories, not the energy burned at rest, so daily totals are lower than the total energy expenditure shown in the Fitbit app. Expect many rows with 0 while the participant is sedentary.

File: Google Health_activeCalories_activeCalories_duration_dataSource.csv

timestampactiveCalories_kcalduration_sdataSource
2026-05-31T07:37:00Z060charge-6
2026-05-31T07:38:00Z3.8886660charge-6

Steps​

Steps per interval. Only intervals with steps are exported, so there are no rows with 0.

File: Google Health_steps_steps_duration_dataSource.csv

timestampstepsduration_sdataSource
2026-05-31T07:35:00Z4960charge-6
2026-05-31T07:38:00Z5260charge-6

Distance​

Distance covered per interval, in meters.

File: Google Health_distance_distance_duration_dataSource.csv

timestampdistance_mduration_sdataSource
2026-09-15T08:00:00Z3060pixel-watch-4
2026-09-15T08:01:00Z1260pixel-watch-4

Floors​

Floors climbed per interval. Google provides floors only merged across all sources, so dataSource is always reconciled and there's at most one row per interval.

File: Google Health_floors_floors_duration_dataSource.csv

timestampfloorsduration_sdataSource
2026-09-15T08:00:00Z2900reconciled
2026-09-15T08:15:00Z3900reconciled

Elevation gain​

Altitude gained per interval, in meters. This isn't the height above sea level.

File: Google Health_elevationGain_elevationGain_duration_dataSource.csv

timestampelevationGain_mduration_sdataSource
2026-09-15T08:00:00Z6900pixel-watch-4
2026-09-15T08:15:00Z9900pixel-watch-4

Active Zone Minutes​

Active Zone Minutes earned per interval and heart rate zone. There's one row per interval and zone, so several rows can share a timestamp. For the zone codes, see Coded values.

Active Zone Minutes aren't the same as the time spent in a zone. Google weights each minute by the intensity of its zone:

ZoneIntensityActive Zone Minutes per minute in the zone
1 = fat burnModerate1
2 = cardioHigh2
3 = peakHigh2

For example, 10 minutes in the cardio zone earn 20 Active Zone Minutes. To get the time spent in a zone, use duration_s instead of activeZoneMinutes_min.

File: Google Health_activeZoneMinutes_heartRateZone_activeZoneMinutes_duration_dataSource.csv

timestampheartRateZoneactiveZoneMinutes_minduration_sdataSource
2026-09-15T08:00:00Z1160pixel-watch-4
2026-09-15T08:01:00Z2260pixel-watch-4
2026-09-15T08:02:00Z3260pixel-watch-4

Activity​

Activity level per interval on Google's 4-level scale. For the codes, see Coded values.

File: Google Health_activity_activityLevel_duration_dataSource.csv

timestampactivityLevelduration_sdataSource
2026-09-15T08:00:00Z2300pixel-watch-4
2026-09-15T08:05:00Z0600pixel-watch-4

Heart and fitness signals​

Heart rate​

Heart rate in beats per minute, recorded throughout the day and night. Values usually come about once per minute or more often.

File: Google Health_heartRate_heartRate_dataSource.csv

timestampheartRate_bpmdataSource
2026-05-31T08:20:00Z72.8charge-6
2026-05-31T08:21:00Z73.2charge-6

Resting heart rate​

Resting heart rate per day in beats per minute, rounded to whole beats. Timestamped at noon.

File: Google Health_restingHeartRate_restingHeartRate_dataSource.csv

timestamprestingHeartRate_bpmdataSource
2026-09-15T10:00:00Z58pixel-watch-4
2026-09-16T10:00:00Z57pixel-watch-4

VO2 max​

Daily VO2 max in ml/kg/min, called Cardio Fitness Score in the Fitbit app. Includes the cardio fitness level and whether Google estimated the value. Timestamped at noon. For the codes, see Coded values.

File: Google Health_vo2max_vo2max_dataSource.csv

timestampvo2max_vo2maxvo2max_cardioFitnessLevelvo2max_isEstimateddataSource
2026-09-15T10:00:00Z41.340pixel-watch-4
2026-09-16T10:00:00Z40.9no_datano_datapixel-watch-4

Heart rate variability​

Root mean square of successive differences (RMSSD) between heartbeats, in milliseconds. Measured in about 5-minute intervals during the main sleep.

File: Google Health_hrvRmssd_hrvRmssd_dataSource.csv

timestamphrvRmssddataSource
2026-05-31T06:10:00Z79.1charge-6
2026-05-31T06:15:00Z37charge-6

Sleep signals​

Sleep​

Sleep stages of each sleep session. There's one row per stage: timestamp is the start of the stage and duration_s is its length in seconds. A night is assigned to the day on which the sleep session ends.

File: Google Health_sleep_sleepLevel_duration_dataSource.csv

timestampsleepLevelduration_sdataSource
2026-05-30T23:48:00Zwake240charge-6
2026-05-30T23:52:00Zlight900charge-6
2026-05-31T00:07:00Zdeep2280charge-6
2026-05-31T01:20:30Zrem330charge-6

Breathing rate​

Average breaths per minute during the main sleep, overall and per sleep stage. There's one row per night. The _full column is Google's value for the whole night. A stage without data is exported as 0.

File: Google Health_respiratoryRate_respiratoryRate_dataSource.csv

timestamprespiratoryRate_bpm_fullrespiratoryRate_bpm_remrespiratoryRate_bpm_lightrespiratoryRate_bpm_deepdataSource
2026-05-31T06:22:00Z17.818.217.217.8charge-6

SpO2​

Blood oxygen saturation in percent during the main sleep, as about 5-minute moving averages.

Sensor artifacts

Some devices, for example the Fitbit Charge 6, report 50 when they can't get a clean reading. Apply a validated, device-specific artifact rule before excluding values; a low SpO2 reading alone does not establish that it is an artifact.

File: Google Health_spo2_spo2_dataSource.csv

timestampspo2_%dataSource
2026-05-31T06:50:33Z95.5charge-6
2026-05-31T06:55:33Z50charge-6

Variation in skin temperature​

Nightly skin temperature during the main sleep, as the difference to the participant's personal baseline, in °C. Timestamped at noon. Only the deviation is recorded, never the absolute temperature. Google only provides a value after at least 3 hours of sleep, so expect gaps.

File: Google Health_skinTemperatureDeviation_skinTemperatureDeviation_dataSource.csv

timestampskinTemperatureDeviation_˚CdataSource
2026-05-30T10:00:00Z-0.21charge-6
2026-05-31T10:00:00Z0.16charge-6

Exported files​

You find Google Health data in the CSV export of your study data. For details, see Downloading study data.

{Subject ID}/csv/Recordings_Signal_Data/{YYYY-MM-DD}/Google Health_{signal}_{columns}.csv
  • Each folder holds the data of one day. The folder name is the UTC date of the last value of that day, so it can differ by one day from the participant's local date.
  • Each signal has its own file. The file name starts with Google Health_, followed by the signal and its value columns, for example Google Health_heartRate_heartRate_dataSource.csv.
  • All files start with a timestamp column (UTC, ISO 8601) and end with a dataSource column.

Know before you analyze​

One row per data source​

A participant can track the same activity with several devices, for example a watch and their phone. Google Health keeps the data of each device separate, and so does D4L Collect. The dataSource column tells you which device a row came from.

Google offers two methods to read data, and they handle multiple sources differently:

  • list returns the data of each source separately. D4L Collect uses it for all signals except floors.
  • reconcile merges all sources into one stream and drops the source information. Google provides floors only this way.

This is what the same minute looks like when a watch and a phone both record it:

Two rows for the same minute, one per source:

timestampdistance_mduration_sdataSource
2026-09-15T08:01:00Z1260pixel-watch-4
2026-09-15T08:01:00Z12.560phone
Don't add up all rows

If you add up all rows of a day, you count activity twice when two devices recorded it. Filter by dataSource first, for example by keeping only the wearable.

Values in the dataSource column:

ValueMeaning
Device name, for example pixel-watch-4, charge-6The device name from Google, in lowercase with hyphens instead of spaces, cut off after 16 characters
phoneTracked by the phone without a wearable
reconciledMerged from all sources (floors only)
unknownGoogle didn't name the source

Aggregating interval signals​

For interval signals, each row covers only its own interval: timestamp is the start of the interval, and duration_s is its length in seconds. Intervals aren't always the same length, for example 1 minute or 15 minutes. For additive quantities such as steps, calories, and distance, get a daily total by summing the values of one source for that day. For Activity and Sleep, sum duration_s from one source by activityLevel or sleepLevel instead of summing the category values.

Daily summaries are timestamped at noon​

Resting heart rate, VO2 max, and skin temperature have one value per day. Their timestamp is 12:00 on that day, in the time zone the participant's phone was set to when the data was fetched. The timestamp column shows this in UTC, for example 2026-09-15T10:00:00Z for a participant in Germany during summer time.

Sleep-based signals need a worn device​

Heart rate variability, breathing rate, SpO2, and skin temperature are measured only during the participant's main sleep, and only on compatible wearables. Expect gaps on nights when participants didn't wear their device, slept only briefly, or took a nap instead.

Coded values​

Some columns use codes instead of text:

ColumnCodes
sleepLevelExported as text: wake, light, deep, rem
heartRateZone0 = unspecified, 1 = fat burn, 2 = cardio, 3 = peak
activityLevel0 = sedentary, 1 = lightly active, 2 = moderately active, 3 = very active
vo2max_cardioFitnessLevel1 = poor, 2 = fair, 3 = average, 4 = good, 5 = very good, 6 = excellent, no_data = Google didn't provide the value
vo2max_isEstimated1 = estimated by Google, 0 = not estimated, no_data = Google didn't provide the value