<!--
{
  "documentType" : "article",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/metadata-keys",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Metadata Keys"
}
-->

# Metadata Keys

Constants used to add metadata to objects stored in HealthKit.

## Discussion

Use these keys to facilitate sharing data between apps. You can also create your own custom keys to give HealthKit objects additional app-specific data.

## Topics

### General Keys

[`HKMetadataKeyExternalUUID`](/documentation/HealthKit/HKMetadataKeyExternalUUID)

A unique identifier for an HKObject that is set by its source.

[`HKMetadataKeyTimeZone`](/documentation/HealthKit/HKMetadataKeyTimeZone)

The user’s time zone when the HealthKit object was created.

[`HKMetadataKeyWasUserEntered`](/documentation/HealthKit/HKMetadataKeyWasUserEntered)

A key that indicates whether the sample was entered by the user.

[`HKMetadataKeyQuantityClampedToLowerBound`](/documentation/HealthKit/HKMetadataKeyQuantityClampedToLowerBound)

[`HKMetadataKeyQuantityClampedToUpperBound`](/documentation/HealthKit/HKMetadataKeyQuantityClampedToUpperBound)

### Estimate Keys

[`HKMetadataKeyDateOfEarliestDataUsedForEstimate`](/documentation/HealthKit/HKMetadataKeyDateOfEarliestDataUsedForEstimate)

The earliest date of data used to calculate the sample’s estimated value.

[`HKMetadataKeySessionEstimate`](/documentation/HealthKit/HKMetadataKeySessionEstimate)

### Device Information Keys

[`HKMetadataKeyDeviceSerialNumber`](/documentation/HealthKit/HKMetadataKeyDeviceSerialNumber)

The key for the serial number of the device that generated the data.

[`HKMetadataKeyUDIDeviceIdentifier`](/documentation/HealthKit/HKMetadataKeyUDIDeviceIdentifier)

The device identifier portion of a device’s UDI (unique device identifier).

[`HKMetadataKeyUDIProductionIdentifier`](/documentation/HealthKit/HKMetadataKeyUDIProductionIdentifier)

The production identifier portion of a device’s UDI (unique device identifier).

[`HKMetadataKeyDigitalSignature`](/documentation/HealthKit/HKMetadataKeyDigitalSignature)

A digital signature that can be used to validate the origin of the HealthKit object.

[`HKMetadataKeyDeviceName`](/documentation/HealthKit/HKMetadataKeyDeviceName)

The name of the device that took this reading.

[`HKMetadataKeyDeviceManufacturerName`](/documentation/HealthKit/HKMetadataKeyDeviceManufacturerName)

The name of the manufacturer of the device that took this reading.

[`HKMetadataKeyDevicePlacementSide`](/documentation/HealthKit/HKMetadataKeyDevicePlacementSide)

The key for metadata indicating the placement of the device that measured a sample.

[`HKDevicePlacementSide`](/documentation/HealthKit/HKDevicePlacementSide)

Values that indicate the placement of the device that measured a sample.

[`HKMetadataKeyAppleDeviceCalibrated`](/documentation/HealthKit/HKMetadataKeyAppleDeviceCalibrated)

The key for metadata indicating whether the system had data from a sufficient amount of calibrated sensors when recording the sample.

### Sync Keys

[`HKMetadataKeySyncIdentifier`](/documentation/HealthKit/HKMetadataKeySyncIdentifier)

A unique string that identifies a piece of data so it can be updated and synced.

[`HKMetadataKeySyncVersion`](/documentation/HealthKit/HKMetadataKeySyncVersion)

The version number for a piece of data, used when updating or syncing.

### Lab Keys

[`HKMetadataKeyWasTakenInLab`](/documentation/HealthKit/HKMetadataKeyWasTakenInLab)

A key that indicates whether the sample was taken in a lab.

[`HKMetadataKeyReferenceRangeLowerLimit`](/documentation/HealthKit/HKMetadataKeyReferenceRangeLowerLimit)

A key that indicates the lower limit of the reference range for a lab result.

[`HKMetadataKeyReferenceRangeUpperLimit`](/documentation/HealthKit/HKMetadataKeyReferenceRangeUpperLimit)

A key that indicates the upper limit of the reference range for a lab result.

### Weather Keys

[`HKMetadataKeyBarometricPressure`](/documentation/HealthKit/HKMetadataKeyBarometricPressure)

The metadata key for the barometric pressure associated with a sample.

[`HKMetadataKeyWeatherCondition`](/documentation/HealthKit/HKMetadataKeyWeatherCondition)

A key that represents the weather condition during the sample.

[`HKMetadataKeyWeatherHumidity`](/documentation/HealthKit/HKMetadataKeyWeatherHumidity)

A key that represents the weather humidity during the sample.

[`HKMetadataKeyWeatherTemperature`](/documentation/HealthKit/HKMetadataKeyWeatherTemperature)

A key that represents the weather temperature during the sample.

### Workout Keys

  <doc://com.apple.healthkit/documentation/HealthKit/workout-metadata-keys>

### Cardio Fitness Keys

[`HKMetadataKeyVO2MaxValue`](/documentation/HealthKit/HKMetadataKeyVO2MaxValue)

The maximum oxygen consumption rate during exercise of increasing intensity.

[`HKMetadataKeyLowCardioFitnessEventThreshold`](/documentation/HealthKit/HKMetadataKeyLowCardioFitnessEventThreshold)

The VO2 max threshold used to categorize low-level cardio fitness events.

### Motion Keys

[`HKMetadataKeyUserMotionContext`](/documentation/HealthKit/HKMetadataKeyUserMotionContext)

The person’s motion during the sample’s time period.

### Nutrition Keys

[`HKMetadataKeyFoodType`](/documentation/HealthKit/HKMetadataKeyFoodType)

The type of food that the HealthKit object represents.

### Vitals Sensors Keys

[`HKMetadataKeyBodyTemperatureSensorLocation`](/documentation/HealthKit/HKMetadataKeyBodyTemperatureSensorLocation)

The location where a specific body temperature reading was taken.

[`HKMetadataKeyHeartRateSensorLocation`](/documentation/HealthKit/HKMetadataKeyHeartRateSensorLocation)

The location where a specific heart rate reading was taken.

[`HKMetadataKeyHeartRateMotionContext`](/documentation/HealthKit/HKMetadataKeyHeartRateMotionContext)

The user’s activity level when the heart rate sample was measured.

[`HKPredicateKeyPathAverageHeartRate`](/documentation/HealthKit/HKPredicateKeyPathAverageHeartRate)

The key path for the sample’s average heart rate.

[`HKMetadataKeyHeartRateRecoveryActivityDuration`](/documentation/HealthKit/HKMetadataKeyHeartRateRecoveryActivityDuration)

[`HKMetadataKeyHeartRateRecoveryActivityType`](/documentation/HealthKit/HKMetadataKeyHeartRateRecoveryActivityType)

[`HKMetadataKeyHeartRateRecoveryMaxObservedRecoveryHeartRate`](/documentation/HealthKit/HKMetadataKeyHeartRateRecoveryMaxObservedRecoveryHeartRate)

[`HKMetadataKeyHeartRateRecoveryTestType`](/documentation/HealthKit/HKMetadataKeyHeartRateRecoveryTestType)

The type of test that the source used to calculate a person’s heart-rate recovery.

[`HKMetadataKeyVO2MaxTestType`](/documentation/HealthKit/HKMetadataKeyVO2MaxTestType)

The method used to calculate the user’s VO2 max rate.

### Audio Event Keys

[`HKMetadataKeyAudioExposureLevel`](/documentation/HealthKit/HKMetadataKeyAudioExposureLevel)

The audio level associated with an audio event.

[`HKMetadataKeyAudioExposureDuration`](/documentation/HealthKit/HKMetadataKeyAudioExposureDuration)

The audio exposure event’s duration.

[`HKMetadataKeyHeadphoneGain`](/documentation/HealthKit/HKMetadataKeyHeadphoneGain)

### Blood Glucose Keys

[`HKMetadataKeyBloodGlucoseMealTime`](/documentation/HealthKit/HKMetadataKeyBloodGlucoseMealTime)

A key that indicates the relative timing of a blood glucose reading to a meal.

[`HKMetadataKeyInsulinDeliveryReason`](/documentation/HealthKit/HKMetadataKeyInsulinDeliveryReason)

The medical reason for administering insulin.

### Reproductive Health Keys

[`HKMetadataKeyMenstrualCycleStart`](/documentation/HealthKit/HKMetadataKeyMenstrualCycleStart)

A key that indicates whether the sample represents the start of a menstrual cycle. This metadata key is required for [`menstrualFlow`](/documentation/HealthKit/HKCategoryTypeIdentifier/menstrualFlow) category samples.

[`HKMetadataKeySexualActivityProtectionUsed`](/documentation/HealthKit/HKMetadataKeySexualActivityProtectionUsed)

A key that indicates whether protection was used during sexual activity. This metadata key can be used with [`sexualActivity`](/documentation/HealthKit/HKCategoryTypeIdentifier/sexualActivity) category samples.

### Algorithm Keys

[`HKMetadataKeyAlgorithmVersion`](/documentation/HealthKit/HKMetadataKeyAlgorithmVersion)

A key that indicates the version number of the algorithm used to calculate the sample’s value.

[`HKMetadataKeyAppleECGAlgorithmVersion`](/documentation/HealthKit/HKMetadataKeyAppleECGAlgorithmVersion)

A key for metadata indicating the version number of the algorithm Apple Watch uses to generate an ECG reading.

[`HKAppleECGAlgorithmVersion`](/documentation/HealthKit/HKAppleECGAlgorithmVersion)

Version numbers for the algorithm Apple Watch uses to generate an ECG reading.

[`HKPredicateKeyPathECGClassification`](/documentation/HealthKit/HKPredicateKeyPathECGClassification)

The key path for the sample’s classification.

[`HKPredicateKeyPathECGSymptomsStatus`](/documentation/HealthKit/HKPredicateKeyPathECGSymptomsStatus)

The key path for the sample’s symptom status.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)