---
title: DataDetector
framework: datadetection
role: symbol
role_heading: Enumeration
path: datadetection/datadetector
---

# DataDetector

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

## Declaration

```swift
enum DataDetector
```

## Topics

### Methods that scan strings for known content types

- [dataDetectorMatches(_:options:)](swift/stringprotocol/datadetectormatches(_:options:).md)

### Structures

- [DataDetector.Match](datadetection/datadetector/match.md)
- [DataDetector.MatchType](datadetection/datadetector/matchtype.md)
- [DataDetector.Options](datadetection/datadetector/options.md)

### Known entity types

- [all](datadetection/datadetector/matchtype/all.md)
- [link](datadetection/datadetector/matchtype/link.md)
- [emailAddress](datadetection/datadetector/matchtype/emailaddress.md)
- [phoneNumber](datadetection/datadetector/matchtype/phonenumber.md)
- [postalAddress](datadetection/datadetector/matchtype/postaladdress.md)
- [calendarEvent](datadetection/datadetector/matchtype/calendarevent.md)
- [moneyAmount](datadetection/datadetector/matchtype/moneyamount.md)
- [measurement](datadetection/datadetector/matchtype/measurement.md)
- [flightNumber](datadetection/datadetector/matchtype/flightnumber.md)
- [shipmentTrackingNumber](datadetection/datadetector/matchtype/shipmenttrackingnumber.md)
- [paymentIdentifier](datadetection/datadetector/matchtype/paymentidentifier.md)

## See Also

### Matched strings

- [DDMatch](datadetection/ddmatch.md)
