Developers
API reference
Integrate fast, accurate UK address and postcode lookups. All endpoints return clean, structured JSON.
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.
https://api.locatebase.com/postcode?postcode=SW1A%201AA&key=YOUR_API_KEYRate 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.
Response format
Successful lookups return a Meta object and a Results array. Each result contains the following fields.
{
"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"
}
]
}/findAddress search
Search for addresses using a free-text query, such as a full or partial address.
curl "https://api.locatebase.com/find?query=10%20Downing%20Street&key=YOUR_API_KEY"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"
}
]
}/postcodePostcode lookup
Return every address for a given postcode.
curl "https://api.locatebase.com/postcode?postcode=SW1A%201AA&key=YOUR_API_KEY"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"
}
]
}/uprnUPRN lookup
Retrieve a single address by its Unique Property Reference Number (UPRN).
curl "https://api.locatebase.com/uprn?uprn=100023336956&key=YOUR_API_KEY"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"
}
]
}/nearestNearest address
Find the nearest address to a coordinate point.
curl "https://api.locatebase.com/nearest?latitude=51.5014&longitude=-0.1419&key=YOUR_API_KEY"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"
}
]
}/bboxBounding box search
Return addresses within a rectangular bounding box. UK data only.
curl "https://api.locatebase.com/bbox?bbox=529000%2C179000%2C530000%2C180000&key=YOUR_API_KEY"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"
}
]
}/radiusRadius search
Return addresses within a radius of a point. UK data only.
curl "https://api.locatebase.com/radius?point=530047%2C179951&radius=100&key=YOUR_API_KEY"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"
}
]
}/polygonPolygon search
Return addresses within a custom GeoJSON polygon. UK data only.
Request body
{
"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
]
]
]
}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
{
"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.