<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKDatabase/fetch(withRecordZoneID:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKDatabase(im)fetchRecordZoneWithID:completionHandler:"
  },
  "title" : "fetch(withRecordZoneID:completionHandler:)"
}
-->

# fetch(withRecordZoneID:completionHandler:)

Fetches a specific record zone.

```
func fetch(withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping @Sendable (CKRecordZone?, (any Error)?) -> Void)
```

## Parameters

`zoneID`

The identifier of the record zone to fetch.

`completionHandler`

The closure to execute with the fetch results.

## Discussion

The completion handler takes the following parameters:

- The fetched record zone, or `nil` if there’s an error.
- An error if a problem occurs, or `nil` if CloudKit successfully fetches the specified record zone.

For information on a more convenient way to fetch specific record zones, see [`recordZones(for:)`](/documentation/CloudKit/CKDatabase/recordZones(for:)) in Swift or [`CKFetchRecordZonesOperation`](/documentation/CloudKit/CKFetchRecordZonesOperation) in Objective-C.

---

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)