---
title: "init(predicate:options:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkquantityseriessamplequerydescriptor/init(predicate:options:)"
---

# init(predicate:options:)

Creates a quantity series query descriptor.

## Declaration

```swift
init(predicate: HKSamplePredicate<HKQuantitySample>, options: HKQuantitySeriesSampleQueryDescriptor.Options = [])
```

## Parameters

- `predicate`: A predicate that defines the set of series samples that the query returns. For a list of convenience methods for building predicates, see doc://com.apple.healthkit/documentation/HealthKit/HKQuery.
- `options`: A set of options for the query. For a list of possible values, see doc://com.apple.healthkit/documentation/HealthKit/HKQuantitySeriesSampleQueryDescriptor/Options-swift.struct.

## See Also

### Creating Series Query Descriptors

- [HKQuantitySeriesSampleQueryDescriptor.Options](healthkit/hkquantityseriessamplequerydescriptor/options-swift.struct.md)
