<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAppleEventDescriptor/forKeyword(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAppleEventDescriptor(im)descriptorForKeyword:"
  },
  "title" : "forKeyword(_:)"
}
-->

# forKeyword(_:)

Returns the receiver’s descriptor for the specified keyword.

```
func forKeyword(_ keyword: AEKeyword) -> NSAppleEventDescriptor?
```

## Parameters

`keyword`

A keyword (a four-character code) that identifies the descriptor to obtain.

## Return Value

A descriptor for the specified keyword, or `nil` if an error occurs.

---

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)