Skip to content

Postcode

published · September 10, 2026

A postcode is the code a postal service uses to sort mail to a delivery area, called a ZIP code in the United States, an Eircode in Ireland and a PIN in India.

A postcode is the code a postal service uses to sort mail to a delivery area. It is called a ZIP code in the United States, an Eircode in Ireland, a PIN in India, and postal_code_type says which of those a country uses.

What Spaw answers

Four fields, and they answer different questions. postal_code_valid says whether the code matches the country's own pattern. postcode_status says what the national postcode directory records — live, terminated, or null where no directory is installed. locality_matches_postcode says whether the town given agrees with the directory. Two reasons come out of this: invalid_postal_code for a code that cannot be one, and postcode_not_found for a well-formed code that a complete directory does not list.

A terminated postcode is a real address whose code was retired, not a typo. It scores +30 and is reported rather than refused.

Coverage, stated plainly

One directory is installed: Great Britain's. Northern Ireland's BT postcodes are excluded from it, so they answer as though no directory existed. It publishes no post town, which is why locality_matches_postcode stays null for British addresses.

A postcode is also not an address. A UK code is a routing unit covering a group of delivery points — one side of a street, one office block — and turning a code into the addresses inside it needs a licence this service does not hold, so that endpoint answers 501 ADDRESS_LIST_UNAVAILABLE rather than guessing.

Related

markdown version: /glossary/postcode.md

Verify addresses the same way

The Spaw API runs every check described here on each lookup, with an SMTP handshake that never sends mail. 10 free lookups a month, no card required.

Get your API key

More glossary

  • ASN

    An Autonomous System Number identifies one network that announces its own routes to the internet under a single routing policy.

  • Address register

    An address register is a country's official file of every address its authorities recognise, usually keyed on buildings rather than letterboxes.

  • CIDR

    CIDR notation writes a range of IP addresses as one address and a prefix length, so 203.0.113.0/24 means the 256 addresses sharing those first 24 bits.

  • Catch-all domain

    A catch-all domain is one whose mail server accepts mail addressed to every recipient, whether or not that mailbox exists.

  • Check digit

    A check digit is a digit computed from the rest of an identifier so that a mistyped one usually fails arithmetic before anybody looks it up.

  • Company number

    A company number is the identifier a national registrar assigns to an incorporated company, unique within that register and never within the world.

  • Credit

    A credit is the billing unit of the whole API: one credit buys one fresh lookup that produced a usable answer, on any of the six signals.

  • Datacenter IP

    A datacenter IP is an address inside a range operated by a hosting, cloud or server provider rather than by a consumer access network.