<!--
{
  "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/AVAsset/metadata(forFormat:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAsset(im)metadataForFormat:"
  },
  "title" : "metadata(forFormat:)"
}
-->

# metadata(forFormat:)

Returns an array of metadata items from the container with the specified format.

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

## Parameters

`format`

The metadata format for which you want items.

## Return Value

An array of [`AVMetadataItem`](/documentation/AVFoundation/AVMetadataItem) objects, one for each metadata item in the container of the specified format, or an empty array if there is no metadata for the specified format.

## Discussion

You can filter the array to the specific items of interest using the class methods provided by [`AVMetadataItem`](/documentation/AVFoundation/AVMetadataItem), like [`metadataItems(from:filteredByIdentifier:)`](/documentation/AVFoundation/AVMetadataItem/metadataItems(from:filteredByIdentifier:)) or [`metadataItems(from:with:)`](/documentation/AVFoundation/AVMetadataItem/metadataItems(from:with:)).

You can call this method without blocking the current thread after you’ve asynchronously loaded the [`availableMetadataFormats`](/documentation/AVFoundation/AVAsset/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)