<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DataDetection",
  "identifier" : "/documentation/DataDetection/DataDetector",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "DataDetection"
    ],
    "preciseIdentifier" : "s:13DataDetection0A8DetectorO"
  },
  "title" : "DataDetector"
}
-->

# DataDetector

An extension to the string protocol that scans strings for semantic entities, such as email addresses, phone numbers, URLs, and flight information.

```
enum DataDetector
```

## Topics

### Methods that scan strings for known content types

  <doc://com.apple.documentation/documentation/Swift/StringProtocol/dataDetectorMatches(_:options:)>

### Structures

[`Match`](/documentation/DataDetection/DataDetector/Match)

A representation of a match that includes common properties and an enumeration that represents the match type and its specific semantic components.

[`MatchType`](/documentation/DataDetection/DataDetector/MatchType)

A set of types of matches that the system can find in a string.

[`Options`](/documentation/DataDetection/DataDetector/Options)

A set of options you can use to refine the behavior of text scanning, and better interpret the semantic domain of the matches.

### Known entity types

[`all`](/documentation/DataDetection/DataDetector/MatchType/all)

A set of types that includes all publicly useable types.

[`link`](/documentation/DataDetection/DataDetector/MatchType/link)

The type that represents links, not limited to web links.

[`emailAddress`](/documentation/DataDetection/DataDetector/MatchType/emailAddress)

The type that represents email addresses.

[`phoneNumber`](/documentation/DataDetection/DataDetector/MatchType/phoneNumber)

The type that represents phone numbers.

[`postalAddress`](/documentation/DataDetection/DataDetector/MatchType/postalAddress)

The type that represents postal addresses.

[`calendarEvent`](/documentation/DataDetection/DataDetector/MatchType/calendarEvent)

The type that represents calendar events, such as dates and times, or date and time ranges.

[`moneyAmount`](/documentation/DataDetection/DataDetector/MatchType/moneyAmount)

The type that represents monetary amounts.

[`measurement`](/documentation/DataDetection/DataDetector/MatchType/measurement)

The type that represents measurements, such as distances and weights.

[`flightNumber`](/documentation/DataDetection/DataDetector/MatchType/flightNumber)

The type that represents flight numbers.

[`shipmentTrackingNumber`](/documentation/DataDetection/DataDetector/MatchType/shipmentTrackingNumber)

The type that represents shipment tracking numbers.

[`paymentIdentifier`](/documentation/DataDetection/DataDetector/MatchType/paymentIdentifier)

The type that represents payment identifiers, such as Universal Payments Interface (UPI) identifiers.



---

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)