<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKDataDetectorTypes",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:@E@WKDataDetectorTypes"
  },
  "title" : "WKDataDetectorTypes"
}
-->

# WKDataDetectorTypes

The data detector types.

```
struct WKDataDetectorTypes
```

## Overview

To perform no data detection, create an empty set of data detector types, indicated by the empty array literal, `[]`. For example:

```swift
let myDataDetector: WKDataDetectorTypes = []
```

## Topics

### Data Detector Types

[`WKDataDetectorTypeNone`](/documentation/WebKit/WKDataDetectorTypes/WKDataDetectorTypeNone)

No data detection.

[`phoneNumber`](/documentation/WebKit/WKDataDetectorTypes/phoneNumber)

Detect phone numbers in text and create a link to call the specified number.

[`link`](/documentation/WebKit/WKDataDetectorTypes/link)

Detect URLs in text and turn them into links.

[`address`](/documentation/WebKit/WKDataDetectorTypes/address)

Detect addresses in text and turn them into links to display the location.

[`calendarEvent`](/documentation/WebKit/WKDataDetectorTypes/calendarEvent)

Turn future dates and times into links to create calendar events.

[`trackingNumber`](/documentation/WebKit/WKDataDetectorTypes/trackingNumber)

Detect tracking numbers in text and turn them into links.

[`flightNumber`](/documentation/WebKit/WKDataDetectorTypes/flightNumber)

Detect flight numbers in text and turn them into links.

[`lookupSuggestion`](/documentation/WebKit/WKDataDetectorTypes/lookupSuggestion)

Detect Spotlight suggestions and turn them into links.

[`all`](/documentation/WebKit/WKDataDetectorTypes/all)

Detect all data types and turn them into links.

### Initializers

[`init(rawValue:)`](/documentation/WebKit/WKDataDetectorTypes/init(rawValue:))

### Deprecated Types

[`spotlightSuggestion`](/documentation/WebKit/WKDataDetectorTypes/spotlightSuggestion)

Spotlight suggestions are detected and turned into links.



---

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)