---
title: Validate UK Postcodes API
slug: validate-uk-postcode
url: https://apyhub.com/apyhub/service/validate-uk-postcode
provider: ApyHub
categories: [Verification Kit]
tags: [postcode-validation, uk-postcode, address-validation, uk]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
alias: data-postcodes-uk
---

# Validate UK Postcodes API

Validate a UK postcode from your code and get a true or false back in one request. Built for checkout, signup and address cleanup. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/apyhub/validate-uk-postcode` | What it does Validates a UK postcode by accepting a postcode string in the request body and returni… | 10 |

## Endpoint reference

### Validate UK postcode

`POST https://api.eu.apyhub.com/apyhub/validate-uk-postcode` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `postcode` | body | string | yes | Postcode or PIN code (spaces ignored for matching). Example: `YO17 6DU`. |

#### Quickstart

Check whether a UK postcode exists by sending the postcode in a JSON body.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/validate-uk-postcode" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postcode":"YO17 6DU"}'
```

#### What you'll get back

Returns a JSON object with a `data` boolean field — `true` when the postcode exists in the lookup table, `false` otherwise.

```json
{
  "data": true
}
```

## About

## What it does

The UK Postcode Validation API checks whether a UK postcode is real. Send a postcode and get back `true` or `false`. Spaces are ignored, so `YO17 6DU` and `YO176DU` both work.

Use it to stop bad addresses at the point of entry. Checkout forms. Signup flows. CRM imports. Cleaning up an address list you inherited. Catching a typo before a parcel ships saves a failed delivery and a support ticket.

The response is deliberately small. One boolean, nothing to parse. That makes it cheap to call on form submit, and easy to drop into a validation chain next to your email and phone checks.

It tells you the postcode exists. It does not return the street, town or county, or confirm that the rest of the address matches. If you need the full address verified, use the [Address Validation API](https://apyhub.com/quadlem/service/address-validation). Shipping to India as well? The [Indian Pincode API](https://apyhub.com/apyhub/service/validate-indian-postcode) works the same way.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/validate-uk-postcode
