Who Should Use This Guide
For: Business owners and developers integrating address verification without complex setup. You’ll need: A Loqate API key and basic HTML knowledge. Not covered: Tag-based integrations (see Tag Setup), batch processing of large address lists, or CASS/SERP certification workflows.What You’ll Build
An address verification form that:- Validates addresses against postal datasets
- Corrects errors and typos automatically
- Standardizes address formatting
- Shows match quality scores (AVC codes)
- Works with addresses in 250+ countries
Quick Start
To set up Address Verify, you’ll need an API key. Find out how to get yours here.Choose Your Approach
- Standalone Form
- Integrate with Existing Form
Use case: Testing the API or adding to a static pageA self-contained HTML file you can copy and use immediately.Jump to standalone HTML example
Add Your Key
ReplaceYOUR_API_KEY in the code with your actual Loqate API key.
Test
- Open your page
- Enter an address with typos like “123 Mane Street, Bostan MA”
- Click verify
- See the corrected address: “123 Main Street, Boston MA”
Address Verify validates against postal datasets for 250+ countries. Match quality is indicated by AVC codes (V44 = perfect match, V33 = good match, etc.).
Sample Project: Checkout Form Integration
This walkthrough shows how to add address verification to a checkout form. Follow along to see a basic form transform into a verification-enabled form.This is a detailed walkthrough. If you just want working code, skip to Integration Example or Standalone HTML Example.
Before: Unverified Address Entry
A checkout form without verification: This form works, but doesn’t verify or correct addresses. Let’s add verification.How Address Verify Works
Address Verify validates addresses in a single API call:The Verification Process
Input: You send address fields (street, city, postal code, country) Processing: The API:- Parses the input fields
- Matches against postal reference data
- Corrects typos and standardizes formatting
- Returns match quality scores
- Corrected address in standardized format
- AVC code indicating match quality
- Original input for comparison
Understanding AVC Codes
The AVC (Address Verification Code) tells you match quality: Format:V44-I44-P7-100
Key components:
-
First character: Verification status
V= Verified (use this address)P= Partially verified (check details)U= Unverified (rejected)
-
Match level (2nd-3rd characters):
44= Premise level (street + number) - Best33= Street level22= Locality level (city)- Lower = Less precise
-
Final number: Match percentage
100= Perfect match, no changes95-99= Minor corrections80-94= Significant corrections- Below 80 = Major issues
V44with 95+ matchscore = Accept automaticallyV33orV44with 80-94 = Review changes, usually acceptV22or below = Reject or ask user to verifyPorU= Reject
Standalone HTML Example
A minimal address verification form for quick testing: Perfect for:- Quick API testing
- Learning how address verification works
- Simple integrations without checkout flows
- Copy the code
- Replace
YOUR_API_KEY - Save and test with different addresses
This example shows original vs corrected addresses side-by-side with the AVC code for learning purposes.
Code on GitHub
If you’d like to browse the code snippets in this implementation guide or clone them, visit the repository on GitHub.Integration Example
Here’s the checkout form with full address verification integrated: To use this code:- Copy the code
- Replace
YOUR_API_KEYwith your actual Loqate API key - Save as an HTML file
- Open in a browser to test
- Customize styling to match your brand
- Real-time verification on form submission
- Shows before/after comparison
- Automatic field updates with corrected values
- Accept/reject workflow based on AVC
- Clean, production-ready code structure
This example accepts addresses with V44/V33 match levels and 80+ matchscore. Adjust thresholds based on your requirements.
Integration Tips
Adding to Your Existing Forms
To add address verification to your current forms:-
Add the verification function from the integration example to your page’s
<script>section- Handles API requests and response parsing
-
Add verification UI styles from the integration example to your page’s
<style>section- Shows before/after comparison
- Displays AVC codes and match quality
-
Add the comparison display element to show verification results
<div id="verificationResult"></div>
-
Add the event listeners to trigger verification and handle acceptance
- Submit event to verify before processing
- Accept button to use corrected address
Choosing Input Format
Address Verify accepts two input formats: Structured (Recommended):Country field even in unstructured requests.
Deciding Match Acceptance
Set thresholds based on your use case: E-commerce / Standard shipping:Handling Verification Results
Scenario 1: Perfect Match (V44-I44-P7-100)- No changes made
- Accept automatically
- No user intervention needed
- Small typos fixed
- Show user what changed
- Usually auto-accept with notification
- Significant changes
- Require user confirmation
- Show before/after clearly
- Address not found
- Ask user to re-enter
- Consider offering manual override for edge cases
Updating Form Fields
Option A: Automatic update (aggressive):Showing Verification Status
Provide clear feedback to users:Styling Customization
Customize the verification UI to match your design:Troubleshooting
Invalid API Key
Verify you’ve replacedYOUR_API_KEY with your actual key from your Loqate account.
Address Not Verifying
Check:- Country field is provided (required)
- Address format matches country standards
- You have available credits in your account
- API key hasn’t been restricted by domain, IP, or rate limits
- Postal code matches locality/administrative area
All Addresses Return Low Matchscore
Common causes:- Using unstructured input (single Address field) - use structured input instead
- Missing country field
- Incorrect country code
- Address format doesn’t match country conventions
Form Not Appearing
Ensure you copied the standalone HTML file including all<style> and <script> sections. The examples are self-contained and include all required code.
CORS Errors
The examples must be hosted on a web server, not opened as localfile:// URLs. Upload to your website or use a development server like Python’s http.server or Node’s http-server.
Data Privacy
- Addresses verified through Loqate’s API
- Stored in infrastructure logs for 30 days for operational purposes
- Results returned immediately
- See Privacy Policy for complete details

