<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/URLRepresentableEntity/urlRepresentation-swift.type.property",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents22URLRepresentableEntityP17urlRepresentationAA0D17URLRepresentationVyxGvpZ"
  },
  "title" : "urlRepresentation"
}
-->

# urlRepresentation

The URL representation of the app entity.

```
static var urlRepresentation: Self.URLRepresentation { get }
```

## Discussion

Use this property to store the URL for your app entity. When setting the value of this property, you can use a combination
of static text and placeholder values to generate the final URL. The following code creates a representation for the entity
that includes its unique ID:

```swift
struct MyAppData: AppEntity, URLRepresentableEntity {
    static let defaultQuery = MyAppDataQuery()

    @Property(title: "Content ID")
    var contentID: String

    static var urlRepresentation = URLRepresentation("https://example.com/note=\(.$contentID)")
}
```

---

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)