---
title: key
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avmetadataitem/key
---

# key

The key of the metadata item.

## Declaration

```swift
@NSCopying var key: (any NSCopying & NSObjectProtocol)? { get }
```

## Discussion

Discussion The key property contains the true key used to identify the contents of the metadata item. This value is specific to the key space of the metadata item.

## See Also

### Accessing keys and key spaces

- [commonKey](avfoundation/avmetadataitem/commonkey.md)
- [keySpace](avfoundation/avmetadataitem/keyspace.md)
