Cleanse Address
The address cleanse API attempts to return the closest matching address for any given address inputs. We also return a number of Match Level indicators that describe the degree to which the suggested address matches the input address. The more impaired the input address, the harder it is to cleanse.
Confidence Score
The confidence score is a number ranging between 0 and 1. Where 1 implies a full match and 0 implies no major elements completely match. Each incorrect, missing or misspelled element will subtract from the overall confidence score.
Deciding on an Acceptable Confidence Score Threshold
Different address cleanse projects can have radically different inputs. However, within each project, the inputs tend to repeat the same errors. For instance, some input datasets may be exclusively inputted manually and be prone to typos. Others may have a persistently missing datapoint such as organisation name or postcode. For this reason, it is important to understand that there is no absolute Confidence Score threshold. Instead, the acceptable confidence score must be determined on a project by project basis based on systematic errors present in the data and business goals.
When determining an acceptable Confidence Score threshold you should load a subset of the dataset into a spreadsheet application like Excel and sort on the score. Scrolling from top-to-bottom you will be able to observe matches from best to worst. As you start to hit the lower quality searches, you will be able to roughly determine:
- Which confidence scores indicate ambiguous matches (i.e. up to building level only)
- Which confidence scores indicate a poor or no match (i.e. the nearest matching address is too far from the input address)
Depending on your business goals, you can also use the Match Levels to determine an acceptable match. For instance, do you need to match up to the thoroughfare or building name only? Are accurate organisation names an important feature?
Query parameters
API Key
Your unique identifier that allows access to our APIs.
Begins ak_. Available from your dashboard
** Tags ** A comma separated list of tags to query over.
Useful if you want to specify the circumstances in which the request was made.
If multiple tags are specified, the response will only comprise of requests for which all the tags are satisfied - i.e. searching "foo,bar" will only query requests which tagged both "foo" and "bar".
Identify the country of the address to cleanse. Defaults to UK (GBR)
Request body
Example request
{
"query": "10 Downing Street, London, SW2A 2BN",
"postcode": "SW1A 2BN",
"post_town": "London",
"county": "Kent"
}Response
Success
Example response
{
"result": {
"match": {
"id": "paf_8387729",
"country": "England",
"line_1": "Prime Minister & First Lord of Treasury",
"line_2": "10 Downing Street",
"post_town": "London",
"postcode": "SW1A 2AA",
"county": "London",
"udprn": 23747771,
"umprn": 983729,
"postcode_outward": "SW1A",
"postcode_inward": "2AA",
"thoroughfare": "Downing Street",
"building_number": "10",
"sub_building_name": "Flat 1",
"po_box": "100",
"organisation_name": "Prime Minister & First Lord Of The Treasury",
"su_organisation_indicator": "Y",
"delivery_point_suffix": "1A",
"premise": "10",
"postal_county": "London",
"traditional_county": "Greater London",
"district": "Westminster",
"ward": "St. James'",
"longitude": 0.002823,
"latitude": 52.938278,
"eastings": 9382,
"northings": 123932
}
}
}