Street Address Validation in C#

Automating the validation of street addresses is a small but important step you can take to improve the fluidity of your business. Utilizing the Validate Street Address API on your website or in your system can prevent future pain points for users by verifying the information ahead of time.

Image for post
Image for post

To initiate the process, you can run the command to install the .NET Core SDK (.NET Framework also available):

Install-Package Cloudmersive.APIClient.NETCore.Validate -Version 2.0.2

Our next step is to create instance of the API using the API key, and then calling the validation function:

using System; 
using System.Diagnostics;
using Cloudmersive.APIClient.NETCore.Validate.Api;
using Cloudmersive.APIClient.NETCore.Validate.Client;
using Cloudmersive.APIClient.NETCore.Validate.Model;

The returned result will disclose if the input street address is valid or invalid; if it shows up as a valid, the API will also indicate the latitude and longitude of the location. This technology supports the full spectrum of addresses whether, local, national, or international. To retrieve your free API key and gain access to this and a hundreds of other APIs, simply head to the Cloudmersive website and register for an account.

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store