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.
Quickstart
Three steps
- 1. Get a free key. Enter your email below. The link we send signs you in and shows your secret key.
- 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. 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
| Endpoint | What it does | Billing |
|---|---|---|
| GET /v1/postcodes/{postcode} | Look up a postcode | 1 lookup when found; not found is free |
| GET /v1/postcodes/{postcode}/validate | Validate a postcode | 1 lookup when known; otherwise free |
| GET /v1/postcodes/{postcode}/nearest | Postcodes near a postcode | 1 lookup |
| GET /v1/postcodes | Postcodes near a point (reverse geocode) | 1 lookup when anything is found |
| POST /v1/postcodes | Bulk lookup (up to 100) | 1 lookup per postcode found |
| POST /v1/reverse | Bulk reverse geocode (up to 50) | 1 lookup per point with a result |
| GET /v1/autocomplete | Autocomplete a partial postcode | Free (fair use) |
| GET /v1/distance | Distance between two postcodes | 1 lookup |
| GET /v1/outcodes/{outcode} | A postcode district | 1 lookup |
| GET /v1/outcodes/{outcode}/postcodes | Every postcode in a district | 1 lookup per page |
| GET /v1/sectors/{sector} | A postcode sector | 1 lookup |
| GET /v1/areas/{area} | A postcode area | 1 lookup |
| GET /v1/places | Find a place | 1 lookup when anything is found |
| GET /v1/usage | Your usage | Free |
| GET /v1/addresses | Addresses at a postcode (early access)Early access | 1 address lookup per postcode (early access) |
| GET /v1/addresses/suggest | Address autocomplete (early access)Early access | Free |
| GET /v1/addresses/{udprn} | Resolve one address (early access)Early access | 1 address lookup |
MCP server
Postcode tools for ChatGPT, Claude, Cursor and Copilot, by one URL.
Moving from postcodes.io
Our compatibility endpoints answer in its shape: change the base URL.
Integrations
Snippets for JavaScript, React, WordPress forms and no-code tools.
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.