<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFURLComponentType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@E@CFURLComponentType"
  },
  "title" : "CFURLComponentType"
}
-->

# CFURLComponentType

The types of components in a URL.

```
enum CFURLComponentType
```

## Overview

These constants are used by the [`CFURLGetByteRangeForComponent(_:_:_:)`](/documentation/CoreFoundation/CFURLGetByteRangeForComponent(_:_:_:)) function.

## Topics

### Constants

[`kCFURLComponentScheme`](/documentation/CoreFoundation/CFURLComponentType/scheme)

The URL’s scheme.

[`kCFURLComponentNetLocation`](/documentation/CoreFoundation/CFURLComponentType/netLocation)

The URL’s network location.

[`kCFURLComponentPath`](/documentation/CoreFoundation/CFURLComponentType/path)

The URL’s path component.

[`kCFURLComponentResourceSpecifier`](/documentation/CoreFoundation/CFURLComponentType/resourceSpecifier)

The URL’s resource specifier.

[`kCFURLComponentUser`](/documentation/CoreFoundation/CFURLComponentType/user)

The URL’s user.

[`kCFURLComponentPassword`](/documentation/CoreFoundation/CFURLComponentType/password)

The user’s password.

[`kCFURLComponentUserInfo`](/documentation/CoreFoundation/CFURLComponentType/userInfo)

The user’s information.

[`kCFURLComponentHost`](/documentation/CoreFoundation/CFURLComponentType/host)

The URL’s host.

[`kCFURLComponentPort`](/documentation/CoreFoundation/CFURLComponentType/port)

The URL’s port.

[`kCFURLComponentParameterString`](/documentation/CoreFoundation/CFURLComponentType/parameterString)

The URL’s parameter string.

[`kCFURLComponentQuery`](/documentation/CoreFoundation/CFURLComponentType/query)

The URL’s query.

[`kCFURLComponentFragment`](/documentation/CoreFoundation/CFURLComponentType/fragment)

The URL’s fragment.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)