Developers

API reference

Integrate fast, accurate UK address and postcode lookups. All endpoints return clean, structured JSON.

Base URLhttps://api.locatebase.com

Introduction

The Locatebase API is a simple, RESTful service for looking up and verifying UK addresses. Send a request to one of the endpoints below with your API key and receive a structured JSON response. All requests are made over HTTPS to https://api.locatebase.com.

Don't have a key yet? Create a free account to get started.

Authentication

Authenticate every request by passing your API key as the key query parameter. Keep your key secret and never expose it in client-side code you don't control.

Example
https://api.locatebase.com/postcode?postcode=SW1A%201AA&key=YOUR_API_KEY

Rate limits

Requests are limited to 100 requests per minute per IP address. If you exceed the limit you'll receive a 429 response. If you need a higher limit, get in touch.

Errors

The API uses standard HTTP status codes. Errors return a JSON body describing the problem.

400
Bad RequestA required parameter is missing or invalid. The response body lists the validation errors.
401
UnauthorizedThe API key is missing or invalid. Pass a valid key as the key query parameter.
402
Payment RequiredYour account has insufficient credits for the request.
429
Too Many RequestsRate limit exceeded (100 requests per minute, per IP).
500
Server ErrorAn unexpected error occurred. Retry shortly or contact support.

Response format

Successful lookups return a Meta object and a Results array. Each result contains the following fields.

Field
Type
Description
UPRN
string
Unique Property Reference Number for the address.
Address
string
Full, formatted single-line address.
BuildingNumber
integer
Building or house number, where present.
StreetName
string
Thoroughfare / street name.
Town
string
Post town.
Postcode
string
Postcode of the address.
Coordinates
object
Easting/northing (x, y) coordinates.
Status
string
Address record status, e.g. APPROVED.
Classification
string
Property classification code.
Custodian
string
Data custodian / authority.
CountryCode
string
Country indicator (E, S, W, N).
MatchQuality
number
Confidence score of the match (0–1).
MatchStatus
string
Match type, e.g. EXACT.
Example response
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
GET/find

Address search

Search for addresses using a free-text query, such as a full or partial address.

Parameter
Type
Description
queryrequired
string
The free-text search query.
maxresultsoptional
integer
Maximum results to return (1–100). Defaults to 10.
countryCodeoptional
string
ISO country code to scope the search. Defaults to GB.
Request
curl "https://api.locatebase.com/find?query=10%20Downing%20Street&key=YOUR_API_KEY"

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
GET/postcode

Postcode lookup

Return every address for a given postcode.

Parameter
Type
Description
postcoderequired
string
The postcode to look up.
maxresultsoptional
integer
Maximum results to return (1–100). Defaults to 10.
countryCodeoptional
string
ISO country code to scope the search. Defaults to GB.
Request
curl "https://api.locatebase.com/postcode?postcode=SW1A%201AA&key=YOUR_API_KEY"

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
GET/uprn

UPRN lookup

Retrieve a single address by its Unique Property Reference Number (UPRN).

Parameter
Type
Description
uprnrequired
string
The UPRN identifying the property.
Request
curl "https://api.locatebase.com/uprn?uprn=100023336956&key=YOUR_API_KEY"

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
GET/nearest

Nearest address

Find the nearest address to a coordinate point.

Parameter
Type
Description
latituderequired
string
Latitude of the point.
longituderequired
string
Longitude of the point.
countryCodeoptional
string
ISO country code. Defaults to GB.
Request
curl "https://api.locatebase.com/nearest?latitude=51.5014&longitude=-0.1419&key=YOUR_API_KEY"

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
GET/bbox

Bounding box search

Return addresses within a rectangular bounding box. UK data only.

Parameter
Type
Description
bboxrequired
string
Bounding box as minX,minY,maxX,maxY (easting/northing).
Request
curl "https://api.locatebase.com/bbox?bbox=529000%2C179000%2C530000%2C180000&key=YOUR_API_KEY"

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
GET/radius

Radius search

Return addresses within a radius of a point. UK data only.

Parameter
Type
Description
pointrequired
string
Centre point as easting,northing.
radiusrequired
number
Radius in metres.
Request
curl "https://api.locatebase.com/radius?point=530047%2C179951&radius=100&key=YOUR_API_KEY"

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}
POST/polygon

Polygon search

Return addresses within a custom GeoJSON polygon. UK data only.

Request body

application/json
{
  "type": "Polygon",
  "crs": {
    "type": "name",
    "properties": {
      "name": "EPSG:4326"
    }
  },
  "coordinates": [
    [
      [
        -0.1419,
        51.5014
      ],
      [
        -0.1409,
        51.5014
      ],
      [
        -0.1409,
        51.5024
      ],
      [
        -0.1419,
        51.5014
      ]
    ]
  ]
}
Request
curl -X POST "https://api.locatebase.com/polygon?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"Polygon","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[-0.1419,51.5014],[-0.1409,51.5014],[-0.1409,51.5024],[-0.1419,51.5014]]]}'

Response

200 application/json
{
  "Meta": {
    "Query": "SW1A 1AA",
    "Offset": 0,
    "TotalResults": 1
  },
  "Results": [
    {
      "UPRN": "100023336956",
      "Address": "10 Downing Street, London, SW1A 2AA",
      "BuildingNumber": 10,
      "StreetName": "DOWNING STREET",
      "Town": "LONDON",
      "Postcode": "SW1A 2AA",
      "Coordinates": { "x": 530047, "y": 179951 },
      "Status": "APPROVED",
      "Classification": "RD04",
      "Custodian": "GREATER LONDON AUTHORITY",
      "CountryCode": "E",
      "StateCode": "GB",
      "LastUpdate": "2024-02-10",
      "EntryDate": "2001-03-19",
      "Language": "EN",
      "MatchQuality": 1,
      "MatchStatus": "EXACT"
    }
  ]
}

Ready to build?

Get an API key and make your first request in minutes.