In 2025, most people have made a purchase online at least once. Or twice. Maybe a hundred times. Many consumers shop online so frequently that they wouldn't be able to keep count! The majority of these virtual consumers have likely encountered kinks in the online shopping experience before.
For example, maybe you've checked the tracking for that one package you're so excited for... just to see that it was returned to the sender because of an incorrect address. Maybe you never receive an order confirmation email because you accidentally mistyped your email address during checkout. Maybe a store or business has tried to get in touch with you about your order, but they couldn't because you wrote your home phone number that's been disconnected for years instead of your cell phone in the checkout.
Loqate is a global data verification and enrichment software that helps to solve these issues and more by validating user information in real-time. The best part? You can use Loqate from the comfort of your own SAS installation! In this post, I'll demonstrate how to use the Verify with Loqate step in SAS Studio to validate your essential data with ease.
The Verify with Loqate Step
The Verify with Loqate step enables verification of addresses, emails, and phone numbers through the Loqate Verify API. Loqate can also generate geocodes for address data. SAS will pass your data to the API, where Loqate will process and verify it. The final results are returned back to SAS, where you can then store, analyze, or integrate them into your data enrichment processes.
Loqate is a third-party tool, which you can learn more about through the official Loqate documentation. In the Verify with Loqate step, you can select the option to show the API input and output in the log if you'd like to see the full details of this step's processing. In addition, Loqate associates a cost for each verification, and use of this step will require a Loqate API key. If you don't have a Loqate account already, see the Getting Started With Loqate documentation.
The Verify with Loqate step is available to anybody with a SAS Studio Basic license or higher. For more information on SAS Studio licensing, see the documentation.
To learn more about the Verify with Loqate step, visit the documentation.
Scenario
While Loqate is most commonly used for verifying customer data, I'll be demonstrating its efficacy with a different scenario which uses publicly available location and contact data.
For many students, the end of high school is all about getting ready for college: planning campus visits, preparing applications, talking to admissions counselors, and writing essay after essay. This process is daunting enough on its own, but bad data can make it even harder. I still remember showing up for university tours and immediately getting lost because the provided address led to a random point in the middle of campus instead of a specific building. Even once I started completing my applications, I remember sending emails with important questions to admissions mailboxes and having them bounced back to me immediately, because I'd been given an out-of-date email address that didn't exist anymore.
For this post, I created a dataset containing the main address, phone number, and admissions email for each of the top 20 universities in the world, based on the 2025 QS World University rankings.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
I'd like to verify this data. First, I want to make sure that these values are up to date (meaning that they're valid and they are associated with actual locations, phone carriers, and email mailboxes). In addition, since this list of universities spans the globe, I want to make sure that these elements are written in the correct format based on their country's individual standards. Lastly, I can use Loqate's features to answer more detailed questions, such as:
Next, I'll use the Verify with Loqate step to handle these tasks.
Initial Flow Setup
In my flow, I'll add a Verify with Loqate step (from the Enrichment group) and connect it to my source data. I'll also add an output table. Since each call to the Loqate API incurs a cost, I want to make sure my results are stored permanently! Then, once I'm set up, I can start configuring each verification tool on their respective tabs by checking "Enable ... verification".
Address Verification
Address verification is Loqate's most powerful feature. As a result, this tab has the most options and settings available.
Before I map my fields, I can select some general options. I can choose to geocode the address, which will generate specific latitude and longitude coordinates for each address. I can also standardize the country code in my data source if it isn't already standardized. As mentioned previously, I can also choose to show the API input and output JSON in the log. I'll select all of the options here. Additionally, I can set a batch size for each call to Loqate for efficiency. While setting the batch size is a best practice, I won't be doing that in this demo because my dataset is quite small (20 rows).
Next, I can map the fields for address verification. The only two required fields are country and address. However, if your location data is parsed, you can map the optional fields to improve the accuracy of Loqate's verification, such as postal code, locality, administrative area, organization, building, and post box. I'm mapping only the required fields since my data isn't parsed.
Before I can run this step, I need to add my Loqate key on the Loqate tab. This allows SAS to access the Loqate Verify API.
Note: the key is blurred in this screenshot for security.
The Loqate tab also includes helpful options since each call to the Loqate API incurs a cost. By default, Test mode will be selected. When you run the flow in test mode, you are simply testing that your flow is configured correctly. Test mode output will look like this:
You'll see a table with the same structure as the Loqate results but with the string "SAS TEST" written for all of the Loqate return variables.
Alternatively, if you want to use a local container to verify addresses instead of Loqate, you can select Do not use the Loqate external endpoint and provide the container URI.
When you're ready to run the step, deselect Test mode before running the flow.
I'm going to check the log first since I enabled the option to show the API input and output in the log. For each address, I can see the original input value followed by the fields returned by the Loqate API.
Here, I can see the verification for the address for Oxford University. Notice that the full address has been split into its separate parts (Administrative area, building, building type, country, country name, locality, postal code, and more), and some of these parts have been transformed slightly - for example, the input Country value, GBR, was transformed to GB for the output Country field. In addition, I can see all of the fields generated by Loqate: Address Quality Index (AQI), Address Verification Code (AVC), GeoAccuracy, GeoDistance, Latitude, Longitude, and more.
I've also stored these results in a SAS table, so I can investigate them further within the SAS Studio table viewer. For example, I can sort the output by AQI so that the highest quality addresses (with an index of A for excellent quality) appear first.
Your original input fields will be included in the results with an added prefix of _dm_ to help differentiate between input and output fields. This means you can also compare the original input addresses to the transformed addresses from Loqate.
With this data, some addresses transformed quite a bit, while others had no or few changes.
The Loqate address verification process returns many fields (and sub-fields when possible), and I've discussed only a few here. For more information on interpreting these fields, see the Loqate documentation.
Email Verification
Next, I'll look at email verification. These settings are much simpler: this time, I can Show API input and output CSV in the log (recall that the Address verification used JSON), and there's only one field to map: Email.
This time, the results appear in the log in CSV format, with the first row representing the output field names.
In SAS Studio, I see a mix of results with my emails: some are valid, some are invalid, and some are marked as Accept_All, meaning the university's domain will accept mail to any account, so Loqate can't fully verify it. For any of those emails that aren't valid, I should double check the university's contact details if I want my messages to get an answer!
Additionally, I can see that most of these addresses represent system mailboxes, which is expected.
Phone Verification
The final feature is phone verification. Settings remain similar to the previous two verification options. Specifically, I can perform country ISO standardization before processing and show the API input and output CSV in the log. Phone verification doesn't include a batch processing option because phone numbers are processed one by one by default. The only required field to map is Phone, but I'll add the optional Country field too since it's already in my source table.
In the log, I can see the CSV output for each phone number, one number at a time.
In SAS Studio, I can see that all of the phone numbers are valid, which is great! I can also look at additional details like the name of the network each number belongs to, the country and national format of each phone number, the country prefix for international calls, and the number type (all numbers show up as landlines except for one).
Summary
In this post, I've demonstrated the features and capabilities of the Verify with Loqate step. Specifically, I successfully used the Loqate Verify API to verify address, email, and phone data without having to leave SAS Studio.
Interested in more content on data validation with SAS Studio Flows? Check out one of my past posts: Detailing your Data in SAS Studio Part 1: Identifying the Issues.
Is address verification an important tool for you? Which Loqate return field do you find the most useful or interesting? Share your thoughts, questions, and feedback below!
Find more articles from SAS Global Enablement and Learning here.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.