Skip to content
  • There are no suggestions because the search field is empty.

Apple HealthKitV2 Heartbeats Export Format

Heartbeats in HealthKit have a unique data structure for capturing information specific to the participant’s heartbeat.

Unlike other HealthKit data streams, heartbeats do not show on the Apple HealthKit tab within a participant's chart. This data is still available through data exports.

Data Structure

Heartbeat Samples

Field Description
HealthKitHeartbeatSampleKey A unique, auto-generated key for this heartbeat.
ParticipantIdentifier The identifier of the participant this task was for. Can be used to cross reference with Participants.
ParticipantID The stable, automatically generated, internal system identifier for this participant. Universally unique identifier (UUID).
StartDate The start date of the heartbeat, in ISO 8601 format. Includes timezone offset information. May be empty if no start date was recorded.
Date The end date of the heartbeat, in ISO 8601 format. Includes timezone offset information.
SourceIdentifier A unique identifier for the source object.
SourceName
The name of the source app which generated the reading. In the case of a “com.apple.health.*” SourceIdentifier, this is the name of the Apple Device used to generate the reading (e.g. “Nanea’s iPhone”).
SourceOperatingSystemVersion
An arbitrary string representing the version of the software running on the device, if applicable.
SourceProductType An arbitrary string representing the hardware version of the device, if applicable.
SourceVersion

The version of the source app which generated the reading. In the case of a “com.apple.health.*” SourceIdentifier, this is the version of iOS or WatchOS on the device used to generate the reading.

DeviceFDAIdentifier

The device identifier portion of the US Food and Drug Administration’s Unique Device Identifier (UDI), if applicable.

DeviceFirmwareVersion An arbitrary string representing the current version of the firmware running on the device, if applicable.
DeviceHardwareVersion An arbitrary string representing the hardware version of the device, if applicable.
DeviceLocalIdentifier An identifier that uniquely identifies the device object on the hardware running this code, if applicable.
DeviceManufacturer Manufacturer of the device used the generate the reading, if applicable.
DeviceModel Model of the device used the generate the reading, if applicable.
DeviceName The user-facing name for the device, if applicable.
DeviceSoftwareVersion An arbitrary string representing the version of the software running on the device, if applicable.
Metadata Additional XML metadata inserted by the source application.
InsertedDate The creation date of the entry, in ISO 8601 format. Is always in UTC.

Heartbeat Sub-Samples

Field Description
HealthKitHeartbeatSampleKey A unique, auto-generated key for this heartbeat.
ParticipantIdentifier The identifier of the participant this task was for. Can be used to cross reference with Participants.
PrecededByGap

Indicates a gap in the data (True/False).

TimeSinceSeriesStart

The time of the measurement relative to the series’ start time.

If a participant re-syncs their device, you may observe duplicate samples. HealthKit samples are immutable, so when doing data analysis, your team will need to remove any samples that have the same HealthKitHeartBeatSampleKey and ParticipantIdentifier as another sample.

Sample CSV Exports

Heartbeat Samples

HealthKitHeartbeatSampleKey,ParticipantIdentifier,StartDate,Date,SourceIdentifier,SourceName,SourceOperatingSystemVersion,SourceProductType,SourceVersion,DeviceFDAIdentifier,DeviceFirmwareVersion,DeviceHardwareVersion,DeviceLocalIdentifier,DeviceManufacturer,DeviceModel,DeviceName,DeviceSoftwareVersion,Metadata,InsertedDate
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,2021-12-07T16:31:46-05:00,2021-12-07T16:32:16-05:00,com.apple.NanoHeartRhythm,ECG,8.1.0,"Watch4,4",1.9,,,"Watch4,4",,Apple Inc.,Watch,Apple Watch,8.1,"{""HKMetadataKeySyncVersion"":""0"",""HKMetadataKeyAppleECGAlgorithmVersion"":""1"",""HKMetadataKeySyncIdentifier"":""89C9E3B3-1B75-4F06-AC48-AFF179EC5266""}",2021-12-09T22:18:48Z
b407ceb2-d365-55ec-bfab-c9bbd9a60711,256263d8-3ffc-eb11-aaae-0afb9334277d,2021-12-09T15:13:26-05:00,2021-12-09T15:13:56-05:00,com.apple.NanoHeartRhythm,ECG,8.1.0,"Watch4,4",1.9,,,"Watch4,4",,Apple Inc.,Watch,Apple Watch,8.1,"{""HKMetadataKeySyncVersion"":""0"",""HKMetadataKeyAppleECGAlgorithmVersion"":""2"",""HKMetadataKeySyncIdentifier"":""AEBF344A-3CD2-4C9B-905F-3C793E6E831A""}",2021-12-09T22:18:48Z
2992a11b-8783-5221-8810-4f4d402c2f16,256263d8-3ffc-eb11-aaae-0afb9334277d,2021-12-09T15:20:16-05:00,2021-12-09T15:20:46-05:00,com.apple.NanoHeartRhythm,ECG,8.1.0,"Watch4,4",1.9,,,"Watch4,4",,Apple Inc.,Watch,Apple Watch,8.1,"{""HKMetadataKeySyncVersion"":""0"",""HKMetadataKeyAppleECGAlgorithmVersion"":""2"",""HKMetadataKeySyncIdentifier"":""40B3F71C-A280-4C5B-B4BA-FB6327BCDB63""}",2021-12-09T22:18:48Z

Heartbeat Sub-Samples

HealthKitHeartbeatSampleKey,ParticipantIdentifier,PrecededByGap,TimeSinceSeriesStart
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,TRUE,8.21056045
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,FALSE,0.97453024
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,FALSE,3.60817041
d3e7dd07-5060-53fd-a58f-474b2dfbd7ec,256263d8-3ffc-eb11-aaae-0afb9334277d,TRUE,0.87508558

Sample JSON Export

Heartbeat Samples & Sub-Samples

{
 "HealthKitHeartbeatSampleKey":"de4cb807-bcda-53ed-ab7a-8c91d31ab5bb",
 "Device":
  {
   "FDAIdentifier":"",
   "FirmwareVersion":"",
   "HardwareVersion":"Watch6,2",
   "LocalIdentifier":"",
   "Manufacturer":"Apple Inc.",
   "Model":"Watch",
   "Name":"Apple Watch",
   "SoftwareVersion":"8.6"
  },
 "SubSamples":
  [
   {"PrecededByGap":true,"TimeSinceSeriesStart":0.1875},
   {"PrecededByGap":false,"TimeSinceSeriesStart":0.90813499689102173},
   {"PrecededByGap":false,"TimeSinceSeriesStart":1.6148432493209839},
   {"PrecededByGap":false,"TimeSinceSeriesStart":2.3138160705566406},
   {"PrecededByGap":false,"TimeSinceSeriesStart":3.0290284156799316},
   {"PrecededByGap":false,"TimeSinceSeriesStart":3.7401368618011475},
   {"PrecededByGap":false,"TimeSinceSeriesStart":4.4389252662658691},
   {"PrecededByGap":false,"TimeSinceSeriesStart":5.16614294052124},
   {"PrecededByGap":false,"TimeSinceSeriesStart":5.9092016220092773},
   {"PrecededByGap":true,"TimeSinceSeriesStart":8.96875},
   {"PrecededByGap":false,"TimeSinceSeriesStart":9.7187509536743164},
   {"PrecededByGap":false,"TimeSinceSeriesStart":10.468750953674316},
   {"PrecededByGap":true,"TimeSinceSeriesStart":11.921875},
   {"PrecededByGap":false,"TimeSinceSeriesStart":12.623162269592285},
   {"PrecededByGap":true,"TimeSinceSeriesStart":17.3125},
   {"PrecededByGap":false,"TimeSinceSeriesStart":17.958740234375},
   {"PrecededByGap":false,"TimeSinceSeriesStart":18.614402770996094},
   {"PrecededByGap":false,"TimeSinceSeriesStart":19.293989181518555},
   {"PrecededByGap":false,"TimeSinceSeriesStart":20.013359069824219},
   {"PrecededByGap":false,"TimeSinceSeriesStart":20.716007232666016},
   {"PrecededByGap":false,"TimeSinceSeriesStart":21.415485382080078},
   {"PrecededByGap":false,"TimeSinceSeriesStart":22.126419067382813},
   {"PrecededByGap":false,"TimeSinceSeriesStart":22.829624176025391},
   {"PrecededByGap":false,"TimeSinceSeriesStart":23.547115325927734},
   {"PrecededByGap":false,"TimeSinceSeriesStart":24.254932403564453},
   {"PrecededByGap":false,"TimeSinceSeriesStart":24.942197799682617},
   {"PrecededByGap":false,"TimeSinceSeriesStart":25.641992568969727},
   {"PrecededByGap":false,"TimeSinceSeriesStart":26.349542617797852},
   {"PrecededByGap":false,"TimeSinceSeriesStart":27.05267333984375},
   {"PrecededByGap":false,"TimeSinceSeriesStart":27.747762680053711},
   {"PrecededByGap":false,"TimeSinceSeriesStart":28.434392929077148},
   {"PrecededByGap":false,"TimeSinceSeriesStart":29.146957397460938},
   {"PrecededByGap":true,"TimeSinceSeriesStart":48.75},
   {"PrecededByGap":false,"TimeSinceSeriesStart":49.466648101806641},
   {"PrecededByGap":false,"TimeSinceSeriesStart":50.185184478759766},
   {"PrecededByGap":false,"TimeSinceSeriesStart":50.879440307617188},
   {"PrecededByGap":true,"TimeSinceSeriesStart":52.90625},
   {"PrecededByGap":false,"TimeSinceSeriesStart":53.585159301757813},
   {"PrecededByGap":false,"TimeSinceSeriesStart":54.286392211914063},
   {"PrecededByGap":true,"TimeSinceSeriesStart":57.296875},
   {"PrecededByGap":false,"TimeSinceSeriesStart":58.064239501953125},
   {"PrecededByGap":false,"TimeSinceSeriesStart":58.8125},
   {"PrecededByGap":false,"TimeSinceSeriesStart":59.51641845703125}
  ],
 "Source":
  {
   "Name":"Apple Watch",
   "Identifier":"com.apple.health.55F7DF98-0F21-43C2-BD63-B67FA04D9364",
   "Version":"8.6",
   "OperatingSystemVersion":"8.6.0",
   "ProductType":"Watch6,2"
  },
 "Date":"2022-05-31T11:56:29-05:00",
 "InsertedDate":"2022-07-14T18:52:48Z",
 "ParticipantIdentifier":"26d61a47-f001-ed11-bc5e-001c42d08f49",
 "StartDate":"2022-05-31T11:55:29-05:00",
 "Metadata":{"HKAlgorithmVersion":"2"}
}