<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.RecordsResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "cl/CloudKit.RecordsResponse"
  },
  "title" : "CloudKit.RecordsResponse"
}
-->

# CloudKit.RecordsResponse

A [`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse) object encapsulates the results of fetching records.

```
interface CloudKit.RecordsResponse
```

## Overview

The methods in the [`CloudKit.Database`](/documentation/CloudKitJS/CloudKit.Database) class that operate on records and the [`commit`](/documentation/CloudKitJS/CloudKit.RecordsBatchBuilder/commit) method in the [`CloudKit.RecordsBatchBuilder`](/documentation/CloudKitJS/CloudKit.RecordsBatchBuilder) class return a `Promise` object that resolves to a [`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse) object if the operation is successful. You should not create instances of this class directly.

Errors can occur for individual operations although the overall method may succeed. If an individual operation is successful, a corresponding [`CloudKit.Record`](/documentation/CloudKitJS/CloudKit.Record) dictionary appears in the [`records`](/documentation/CloudKitJS/CloudKit.RecordsResponse/records) array. If an individual operation is unsuccessful, a corresponding [`CKError`](/documentation/CloudKitJS/CloudKit/CKError) appears in the errors array.

For examples using the [`CloudKit.Database`](/documentation/CloudKitJS/CloudKit.Database) methods that resolve to a [`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse) object, see the `saveRecord` and `fetchRecord` methods in [`CloudKit.Database`](/documentation/CloudKitJS/CloudKit.Database).

## Topics

### Getting Records

[`readonly attribute CloudKit.Record[] records;`](/documentation/CloudKitJS/CloudKit.RecordsResponse/records)

The records for the successful operations.

[`readonly attribute Boolean numbersAsStrings;`](/documentation/CloudKitJS/CloudKit.RecordsResponse/numbersAsStrings)

A Boolean value indicating whether the numbers in fields are represented as strings.

### Identifying the Class

[`readonly attribute Boolean isRecordsResponse;`](/documentation/CloudKitJS/CloudKit.RecordsResponse/isRecordsResponse)

A Boolean value indicating whether this object is an instance of the [`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse) class.

### Logging

[`String toString();`](/documentation/CloudKitJS/CloudKit.RecordsResponse/toString)

Returns a string representation of this [`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse) object.

## Relationships

### Inherits From

[`CloudKit.QueryResponse`](/documentation/CloudKitJS/CloudKit.QueryResponse)

### Inherited By

[`CloudKit.Response`](/documentation/CloudKitJS/CloudKit.Response)

---

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)