Skip to content
Clear Postcode

Postcode lookup API

Your first postcode lookup in five minutes

A REST API for every UK postcode: council, ward, constituency, coordinates and more, plus validation, autocomplete, nearest postcodes, distances and bulk lookup. 10,000 lookups a month free, instant key, no card.

Free for good: 10,000 lookups a month. No card, no password.

Quickstart

Three steps

  1. 1. Get a free key. Enter your email below. The link we send signs you in and shows your secret key.
  2. 2. Make your first call. GET https://api.clearpostcode.co.uk/v1/postcodes/SW1A%201AA with your key in the X-Api-Key header.
  3. 3. Go live. Use secret keys on servers and publishable keys, locked to your domains, in browsers.

Base URL https://api.clearpostcode.co.uk/v1 · JSON in, JSON out · errors as RFC 9457 problem details

Endpoints

Everything in v1

Full detail in the API reference and openapi.json.

EndpointWhat it doesBilling
GET /v1/postcodes/{postcode}Look up a postcode1 lookup when found; not found is free
GET /v1/postcodes/{postcode}/validateValidate a postcode1 lookup when known; otherwise free
GET /v1/postcodes/{postcode}/nearestPostcodes near a postcode1 lookup
GET /v1/postcodesPostcodes near a point (reverse geocode)1 lookup when anything is found
POST /v1/postcodesBulk lookup (up to 100)1 lookup per postcode found
POST /v1/reverseBulk reverse geocode (up to 50)1 lookup per point with a result
GET /v1/autocompleteAutocomplete a partial postcodeFree (fair use)
GET /v1/distanceDistance between two postcodes1 lookup
GET /v1/outcodes/{outcode}A postcode district1 lookup
GET /v1/outcodes/{outcode}/postcodesEvery postcode in a district1 lookup per page
GET /v1/sectors/{sector}A postcode sector1 lookup
GET /v1/areas/{area}A postcode area1 lookup
GET /v1/placesFind a place1 lookup when anything is found
GET /v1/usageYour usageFree
GET /v1/addressesAddresses at a postcode (early access)Early access1 address lookup per postcode (early access)
GET /v1/addresses/suggestAddress autocomplete (early access)Early accessFree
GET /v1/addresses/{udprn}Resolve one address (early access)Early access1 address lookup

Questions

Developer questions

How do I authenticate?

Send your key in the X-Api-Key header (or Authorization: Bearer). Secret keys (cp_live_…) are for servers and are refused when a browser sends them. Publishable keys (cp_pub_…) are for browsers and only work on the domains you list.

Can I try it without a key?

Yes. Single lookups, validation, autocomplete, nearest, distance and places answer without a key at 30 requests a minute per address, so you can test from a terminal right now.

What are the rate limits?

Free keys handle about 10 requests a second, Business about 100. Too fast gets a 429 with Retry-After; an empty monthly allowance gets a 402 with an upgrade link, never a surprise bill.

How do you version the API?

v1 only ever grows: new endpoints and new fields, never a removed or renamed one. Anything breaking would be v2, announced at least 12 months ahead with Deprecation and Sunset headers.

Is there an OpenAPI file?

Yes: https://api.clearpostcode.co.uk/openapi.json (OpenAPI 3.1). Import it into Postman, Insomnia or your code generator.