v50

latestOpenAPI 3.0.3AGPLv3raw.githubusercontent.com2026-04-1028178439.6 KB
UK

Lookup Postcode

Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.

The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like Postcode Lookup.

Postcode Not Found

Lookup balance is unaffected by invalid postcodes. The API returns a 404 response with response body:

{
  "code": 4040,
  "message": "Postcode not found",
  "suggestions": ["SW1A 0AA"]
}

Suggestions

If a postcode cannot be found, the API will provide up to 5 closest matching postcodes. Common errors will be corrected first (e.g. mixing up O and 0 or I and 1).

If the suggestion list is small (fewer than 3), there is a high probability the correct postcode is there. You may notify the user or immediately trigger new searches.

The suggestion list will be empty if the postcode has deviated too far from a valid postcode format.

Multiple Residence

A small number of postcodes will return more than 100 premises. These may require pagination. Use page to paginate the result set.

get/postcodes/{postcode}

Path parameters

postcodestring required

Postcode to retrieve

Query parameters

api_keystring

API Key

Your unique identifier that allows access to our APIs.

Begins ak_. Available from your dashboard

filterstring

Restrict Result Fields

Comma separated whitelist of address elements to return.

E.g. filter=line_1,line_2,line_3 returns only line_1, line_2 and line_3 address elements in your response

pageinteger

Page

0 indexed indicator of the page of results to receive. Virtually all postcode results are returned on page 0.

A small number of Multiple Residence postcodes may need pagination (i.e. have more than 100 premises).

tagsstring

** 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".

Response

Success

code2000 required
message'Success' required
pageinteger required
limitinteger required
totalinteger required

Example response

{
  "result": [
    {
      "postcode": "SW1A 2AA",
      "postcode_inward": "2AA",
      "postcode_outward": "SW1A",
      "post_town": "London",
      "dependant_locality": "",
      "double_dependant_locality": "",
      "thoroughfare": "Downing Street",
      "dependant_thoroughfare": "",
      "building_number": "10",
      "building_name": "",
      "sub_building_name": "",
      "po_box": "",
      "department_name": "",
      "organisation_name": "Prime Minister & First Lord Of The Treasury",
      "udprn": 23747771,
      "postcode_type": "L",
      "su_organisation_indicator": "",
      "delivery_point_suffix": "1A",
      "line_1": "Prime Minister & First Lord Of The Treasury",
      "line_2": "10 Downing Street",
      "line_3": "",
      "premise": "10",
      "longitude": -0.12767,
      "latitude": 51.503541,
      "eastings": 530047,
      "northings": 179951,
      "country": "England",
      "traditional_county": "Greater London",
      "administrative_county": "",
      "postal_county": "London",
      "county": "London",
      "district": "Westminster",
      "ward": "St. James's",
      "uprn": "100023336956",
      "id": "paf_23747771",
      "country_iso": "GBR",
      "country_iso_2": "GB",
      "county_code": "",
      "language": "en",
      "umprn": "",
      "dataset": "paf"
    }
  ],
  "code": 2000,
  "message": "Success",
  "limit": 100,
  "page": 0,
  "total": 1
}
All 28 operations