<!--
{
  "availability" : [
    "iOS: 4.0.0 - 16.0.0",
    "iPadOS: 4.0.0 - 16.0.0",
    "macCatalyst: 13.1.0 - 16.0.0",
    "macOS: 10.7.0 - 13.0.0",
    "tvOS: 9.0.0 - 16.0.0",
    "watchOS: 1.0.0 - 9.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetTrack/metadata(forFormat:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetTrack(im)metadataForFormat:"
  },
  "title" : "metadata(forFormat:)"
}
-->

# metadata(forFormat:)

Returns metadata items that a track contains for the specified format.

```
func metadata(forFormat format: AVMetadataFormat) -> [AVMetadataItem]
```

## Parameters

`format`

The format of the metadata items to retrieve.

## Return Value

An array of metadata items matching the specified format, or an empty array if none are found.

## Discussion

Apple discourages the use of this method in iOS 15, tvOS 15, and macOS 12 or later. Load track metadata asynchronously using [`loadMetadata(for:completionHandler:)`](/documentation/AVFoundation/AVAssetTrack/loadMetadata(for:completionHandler:)) instead.

You can call this method without blocking the current thread after you’ve loaded the [`availableMetadataFormats`](/documentation/AVFoundation/AVAssetTrack/availableMetadataFormats) property.

---

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)