Public APIs
Validate UK Postcodes favicon

Validate UK Postcodes

Data Validation

This API validates postal codes within UK.

Validate UK Postcodes's website screenshot

About Validate UK Postcodes

The UK Postcode Validator is an API hosted on ApyHub that checks whether a given UK postcode exists in its lookup table. It accepts a postcode string in the request body and returns a single boolean field, data, set to true or false, with no additional address enrichment or parsing. Matching ignores spaces, so postcodes can be submitted without prior normalization.

The API exposes one POST endpoint and is versioned at 1.0.0. Requests require an apy-token header and a JSON body containing the postcode parameter; responses are a simple JSON object with the data boolean.

It is intended for use as a fast existence check before storing, routing, or comparing UK address data, such as in signup forms, address capture flows, CRM imports, and checkout validation.

Key features

  • Validates UK postcode existence with a single boolean response
  • Ignores spaces in postcode input for matching
  • Single POST endpoint for easy integration
  • Returns minimal JSON response with one data field

Frequently asked questions

What does the API return?

It returns a JSON object with a single boolean field called data, which is true when the postcode exists in the lookup table and false otherwise.

Do I need to format the postcode before sending it?

No, spaces are ignored for matching, so postcodes can be sent as-is without normalisation.

How do I authenticate requests?

Requests are authenticated using an apy-token header containing your API key.

What errors can the API return?

It can return 400 for missing or malformed parameters, 401 for missing or invalid API keys, 429 for rate limiting, and 503 when the backend is temporarily unavailable.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product