---
title: LinkMetadata
framework: linkpresentation
role: symbol
role_heading: Structure
path: linkpresentation/linkmetadata
---

# LinkMetadata

A structure containing metadata about a URL.

## Declaration

```swift
nonisolated struct LinkMetadata
```

## Overview

Overview Use LinkMetadata to store metadata about a URL, including its title, icon, images, and video. Fetch metadata using LPMetadataProvider. For remote URLs, cache the metadata locally to avoid the data and performance cost of fetching it from the internet every time you present it. LinkMetadata is also serializable and conforms to Codable.

## Topics

### Structures

- [LinkMetadata.Attachment](linkpresentation/linkmetadata/attachment.md)

### Initializers

- [init(_:)](linkpresentation/linkmetadata/init(_:).md)
- [init(fetching:timeout:includeSubresources:)](linkpresentation/linkmetadata/init(fetching:timeout:includesubresources:)-69bj2.md)
- [init(fetching:timeout:includeSubresources:)](linkpresentation/linkmetadata/init(fetching:timeout:includesubresources:)-7rkd9.md)
- [init(url:)](linkpresentation/linkmetadata/init(url:).md)

### Instance Properties

- [originalURL](linkpresentation/linkmetadata/originalurl.md)
- [remoteVideo](linkpresentation/linkmetadata/remotevideo.md)
- [title](linkpresentation/linkmetadata/title.md)
- [url](linkpresentation/linkmetadata/url.md)

### Instance Methods

- [containsMedia(_:exportableAs:)](linkpresentation/linkmetadata/containsmedia(_:exportableas:).md)
- [media(_:as:)](linkpresentation/linkmetadata/media(_:as:).md)
- [setMedia(_:for:)](linkpresentation/linkmetadata/setmedia(_:for:).md)

### Type Aliases

- [LinkMetadata.Specification](linkpresentation/linkmetadata/specification.md)
- [LinkMetadata.UnwrappedType](linkpresentation/linkmetadata/unwrappedtype.md)
- [LinkMetadata.ValueType](linkpresentation/linkmetadata/valuetype.md)

### Type Properties

- [defaultResolverSpecification](linkpresentation/linkmetadata/defaultresolverspecification.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomLocalizedStringResourceConvertible](foundation/customlocalizedstringresourceconvertible.md)
- [Decodable](swift/decodable.md)
- [DisplayRepresentable](appintents/displayrepresentable.md)
- [Encodable](swift/encodable.md)
- [Escapable](swift/escapable.md)
- [InstanceDisplayRepresentable](appintents/instancedisplayrepresentable.md)
- [IntentValueConvertible](appintents/intentvalueconvertible.md)
- [IntentValueExpressing](appintents/intentvalueexpressing.md)
- [PersistentlyIdentifiable](appintents/persistentlyidentifiable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Transferable](coretransferable/transferable.md)
- [TypeDisplayRepresentable](appintents/typedisplayrepresentable.md)
