Normalize a Street Address in Swift

When retrieving user information, such as addresses, from text strings in electronic correspondence, incompatible formatting is a common occurrence. To avoid this potential issue, you can use the following API to automatically normalize and validate an input street address; it supports all major international addresses, ensuring full coverage of your customer base.

All you will need for this operation is your parse request (full address) and API key, which you can input into the below example code:

import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

The returned response will indicate if the address is valid, as well as the latitude and longitude if it is. To retrieve your API key, visit the Cloudmersive website and register for a free account; this provides 800 monthly calls across any of our APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.