How do I find duplicate addresses in a database, or better stop people already when filling in the form ? I guess the earlier the better?
Is there any good way of abstra
In the USA, you can use USPS Address Standardization Web Tool. It verifies and normalizes addresses for you. This way, you can normalize the address before checking if it already exists in the database. If all the addresses in the database are already normalized, you'll be able to spot duplicates easily.
Sample URL:
https://production.shippingapis.com/ShippingAPI.dll?API=Verify&XML=insert_request_XML_here
Sample request:
true
true
205 bagwell ave
nutter fort
wv
Sample response:
205 BAGWELL AVE
NUTTER FORT
WV
26301
4322
05
C025
Other countries might have their own APIs. Other people mentioned 3rd party APIs that support multiple countries that might be useful in some cases.