[Legacy] Apple HealthKit Samples Export Format
- Updated
Please note that the Apple HealthKit Samples Export Format is a legacy export and we recommend using the Apple HealthKitV2 Samples Export Format. This article should only be used for legacy exports, created prior to 11-April-2022.
The HealthKit samples export encompasses most of the simple data generated by HealthKit (e.g., Heart Rate, Sleep Analysis, Steps, and any other data that is not a workout or activity summary).
Table of Contents
Data Fields
Field | Description |
---|---|
HealthKitSampleKey |
A unique, auto-generated key for this sample. |
ParticipantIdentifier |
The identifier of the participant this sample was recorded for. Can be used to cross reference with Participants. |
Type |
The data type - e.g. “Steps ”, “HeartRate .” |
StartDate |
The start date of the recording, in ISO 8601 format. Includes timezone offset information. May be empty if no start date was recorded. |
Date |
The end date of the recording, in ISO 8601 format. Includes timezone offset information. |
Value |
The recorded value. |
Units |
The units for the corresponding value. |
SourceIdentifier |
Uniquely identifies the iOS App which generated the reading. “com.apple.health.* ” indicates a reading from an Apple Device like the iPhone or Apple Watch. |
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. “Chris’ iPhone”). |
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. |
DeviceName |
The user-facing name for the device, if applicable. |
DeviceModel |
Model of the device used the generate the reading, if applicable. |
DeviceManufacturer |
Manufacturer of the device used the generate the reading, if applicable. |
DeviceHardwareVersion |
An arbitrary string representing the hardware version of the device, if applicable. |
DeviceSoftwareVersion |
An arbitrary string representing the version of the software running on the device, if applicable. |
DeviceFirmwareVersion |
An arbitrary string representing the current version of the firmware running on the device, if applicable. |
DeviceLocalIdentifier |
An identifier that uniquely identifies the device object on the hardware running this code, if applicable. |
DeviceFDAIdentifier |
The device identifier portion of the US Food and Drug Administration’s Unique Device Identifier (UDI), 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. |
Sample CSV Export
HealthKitSampleKey,ParticipantIdentifier,StartDate,Date,Type,Value,Units,SourceIdentifier,SourceName,SourceVersion,DeviceName,DeviceModel,DeviceManufacturer,DeviceHardwareVersion,DeviceSoftwareVersion,DeviceFirmwareVersion,DeviceFDAIdentifier,DeviceLocalIdentifier,Metadata,InsertedDate 85e40b42-ba54-e811-8162-e6c7223c41fa,f5e23bf1-29d6-437e-b7e0-4d9bbeea4eaa,2018-04-30T17:00:57-04:00,2018-04-30T17:07:52-04:00,Steps,18,count,com.apple.health.89E9CCE0-ECE6-4B9E-B684-23AA6A979FA1,CE Test iPhone 6S+,11.3,iPhone,iPhone,Apple,"iPhone8,2",11.3,,,,{},2018-05-11T01:26:00Z 86e40b42-ba54-e811-8162-e6c7223c41fa,f5e23bf1-29d6-437e-b7e0-4d9bbeea4eaa,2018-04-30T17:46:04-04:00,2018-04-30T17:54:27-04:00,Steps,248,count,com.apple.health.89E9CCE0-ECE6-4B9E-B684-23AA6A979FA1,CE Test iPhone 6S+,11.3,iPhone,iPhone,Apple,"iPhone8,2",11.3,,,,{},2018-05-11T01:26:00Z 87e40b42-ba54-e811-8162-e6c7223c41fa,f5e23bf1-29d6-437e-b7e0-4d9bbeea4eaa,2018-04-30T17:54:27-04:00,2018-04-30T18:02:06-04:00,Steps,47,count,com.apple.health.89E9CCE0-ECE6-4B9E-B684-23AA6A979FA1,CE Test iPhone 6S+,11.3,iPhone,iPhone,Apple,"iPhone8,2",11.3,,,,{},2018-05-11T01:26:00Z
Sample JSON Export
{ "HealthKitSampleKey": "85E40B42-BA54-E811-8162-E6C7223C41FA", "ParticipantIdentifier": "f5e23bf1-29d6-437e-b7e0-4d9bbeea4eaa", "Type": "Steps", "StartDate": "2018-04-30T17:00:57-04:00", "Date": "2018-04-30T17:07:52-04:00", "Value": "18", "Units": "count", "Source": { "Identifier": "com.apple.health.89E9CCE0-ECE6-4B9E-B684-23AA6A979FA1", "Name": "CE Test iPhone 6S+", "Version": "11.3" }, "Device": { "Name": "iPhone", "Model": "iPhone", "Manufacturer": "Apple", "HardwareVersion": "iPhone8,2", "SoftwareVersion": "11.3" }, "Metadata": {}, "InsertedDate": "2018-05-11T01:26:00Z" } { "HealthKitSampleKey": "86E40B42-BA54-E811-8162-E6C7223C41FA", "ParticipantIdentifier": "f5e23bf1-29d6-437e-b7e0-4d9bbeea4eaa", "Type": "Steps", "StartDate": "2018-04-30T17:46:04-04:00", "Date": "2018-04-30T17:54:27-04:00", "Value": "248", "Units": "count", "Source": { "Identifier": "com.apple.health.89E9CCE0-ECE6-4B9E-B684-23AA6A979FA1", "Name": "CE Test iPhone 6S+", "Version": "11.3" }, "Device": { "Name": "iPhone", "Model": "iPhone", "Manufacturer": "Apple", "HardwareVersion": "iPhone8,2", "SoftwareVersion": "11.3" }, "Metadata": {}, "InsertedDate": "2018-05-11T01:26:00Z" } { "HealthKitSampleKey": "87E40B42-BA54-E811-8162-E6C7223C41FA", "ParticipantIdentifier": "f5e23bf1-29d6-437e-b7e0-4d9bbeea4eaa", "Type": "Steps", "StartDate": "2018-04-30T17:54:27-04:00", "Date": "2018-04-30T18:02:06-04:00", "Value": "47", "Units": "count", "Source": { "Identifier": "com.apple.health.89E9CCE0-ECE6-4B9E-B684-23AA6A979FA1", "Name": "CE Test iPhone 6S+", "Version": "11.3" }, "Device": { "Name": "iPhone", "Model": "iPhone", "Manufacturer": "Apple", "HardwareVersion": "iPhone8,2", "SoftwareVersion": "11.3" }, "Metadata": {}, "InsertedDate": "2018-05-11T01:26:00Z" }
Was this article helpful?