<!--
{
  "documentType" : "article",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/predicate-format-strings",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Predicate format strings"
}
-->

# Predicate format strings

Formatting strings for creating predicates.

## Topics

### Object keys

[`let HKPredicateKeyPathUUID: String`](/documentation/HealthKit/HKPredicateKeyPathUUID)

The key path for accessing the object’s UUID inside a predicate format string.

[`let HKPredicateKeyPathMetadata: String`](/documentation/HealthKit/HKPredicateKeyPathMetadata)

The key path for accessing the object’s metadata dictionary inside a predicate format string.

[`let HKPredicateKeyPathSum: String`](/documentation/HealthKit/HKPredicateKeyPathSum)

The key path for accessing the sum of a quantity series inside a predicate format string.

### Quantity sample keys

[`let HKPredicateKeyPathQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathQuantity)

The key path for accessing the sample’s quantity.

### Category sample keys

[`let HKPredicateKeyPathCategoryValue: String`](/documentation/HealthKit/HKPredicateKeyPathCategoryValue)

The key path for accessing the category sample’s value.

### Correlation sample keys

[`let HKPredicateKeyPathCorrelation: String`](/documentation/HealthKit/HKPredicateKeyPathCorrelation)

The key path for accessing the object’s correlation inside a predicate format string.

### Device and source keys

[`let HKPredicateKeyPathDevice: String`](/documentation/HealthKit/HKPredicateKeyPathDevice)

The key path for accessing the object’s device inside a predicate format string.

[`let HKPredicateKeyPathSource: String`](/documentation/HealthKit/HKPredicateKeyPathSource)

The key path for accessing the object’s source inside a predicate format string.

[`let HKPredicateKeyPathSourceRevision: String`](/documentation/HealthKit/HKPredicateKeyPathSourceRevision)

The key path for accessing the object’s source revision inside a predicate format string.

### Start and end date keys

[`let HKPredicateKeyPathStartDate: String`](/documentation/HealthKit/HKPredicateKeyPathStartDate)

The key path for accessing the sample’s start date.

[`let HKPredicateKeyPathEndDate: String`](/documentation/HealthKit/HKPredicateKeyPathEndDate)

The key path for accessing the sample’s end date.

### Activity summary keys

[`let HKPredicateKeyPathDateComponents: String`](/documentation/HealthKit/HKPredicateKeyPathDateComponents)

The key path for accessing an activity summary’s date components.

### Document keys

[`let HKPredicateKeyPathCDAAuthorName: String`](/documentation/HealthKit/HKPredicateKeyPathCDAAuthorName)

The key path for accessing the author’s name inside a predicate format string.

[`let HKPredicateKeyPathCDACustodianName: String`](/documentation/HealthKit/HKPredicateKeyPathCDACustodianName)

The key path for accessing the custodian’s name inside a predicate format string.

[`let HKPredicateKeyPathCDAPatientName: String`](/documentation/HealthKit/HKPredicateKeyPathCDAPatientName)

The key path for accessing the patient’s name inside a predicate format string.

[`let HKPredicateKeyPathCDATitle: String`](/documentation/HealthKit/HKPredicateKeyPathCDATitle)

The key path for accessing the document’s title inside a predicate format string.

### Clinical record keys

[`let HKPredicateKeyPathClinicalRecordFHIRResourceIdentifier: String`](/documentation/HealthKit/HKPredicateKeyPathClinicalRecordFHIRResourceIdentifier)

The key path for accessing the clinical record’s Fast Healthcare Interoperability Resources (FHIR) identifier.

[`let HKPredicateKeyPathClinicalRecordFHIRResourceType: String`](/documentation/HealthKit/HKPredicateKeyPathClinicalRecordFHIRResourceType)

The key path for accessing the resource type of a Fast Healthcare Interoperability Resources (FHIR) record.

### Workout keys

[`let HKPredicateKeyPathWorkout: String`](/documentation/HealthKit/HKPredicateKeyPathWorkout)

The key path for accessing the object’s workout inside a predicate format string.

[`let HKPredicateKeyPathWorkoutType: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutType)

The key path for accessing the workout’s type.

[`let HKPredicateKeyPathWorkoutDuration: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutDuration)

The key path for accessing the workout’s duration.

[`let HKPredicateKeyPathWorkoutAverageQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutAverageQuantity)

The key path for accessing workouts with a matching average quantity.

[`let HKPredicateKeyPathWorkoutMaximumQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutMaximumQuantity)

The key path for accessing workouts with a matching maximum quantity.

[`let HKPredicateKeyPathWorkoutMinimumQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutMinimumQuantity)

The key path for accessing workouts with a matching minimum quantity.

[`let HKPredicateKeyPathWorkoutSumQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutSumQuantity)

The key path for accessing workouts with a matching sum.

[`let HKPredicateKeyPathWorkoutTotalDistance: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutTotalDistance)

The key path for accessing the workout’s total distance.

[`let HKPredicateKeyPathWorkoutTotalEnergyBurned: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutTotalEnergyBurned)

The key path for accessing the workout’s total energy burned.

[`let HKPredicateKeyPathWorkoutTotalFlightsClimbed: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutTotalFlightsClimbed)

The key path for accessing the total number of flights of stairs climbed during the workout.

[`let HKPredicateKeyPathWorkoutTotalSwimmingStrokeCount: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutTotalSwimmingStrokeCount)

The key path for accessing the number of strokes during a swimming workout.

### Workout activity keys

[`let HKPredicateKeyPathWorkoutActivity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivity)

The key path for accessing a specific workout activity.

[`let HKPredicateKeyPathWorkoutActivityType: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityType)

The key path for accessing activities that match a workout activity type.

[`let HKPredicateKeyPathWorkoutActivityStartDate: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityStartDate)

The key path for accessing activities with a matching start date.

[`let HKPredicateKeyPathWorkoutActivityEndDate: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityEndDate)

The key path for accessing activities with a matching end date.

[`let HKPredicateKeyPathWorkoutActivityDuration: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityDuration)

The key path for accessing activities with a matching duration.

[`let HKPredicateKeyPathWorkoutActivityAverageQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityAverageQuantity)

The key path for accessing activities with a matching average quantity.

[`let HKPredicateKeyPathWorkoutActivityMaximumQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityMaximumQuantity)

The key path for accessing activities with a matching maximum quantity.

[`let HKPredicateKeyPathWorkoutActivityMinimumQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivityMinimumQuantity)

The key path for accessing activities with a matching minimum quantity.

[`let HKPredicateKeyPathWorkoutActivitySumQuantity: String`](/documentation/HealthKit/HKPredicateKeyPathWorkoutActivitySumQuantity)

The key path for accessing activities with a matching sum.



---

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)