---
title: Search attribute keys and values
framework: security
role: collectionGroup
role_heading: API Collection
path: security/search-attribute-keys-and-values
---

# Search attribute keys and values

Filter a keychain item search.

## Overview

Overview When looking for items using any of the SecItemCopyMatching(_:_:), SecItemUpdate(_:_:), or SecItemDelete(_:) functions, you specify a query dictionary containing both the item attributes to look for (see Item attribute keys and values) and additional search attributes that condition the search. For example, you can use the matching key kSecMatchLimit with value kSecMatchLimitOne to restrict the output to include only the first result even when more than one item matches.

## Topics

### Item search matching keys

- [kSecMatchPolicy](security/ksecmatchpolicy.md)
- [kSecMatchItemList](security/ksecmatchitemlist.md)
- [kSecMatchSearchList](security/ksecmatchsearchlist.md)
- [kSecMatchIssuers](security/ksecmatchissuers.md)
- [kSecMatchEmailAddressIfPresent](security/ksecmatchemailaddressifpresent.md)
- [kSecMatchSubjectContains](security/ksecmatchsubjectcontains.md)
- [kSecMatchSubjectStartsWith](security/ksecmatchsubjectstartswith.md)
- [kSecMatchSubjectEndsWith](security/ksecmatchsubjectendswith.md)
- [kSecMatchSubjectWholeString](security/ksecmatchsubjectwholestring.md)
- [kSecMatchCaseInsensitive](security/ksecmatchcaseinsensitive.md)
- [kSecMatchDiacriticInsensitive](security/ksecmatchdiacriticinsensitive.md)
- [kSecMatchWidthInsensitive](security/ksecmatchwidthinsensitive.md)
- [kSecMatchTrustedOnly](security/ksecmatchtrustedonly.md)
- [kSecMatchValidOnDate](security/ksecmatchvalidondate.md)
- [kSecMatchLimit](security/ksecmatchlimit.md)

### Match limit values

- [kSecMatchLimitOne](security/ksecmatchlimitone.md)
- [kSecMatchLimitAll](security/ksecmatchlimitall.md)

### Additional item search keys

- [kSecUseItemList](security/ksecuseitemlist.md)
- [kSecUseKeychain](security/ksecusekeychain.md)
- [kSecUseOperationPrompt](security/ksecuseoperationprompt.md)
- [kSecUseNoAuthenticationUI](security/ksecusenoauthenticationui.md)
- [kSecUseAuthenticationUI](security/ksecuseauthenticationui.md)
- [kSecUseAuthenticationContext](security/ksecuseauthenticationcontext.md)
- [kSecUseDataProtectionKeychain](security/ksecusedataprotectionkeychain.md)

### UI authentication values

- [kSecUseAuthenticationUIAllow](security/ksecuseauthenticationuiallow.md)
- [kSecUseAuthenticationUIFail](security/ksecuseauthenticationuifail.md)
- [kSecUseAuthenticationUISkip](security/ksecuseauthenticationuiskip.md)
