# Technical specification

{% hint style="warning" %}

### Product has reached its End of Life (withdrawal) date

The OS Match & Cleanse API reached its End of Life on **31 March 2026** and was withdrawn. As a result, the API has been removed from existing API projects and is no longer be accessible. Historic usage of this API can still be tracked in the API Transaction History tab of the [OS Data Hub](https://osdatahub.os.uk/).

Documentation on this site for the API will remain in place for a short time to support customers migrating to a new solution. Future requests made to the OS Match & Cleanse API will fail. For further information, please visit [End of Life Information](/os-apis/accessing-os-apis/os-match-and-cleanse-api/end-of-life-information.md).
{% endhint %}

This technical specification explains the content of the OS Match & Cleanse API, and the methods that you can use to call it.

{% hint style="info" %}
If you are not familiar with the OS Match & Cleanse API please read the [overview documentation](/os-apis/accessing-os-apis/os-match-and-cleanse-api.md) before proceeding.
{% endhint %}

## Core concepts

This specification does not cover core concepts that apply to all Ordnance Survey APIs.

Please read the following pages to learn more about OS API core concepts:

* [Authentication](/os-apis/core-concepts/authentication.md)
* [Error codes](/os-apis/core-concepts/error-codes.md)
* [Rate-limiting policy](/os-apis/core-concepts/rate-limiting-policy.md)

## API reference

OS Match & Cleanse API has one type of request:

* **Match** for granular matching and cleansing of existing address records.

{% hint style="warning" %}

### API test authentication

The Open API block allows you to test OS APIs directly from the page with example data and parameters. To use this feature, you will need to add your API Key or OAuth2 token to the authentication field.

For help generating an API Key or OAuth2 token, please see the [Getting started with an API project](https://docs.os.uk/os-apis/core-concepts/getting-started-with-an-api-project) or [OAuth2 documentation](https://docs.os.uk/os-apis/accessing-os-apis/oauth-2-api).
{% endhint %}

## GET /match

> Returns matched addresses

```json
{"openapi":"3.0.1","info":{"title":"OS Match & Cleanse API","version":"v1.0"},"tags":[{"name":"Match","description":"Granular matching and cleansing of existing address records."}],"servers":[{"url":"https://api.os.uk/search/match/v1"}],"security":[{"api-key":[],"api-key-header":[],"oauth2":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"key","in":"query"}},"schemas":{"MatchedResults":{"type":"object","properties":{"header":{"type":"object","properties":{"uri":{"type":"string"},"query":{"type":"string"},"offset":{"type":"integer"},"totalresults":{"type":"integer"},"format":{"type":"string"},"dataset":{"type":"string"},"lr":{"type":"string"},"maxresults":{"type":"integer"},"matchprecision":{"type":"integer"},"epoch":{"type":"string"},"lastupdate":{"type":"string"},"output_srs":{"type":"string"}},"required":["uri","query","offset","totalresults","format","dataset","lr","maxresults","matchprecision","epoch","lastupdate","output_srs"]},"results":{"type":"array","items":{"type":"object","properties":{"DPA":{"$ref":"#/components/schemas/DPA"},"LPI":{"$ref":"#/components/schemas/LPI"}}}}}},"DPA":{"type":"object","properties":{"UPRN":{"type":"integer"},"UDPRN":{"type":"integer"},"ADDRESS":{"type":"string"},"ORGANISATION_NAME":{"type":"string"},"DEPARTMENT_NAME":{"type":"string"},"SUB_BUILDING_NAME":{"type":"string"},"BUILDING_NAME":{"type":"string"},"BUILDING_NUMBER":{"type":"integer"},"DEPENDENT_THOROUGHFARE_NAME":{"type":"string"},"THOROUGHFARE_NAME":{"type":"string"},"DOUBLE_DEPENDENT_LOCALITY":{"type":"string"},"DEPENDENT_LOCALITY":{"type":"string"},"POST_TOWN":{"type":"string"},"POSTCODE":{"type":"string"},"RPC":{"type":"string"},"X_COORDINATE":{"type":"number"},"Y_COORDINATE":{"type":"number"},"LNG":{"type":"number"},"LAT":{"type":"number"},"STATUS":{"type":"string"},"LOGICAL_STATUS_CODE":{"type":"integer"},"CLASSIFICATION_CODE":{"type":"string"},"CLASSIFICATION_CODE_DESCRIPTION":{"type":"string"},"LOCAL_CUSTODIAN_CODE":{"type":"integer"},"LOCAL_CUSTODIAN_CODE_DESCRIPTION":{"type":"string"},"COUNTRY_CODE":{"type":"string"},"COUNTRY_CODE_DESCRIPTION":{"type":"string"},"POSTAL_ADDRESS_CODE":{"type":"string"},"POSTAL_ADDRESS_CODE_DESCRIPTION":{"type":"string"},"BLPU_STATE_CODE":{"type":"integer"},"BLPU_STATE_CODE_DESCRIPTION":{"type":"string"},"TOPOGRAPHY_LAYER_TOID":{"type":"string"},"WARD_CODE":{"type":"string"},"PARISH_CODE":{"type":"string"},"PARENT_UPRN":{"type":"integer"},"LAST_UPDATE_DATE":{"type":"string"},"ENTRY_DATE":{"type":"string"},"LEGAL_NAME":{"type":"string"},"BLPU_STATE_DATE":{"type":"string"},"LANGUAGE":{"type":"string"},"MATCH":{"type":"number"},"MATCH_DESCRIPTION":{"type":"string"},"DELIVERY_POINT_SUFFIX":{"type":"string"}}},"LPI":{"type":"object","properties":{"UPRN":{"type":"integer"},"ADDRESS":{"type":"string"},"USRN":{"type":"integer"},"LPI_KEY":{"type":"string"},"ORGANISATION":{"type":"string"},"SAO_START_NUMBER":{"type":"integer"},"SAO_START_SUFFIX":{"type":"string"},"SAO_END_NUMBER":{"type":"integer"},"SAO_END_SUFFIX":{"type":"string"},"SAO_TEXT":{"type":"string"},"PAO_START_NUMBER":{"type":"integer"},"PAO_START_SUFFIX":{"type":"string"},"PAO_END_NUMBER":{"type":"integer"},"PAO_END_SUFFIX":{"type":"string"},"PAO_TEXT":{"type":"string"},"STREET_DESCRIPTION":{"type":"string"},"LOCALITY_NAME":{"type":"string"},"TOWN_NAME":{"type":"string"},"ADMINISTRATIVE_AREA":{"type":"string"},"AREA_NAME":{"type":"string"},"POSTCODE_LOCATOR":{"type":"string"},"RPC":{"type":"string"},"X_COORDINATE":{"type":"number"},"Y_COORDINATE":{"type":"number"},"LNG":{"type":"number"},"LAT":{"type":"number"},"STATUS":{"type":"string"},"LOGICAL_STATUS_CODE":{"type":"integer"},"CLASSIFICATION_CODE":{"type":"string"},"CLASSIFICATION_CODE_DESCRIPTION":{"type":"string"},"LOCAL_CUSTODIAN_CODE":{"type":"integer"},"LOCAL_CUSTODIAN_CODE_DESCRIPTION":{"type":"string"},"COUNTRY_CODE":{"type":"string"},"COUNTRY_CODE_DESCRIPTION":{"type":"string"},"POSTAL_ADDRESS_CODE":{"type":"string"},"POSTAL_ADDRESS_CODE_DESCRIPTION":{"type":"string"},"BLPU_STATE_CODE":{"type":"integer"},"BLPU_STATE_CODE_DESCRIPTION":{"type":"string"},"TOPOGRAPHY_LAYER_TOID":{"type":"string"},"WARD_CODE":{"type":"string"},"PARISH_CODE":{"type":"string"},"PARENT_UPRN":{"type":"integer"},"LAST_UPDATE_DATE":{"type":"string"},"ENTRY_DATE":{"type":"string"},"LEGAL_NAME":{"type":"string"},"BLPU_STATE_DATE":{"type":"string"},"STREET_STATE_CODE":{"type":"integer"},"STREET_STATE_CODE_DESCRIPTION":{"type":"string"},"STREET_CLASSIFICATION_CODE":{"type":"string"},"STREET_CLASSIFICATION_CODE_DESCRIPTION":{"type":"string"},"LPI_LOGICAL_STATUS_CODE":{"type":"integer"},"LPI_LOGICAL_STATUS_CODE_DESCRIPTION":{"type":"string"},"LANGUAGE":{"type":"string"},"MATCH":{"type":"number"},"MATCH_DESCRIPTION":{"type":"string"}}}}},"paths":{"/match":{"get":{"tags":["Match"],"summary":"Returns matched addresses","operationId":"getMatch","parameters":[{"name":"query","in":"query","description":"Free text search parameter.","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"The format the response will be returned in. Default: JSON.","required":false,"schema":{"type":"string","default":"JSON","enum":["JSON","XML"]}},{"name":"maxresults","in":"query","description":"The maximum number of results to return. Default: 100.","required":false,"schema":{"type":"integer","default":"100","minimum":1,"maximum":100}},{"name":"offset","in":"query","description":"Offset the list of returned results by this amount.","required":false,"schema":{"type":"integer","default":"0"}},{"name":"dataset","in":"query","description":"The dataset to return. Multiple values can be sent, separated by a comma. Default: DPA.","required":false,"schema":{"type":"string","default":"DPA","enum":["DPA","LPI"]}},{"name":"lr","in":"query","description":"Which language of addresses to return. Default: EN, CY.","required":false,"schema":{"type":"string","enum":["EN","CY"]}},{"name":"minmatch","in":"query","description":"The minimum match score a result has to have to be returned.","required":false,"schema":{"type":"number","minimum":0.1,"maximum":1}},{"name":"matchprecision","in":"query","description":"The decimal point position at which the match score value is to be truncated.","required":false,"schema":{"type":"number","minimum":1,"maximum":10}},{"name":"output_srs","in":"query","description":"The intended output spatial reference system. Default: EPSG:27700","required":false,"schema":{"type":"string","default":"EPSG:27700","enum":["BNG","EPSG:27700","WGS84","EPSG:4326","EPSG:3857","EPSG:4258"]}},{"name":"fq","in":"query","description":"Filter for classification code, logical status code, LPI logical status code and/or country code. Filtering for classification code will accept wildcard ( * ) searches. Multiple searches can be done by separating the codes with a space. Multiple filters can be used together by including the parameter multiple times","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Retrieves matched addresses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchedResults"}},"application/xml":{"schema":{"$ref":"#/components/schemas/MatchedResults"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-apis/accessing-os-apis/os-match-and-cleanse-api/technical-specification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
