<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AddressBook",
  "identifier" : "/documentation/AddressBook/ABGroup/searchElement(forProperty:label:key:value:comparison:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Address Book",
      "AddressBook"
    ],
    "preciseIdentifier" : "c:objc(cs)ABGroup(cm)searchElementForProperty:label:key:value:comparison:"
  },
  "title" : "searchElement(forProperty:label:key:value:comparison:)"
}
-->

# searchElement(forProperty:label:key:value:comparison:)

Returns a search element object that searches for records of this type.

```
class func searchElement(forProperty property: String!, label: String!, key: String!, value: Any!, comparison: ABSearchComparison) -> ABSearchElement!
```

## Parameters

`property`

The name of the property to search on. It cannot be `nil`. For a full list of the properties, see  [Default Record Properties](/documentation/AddressBook/default-record-properties) and [Default Group Properties](/documentation/AddressBook/default-group-properties).

`label`

The label name for a multivalue list. If `property` does not have multiple values, pass `nil`. If `property` does have multiple values, pass `nil` to search all the values. By default, `ABGroup` records don’t contain any multivalue list properties.

`key`

The key name for a dictionary. Pass `nil` if `property` is not a dictionary. If `property` is a dictionary, pass `nil` to search all keys. By default, `ABGroup` records don’t contain any properties that are dictionaries.

`value`

What you’re searching for. If `nil`, the only supported value for `comparison` is `kABEqual` or `kABNotEqual`.

`comparison`

The type of comparison to perform and is an [`ABSearchComparison`](/documentation/AddressBook/ABSearchComparison), such as `kABEqual` or `kABPrefixMatchCaseInsensitive`.

---

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)