Postcodes.io

Validate UK Postcode

Checks that a UK postcode exists.

Unverified

What the model is told

Check whether a UK postcode is real. The result is true or false. Pass the postcode in capitals with no spaces.

Request

GEThttps://api.postcodes.io/postcodes/{{postcode}}/validate

Headers

None.

Parameters

  • postcode stringA UK postcode in capitals with no spaces, for example SW1A1AA.

Try this tool

This runs in your browser and calls Postcodes.io directly. Nothing goes through our servers.

Parameters
A UK postcode in capitals with no spaces, for example SW1A1AA.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "f8713f69-d3a9-41eb-81d0-6a0c2af31998",
    "type": "HTTP_REQUEST",
    "label": "Validate UK Postcode",
    "name": "validate_uk_postcode",
    "customName": false,
    "description": "Check whether a UK postcode is real. The result is true or false. Pass the postcode in capitals with no spaces.",
    "parameters": [
      {
        "name": "postcode",
        "type": "string",
        "description": "A UK postcode in capitals with no spaces, for example SW1A1AA."
      }
    ],
    "config": {
      "endpoint": {
        "method": "GET",
        "url": "https://api.postcodes.io/postcodes/{{postcode}}/validate"
      },
      "headers": [],
      "body": null,
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.