# UK Postcode API – Lookup, Reverse Geocode & Autocomplete

Bulk UK postcode lookup with latitude/longitude, district, ward, county, region, constituency, NHS and police areas and deprivation index; reverse geocode coordinates to nearest postcodes; autocomplete partial postcodes; outcode data; terminated postcode detection.

$0.16 per 1,000 postcodes

[Get an API key](https://pushbuild.com/apis/app/signup?api=uk-postcodes)

Example request

```
POST /uk-postcodes/run
{
  "postcodes": [
    "SW1A 1AA",
    "M1 1AE"
  ],
  "maxItems": 20
}
```

## What a response looks like

POST /uk-postcodes/run{"maxItems": 5, "postcodes": ["SW1A 1AA", "M1 1AE"]}

```
{"count": 2, "items": [{ "adminCounty": null, "adminDistrict": "Westminster", "adminWard": "St James's", "country": "England", "europeanElectoralRegion": "London", "incode": "1AA", "outcode": "SW1A", "parish": "Westminster, unparished area", "parliamentaryConstituency": "Cities of London and Westminster", "parliamentaryConstituency2024": "Cities of London and Westminster", … ]}
```

| adminCounty | adminDistrict | adminWard | country | europeanElectoralRegion | incode |
| --- | --- | --- | --- | --- | --- |
|  | Westminster | St James's | England | London | 1AA |
|  | Manchester | Piccadilly | England | North West | 1AE |

Real rows returned by this API on 2026-11-09 for the request shown.

## What it returns

Every current UK postcode, from Office for National Statistics and Ordnance Survey open data.

Postcode, latitude/longitude, eastings/northings, country, region, district, county, ward, parish, parliamentary constituency, NHS and police areas, LSOA/MSOA, deprivation index and ONS codes. Invalid and terminated postcodes are flagged and not charged.

## Common uses

Address forms, delivery zones, store locators, CRM cleaning, property and demographic analysis. Pay per postcode.

## Request

`POST https://api.pushbuild.com/uk-postcodes/run` with a JSON body. Send your key in the `X-API-Key` header.

| Field | Type | Description |
| --- | --- | --- |
| `postcodes` | list of strings | Full UK postcodes, any spacing or case. |
| `coordinates` | list of strings | "lat,lon" points; returns nearest postcodes. |
| `autocomplete` | list of strings | Partial postcodes, e.g. SW1A 1. |
| `outcodes` | list of strings | Postcode districts, e.g. SW1A, M1. |
| `radiusMeters` | integer | Search radius for coordinates (max 2000). Default: `1000`. |
| `maxResultsPerPoint` | integer | Postcodes per coordinate or autocomplete (max 100). Default: `10`. |
| `autocompleteDetails` | boolean | Return full records instead of postcode strings. Default: `true`. |
| `maxItems` | integer | Maximum items to return (1-500). Default: `100`. |

### Example

```
curl -X POST https://api.pushbuild.com/uk-postcodes/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"postcodes": ["SW1A 1AA", "M1 1AE"], "maxItems": 20}'
```

### Response

```
{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}
```

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

## Pricing

Pay only for results returned: $0.16 per 1,000 postcodes. No charge for errors or empty searches.

| Postcodes | Cost |
| --- | --- |
| 1,000 | $0.16 |
| 10,000 | $1.60 |
| 100,000 | $16.00 |
| 1,000,000 | $160.00 |
| 6,249 a month | Free ($1 monthly credit) |

## Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: `https://api.pushbuild.com/mcp/uk-postcodes`. Add it to any assistant that supports remote MCP servers, with your key in the `X-API-Key` header. Same prices. [Setup for each app](https://pushbuild.com/apis/mcp.html).

## Related APIs

- [France Address Geocoder API](https://pushbuild.com/apis/france-address-geocoder.html): Geocode French addresses with the national address database (Base Adresse Nationale): coordinates, normalised label, house number, street, postcode, city, INSEE code and department, plus reverse geocoding from latitude and longitude..
- [US Public Schools API](https://pushbuild.com/apis/us-public-schools.html): Every US public school from the NCES EDGE directory: school and district IDs, name, address, county, locale code, latitude and longitude, metro area and congressional district.
- [US Address Geocoder API](https://pushbuild.com/apis/us-address-geocoder.html): Geocode US street addresses to latitude and longitude with the standardized address, and get Census geographies: state, county, tract, block, place, congressional and state legislative districts.
- [Chicago Crime API](https://pushbuild.com/apis/chicago-crime.html): Chicago crime incidents from the City of Chicago data portal, updated daily: offense type and description, date, block, location type, arrest and domestic flags, IUCR and FBI codes, beat, district, ward, community area and coordinates..
- [UN SDG Indicators API](https://pushbuild.com/apis/un-sdg-indicators.html): United Nations Sustainable Development Goals global database: about 700 data series (poverty, hunger, health, education, gender, water, energy, jobs, inequality, climate) with observations by country or region and year, units, nature and source.
- [UK Crime Data API](https://pushbuild.com/apis/uk-police-crime.html): Street-level crime for any UK postcode or coordinates in England, Wales and Northern Ireland: category, street, month and outcome, or a per-category summary.

## Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

[hello@pushbuild.com](mailto:hello@pushbuild.com?subject=API%20question)

## New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

---
As of 2026-12-03. Source: https://pushbuild.com/apis/uk-postcodes.html
