---
title: scheme
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/url/scheme
---

# scheme

The scheme of the URL.

## Declaration

```swift
var scheme: String? { get }
```

## See Also

### Accessing the parts of a URL

- [fragment(percentEncoded:)](foundation/url/fragment(percentencoded:).md)
- [fragment](foundation/url/fragment.md)
- [host(percentEncoded:)](foundation/url/host(percentencoded:).md)
- [host](foundation/url/host.md)
- [lastPathComponent](foundation/url/lastpathcomponent.md)
- [path(percentEncoded:)](foundation/url/path(percentencoded:).md)
- [path](foundation/url/path.md)
- [password(percentEncoded:)](foundation/url/password(percentencoded:).md)
- [password](foundation/url/password.md)
- [pathComponents](foundation/url/pathcomponents.md)
- [pathExtension](foundation/url/pathextension.md)
- [port](foundation/url/port.md)
- [query(percentEncoded:)](foundation/url/query(percentencoded:).md)
- [query](foundation/url/query.md)
- [user(percentEncoded:)](foundation/url/user(percentencoded:).md)
