Apple Health
HealthKit is the on-device store for health and fitness data on iPhone. D4L Collect reads selected HealthKit data on the participant's iPhone, after the participant has given permission. This is how D4L Collect gets data from the Apple Watch and from the iPhone itself.
The data never leaves the phone before D4L Collect reads it. There is no cloud connection to Apple.
At a glance
| Topic | Details |
|---|---|
| Source type | On-device store (Apple HealthKit), read by the study app on the iPhone |
| Devices | Apple Watch Series 9, Series 10, and Ultra 2, paired with an iPhone. Some data also comes from the iPhone itself. |
| In Research Studio | Under Background recordings, select Apple HealthKit |
| What participants do | Allow the study app to read each requested data type in Apple Health. Participants can allow some types and deny others. A denied type gives no data. |
| Data range | From the moment participants give their study consent. Data recorded before that is never collected. |
| Collection | The study app reads new data from HealthKit about every 2 hours. |
| Export | CSV, one file per signal and day. See Exported files. |
Available signals
| Signal | Unit | Sampling type | When it's measured |
|---|---|---|---|
| Steps | steps | Interval increment | All day, at irregular intervals of about 1 to 10 minutes while moving |
| Distance | m | Interval increment | All day, at irregular intervals while moving |
| Active calories | kcal | Interval increment | All day, at irregular intervals |
| Heart rate | bpm | Sample | All day. About every 4 to 10 minutes at rest and about every 5 seconds during workouts. |
| Resting heart rate | bpm | Daily summary | Once per day |
| Heart rate variability | ms (SDNN) | Sample | Mostly during sleep, about 1 every 2 hours, plus occasional spot readings |
| Respiratory rate | breaths/min | Sample | During sleep, about 6 per hour |
| Blood oxygen (SpO2) | fraction | Sample | Mostly during sleep, 1 to 2 per hour |
| Skin temperature | °C | Sample | During sleep, 1 per night |
| Sleep | stage + s | Interval one row per sleep stage | Sleep sessions |
| Workouts | type + s + effort | Interval one row per workout | Workouts |
| Stand hours | true/false | Interval one row per hour | All day |
| Activity summary | kcal, min, hours | Daily summary | Once per day |
| Menstrual flow | state | Sample entered by the participant | When logged |
| Contraceptive use | type | Daily summary entered by the participant | When logged |
| Pregnancy | true | Daily summary entered by the participant | When logged |
| Lactation | true | Daily summary entered by the participant | When logged |
How often Apple records a signal depends on the watch and its settings. Apple doesn't fix a sampling rate. It also depends on how still the participant is. The rates in the table are typical values that we observed in our own tests. D4L Collect exports every value that HealthKit provides. Not every watch delivers every signal. Skin temperature, for example, needs an Apple Watch Series 8 or later.
Signal reference
The tables show example rows from the CSV files.
Movement and energy
Steps
Steps per HealthKit sample. timestamp is the end of the sample. Each value is an increment, not a running total.
File: Apple HealthKit_steps_steps_dataSource.csv
| timestamp | steps | dataSource |
|---|---|---|
| 2026-10-12T07:35:00.129Z | 49 | apple-watch |
| 2026-10-12T07:38:00.408Z | 52 | apple-watch |
Distance
Walking and running distance in meters per HealthKit sample. timestamp is the end of the sample. An increment, not a running total.
File: Apple HealthKit_distance_distance_dataSource.csv
| timestamp | distance_m | dataSource |
|---|---|---|
| 2026-10-12T08:01:00.251Z | 12.5 | iphone |
| 2026-10-12T08:02:00.147Z | 30.1 | apple-watch |
Active calories
Active calories in kcal per HealthKit sample, without the energy burned at rest. Apple calls this active energy. timestamp is the end of the sample. An increment, not a running total.
File: Apple HealthKit_activeCalories_activeCalories_dataSource.csv
| timestamp | activeCalories_kcal | dataSource |
|---|---|---|
| 2026-10-12T07:37:00.695Z | 1.8 | apple-watch |
| 2026-10-12T07:38:00.318Z | 3.9 | apple-watch |
Heart and breathing
Heart rate
Heart rate in beats per minute, one value per sample. timestamp is the start of the sample.
File: Apple HealthKit_heartRate_heartRate_dataSource.csv
| timestamp | heartRate_bpm | dataSource |
|---|---|---|
| 2026-10-12T08:22:00.442Z | 71 | apple-watch |
| 2026-10-12T08:23:00.903Z | 72 | apple-watch |
Resting heart rate
Resting heart rate in beats per minute. There is one value per day, so the file of each day has only one row.
File: Apple HealthKit_restingHeartRate_restingHeartRate_dataSource.csv
| timestamp | restingHeartRate_bpm | dataSource |
|---|---|---|
| 2026-10-12T17:47:42.147Z | 58 | apple-watch |
Heart rate variability
Heart rate variability as the standard deviation of the time between heartbeats (SDNN), in milliseconds. This isn't RMSSD, which other devices deliver. See Comparing across devices.
File: Apple HealthKit_hrvSdnn_hrvSdnn_dataSource.csv
| timestamp | hrvSdnn_ms | dataSource |
|---|---|---|
| 2026-10-12T05:10:00.047Z | 44.2 | apple-watch |
| 2026-10-12T05:20:00.664Z | 51.7 | apple-watch |
Respiratory rate
Breaths per minute, as samples during sleep.
File: Apple HealthKit_respiratoryRate_respiratoryRate_dataSource.csv
| timestamp | respiratoryRate_breaths/min | dataSource |
|---|---|---|
| 2026-10-12T02:15:00.129Z | 14.6 | apple-watch |
Blood oxygen (SpO2)
Blood oxygen saturation as a fraction, so 0.96 means 96 %. The column name ends with %, but the values are not multiplied by 100.
File: Apple HealthKit_spo2_spo2_dataSource.csv
| timestamp | spo2_% | dataSource |
|---|---|---|
| 2026-10-12T03:05:00.408Z | 0.96 | apple-watch |
Skin temperature
Absolute skin temperature at the wrist in °C, measured during sleep. Apple calls this sleeping wrist temperature. It isn't body temperature, and it's not a difference to a baseline.
The watch needs about 5 nights of wear to calibrate before it records skin temperature. The first nights have no rows.
File: Apple HealthKit_skinTemperature_skinTemperature_dataSource.csv
| timestamp | skinTemperature_˚C | dataSource |
|---|---|---|
| 2026-10-12T01:30:00.251Z | 33.4 | apple-watch |
Sleep
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. Only samples from the Apple Watch are used. The sleepState column is exported as text, with these possible values:
awakeremcoredeep
D4L Collect groups stage samples into one sleep session when there's less than 1 hour between them. A session is assigned to the day on which it ends.
File: Apple HealthKit_sleepAnalysis_sleepState_duration_dataSource.csv
| timestamp | sleepState | duration_s | dataSource |
|---|---|---|---|
| 2026-10-12T23:48:00.000Z | awake | 240 | apple-watch |
| 2026-10-12T23:52:00.000Z | core | 900 | apple-watch |
| 2026-10-13T00:07:00.000Z | deep | 2280 | apple-watch |
Activity
Workouts
One row per workout. timestamp is the end of the workout. duration is in seconds. effort is the effort score from 1 to 10, or 0 if there's none. D4L Collect uses the participant's own rating if there is one, and Apple's estimate otherwise.
The activityType column is exported as text. The values are the names of Apple's workout activity types, for example running, walking, or cycling. A workout of an unlisted type is other.
File: Apple HealthKit_workout_workout_dataSource.csv
| timestamp | workout_activityType | workout_duration | workout_effort | dataSource |
|---|---|---|---|---|
| 2026-10-12T18:40:00.000Z | running | 3240 | 6 | apple-watch |
Stand hours
One row per clock hour, stamped at the end of the hour. stoodDuringHour is true if the participant stood up during that hour, otherwise false.
File: Apple HealthKit_standHours_stoodDuringHour_dataSource.csv
| timestamp | stoodDuringHour | dataSource |
|---|---|---|
| 2026-10-12T08:00:00.000Z | true | apple-watch |
| 2026-10-12T09:00:00.000Z | false | apple-watch |
Activity summary
The values of the three Apple activity rings, one row per day, stamped at local midnight. Energy is in whole kcal, time in whole minutes, and stand in hours. moveMode shows what the Move ring tracks. It's activeEnergy for kcal or appleMoveTime for minutes. This file has no dataSource column.
File: Apple HealthKit_activitySummary.csv
| timestamp | activitySummary_activeEnergy | activitySummary_activeEnergyGoal | activitySummary_exerciseTime | activitySummary_exerciseTimeGoal | activitySummary_standHours | activitySummary_standHoursGoal | activitySummary_moveMode | activitySummary_moveTime | activitySummary_moveTimeGoal |
|---|---|---|---|---|---|---|---|---|---|
| 2026-10-11T22:00:00.000Z | 412 | 500 | 38 | 30 | 9 | 12 | activeEnergy | 0 | 0 |
In this example, the participant is in the CEST time zone, so local midnight is 22:00 UTC of the day before.
Women's health
The participant enters these data points in Apple Health. The watch doesn't measure them, so values exist only for the days a participant logged them.
These data points are sensitive. Make sure the consent text of your study covers them before you enable them.
Menstrual flow
One row per logged observation. state is exported as text: unspecified, light, medium, heavy, or none. isCycleStart is 1 if the entry marks the start of a cycle, otherwise 0.
File: Apple HealthKit_menstrualCycle_menstrualCycle_dataSource.csv
| timestamp | menstrualCycle_state | menstrualCycle_isCycleStart | dataSource |
|---|---|---|---|
| 2026-10-12T08:00:00.000Z | light | 1 | iphone |
Contraceptive use
The type of contraceptive, exported as text: unspecified, implant, injection, intrauterineDevice, intravaginalRing, oral, or patch. If the participant logged more than one type, there's one row per type, all with the same timestamp. timestamp is local midnight of the day on which the study app read the entry, not the day on which the participant logged it.
File: Apple HealthKit_contraceptive_contraceptiveType_dataSource.csv
| timestamp | contraceptiveType | dataSource |
|---|---|---|
| 2026-10-11T22:00:00.000Z | implant | iphone |
| 2026-10-11T22:00:00.000Z | patch | iphone |
Pregnancy
pregnancyState is true for each day with an active pregnancy entry. timestamp is local midnight of the day on which the study app read the entry.
File: Apple HealthKit_pregnancy_pregnancyState_dataSource.csv
| timestamp | pregnancyState | dataSource |
|---|---|---|
| 2026-10-11T22:00:00.000Z | true | iphone |
Lactation
lactationState is true for each day with an active lactation entry. timestamp is local midnight of the day on which the study app read the entry.
File: Apple HealthKit_lactation_lactationState_dataSource.csv
| timestamp | lactationState | dataSource |
|---|---|---|
| 2026-10-11T22:00:00.000Z | true | iphone |
Exported files
You find Apple 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}/Apple HealthKit_{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
Apple HealthKit_, followed by the signal and its value columns. - All files start with a
timestampcolumn (UTC, ISO 8601, in milliseconds) and, except for the activity summary, end with adataSourcecolumn.
Know before you analyze
One row per data source
Apple Health can hold the same measurement from the Apple Watch and from the iPhone. D4L Collect keeps them apart. The dataSource column tells you where a row came from.
If you add up all rows of a day, you can count steps, distance, and energy twice. Filter by dataSource first, for example by keeping only apple-watch.
Values in the dataSource column:
| Value | Meaning |
|---|---|
apple-watch | Recorded by the Apple Watch |
iphone | Recorded by the iPhone |
unknown | Apple Health didn't name the source |
Sleep is the exception: D4L Collect exports sleep from the Apple Watch only.
Increments, not running totals
Steps, distance, and active calories are increments. Each row covers one HealthKit sample, and timestamp is the end of that sample. The length of the sample isn't exported, and samples have different lengths. For a daily total, add up the rows of one source for that day.
Daily values are timestamped at local midnight
The activity summary, contraceptive use, pregnancy, and lactation are stamped at midnight in the time zone of the participant's phone. In the timestamp column (UTC), this is the evening of the day before, for example 22:00 in Germany during summer time.