<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNActionable/action(forKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(pl)SCNActionable(im)actionForKey:"
  },
  "title" : "action(forKey:)"
}
-->

# action(forKey:)

Returns an action associated with a specific key.

```
func action(forKey key: String) -> SCNAction?
```

## Parameters

`key`

A string that uniquely identifies a action.

## Return Value

The action object matching the specified key, or `nil` if the node does not have an action identified by the key.

## Discussion

Use this method to retrieve actions you scheduled using the [`runAction(_:forKey:)`](/documentation/SceneKit/SCNActionable/runAction(_:forKey:)) or [`runAction(_:forKey:completionHandler:)`](/documentation/SceneKit/SCNActionable/runAction(_:forKey:completionHandler:)) method.

---

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)